CentOS Cacti Appliance (CactiEZ) and snmp configuration

8 01 2008

I am running CactiEZ VMWare appliance for a while and couple of graphs I was looking for were not integrated in the SNMP configuration.

CactiEZ is based on CentOS linux distribution.

Verify SNMP Daemon is running

[root@CACTI-04 /]# ps -ef | grep snmp
root 29283 1 0 Jan06 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd -a
[root@CACTI-04 /]#

Rename the default configuration file

[root@CACTI-04 /]# mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.org
[root@CACTI-04 /]# ls /etc/snmp/
snmpd.org
[root@CACTI-04 /]#

Create new file with your own SNMP configuration

[root@CACTI-04 /]# vi /etc/snmp/snmpd.conf
###########################################################################
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the “system” mib group in the mibII tree.
# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will make
# the agent return the “notWritable” error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation NETWORKNET
# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the “notWritable” error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact Ivan Versluis
###########################################################################
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.
# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity net_ro_public
###########################################################################
# SECTION: Agent Operating Mode
#
# This section defines how the agent will operate when it
# is running.
# agentaddress: The IP address and port number that the agent will listen on.
# By default the agent listens to any and all traffic from any
# interface on the default SNMP port (161). This allows you to
# specify which address, interface, transport type and port(s) that you
# want the agent to listen on. Multiple definitions of this token
# are concatenated together (using ‘:’s).
# arguments: [transport:]port[@interface/address],…

agentaddress 127.0.0.1:161

ESC and :wq! to save and exit the file.

Reload the snmpd.conf file and verify the SNMP configuration with snmpread

[root@CACTI-04 /]# service snmpd reload

Reloading snmpd: [ OK ]

[root@CACTI-04 /]#

Open the Cacti Devices and choose to add new host.

 

clip_image002

After new device has been added and the new CentOS device is being reopened the device should show the SNMP configuration like mine.

CACTI-04 (127.0.0.1)

SNMP Information
System: Linux CACTI-04.almatis.internal 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686
Uptime: 12822505
Hostname: CACTI-04.networknet.nl
Location: NETWORKNET
Contact: Ivan Versluis

Last step would be to create new graps. Depending on the host template choosen cpu, memory and nic graps can be created.

NIC

clip_image004

CPU

clip_image006

Memory

clip_image008


Actions

Informations

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>