SNMP Linux question snmpd.conf

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
supercell
Posts: 2
Joined: Fri Dec 09, 2005 8:22 pm

SNMP Linux question snmpd.conf

Post by supercell »

Hi,

I am new to Cacti, but have installed it and is working ok on some of my linux servers.

Some servers seem to report the CPU usages and bandwith while others do not. I am running various versions of Red Hat.

Is there an example snmpd.conf file someone can provide me that would allow Catcti to poll for all the variables, CPU usage, free disk space, etc??

Thanks!

Mike
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Comments of my snmpd.conf

Code: Select all

###############################################################################
# disk checks
#

# The agent can check the amount of available disk space, and make
# sure it is above a set limit.

# disk PATH [MIN=100000]
#
# PATH:  mount path to the disk in question.
# MIN:   Disks with space below this value will have the Mib's errorFlag set.
#        Default value = 100000.

# Check the / partition and make sure it contains at least 10 megs.

#disk / 10000

# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.9
# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F
# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0"
# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""

# -----------------------------------------------------------------------------
and

Code: Select all

###############################################################################
# load average checks
#

# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#
# 1MAX:   If the 1 minute load average is above this limit at query
#         time, the errorFlag will be set.
# 5MAX:   Similar, but for 5 min average.
# 15MAX:  Similar, but for 15 min average.

# Check for loads:
#load 12 14 14

# % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.10
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""

# -----------------------------------------------------------------------------
See my signature for versions
Reinhard
supercell
Posts: 2
Joined: Fri Dec 09, 2005 8:22 pm

Post by supercell »

Thanks, but How do I get CPU usage, memory, interface stats, IOstats etc? I would like to poll for every possible metrix.

Many Thanks,

Mike Dross
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

supercell wrote:Thanks, but How do I get CPU usage, memory, interface stats, IOstats etc? I would like to poll for every possible metrix.

Many Thanks,

Mike Dross
CPU usage: depends on your host (e.g. support of the HOST MIB). Try

Code: Select all

snmpwalk -c <community> -v 1 <device> HOST
to see, if it works. Use the Host MIB - CPU Utilization Graph Template for those. On the forum, there are several posts for Cisco CPU usage as well (I'm currently using this successfully). For other devices, there have been posts as well
Memory: see, above (applies to Host MIB and Cisco as well)
Interface: this is standard! Use Generic SNMP enabled Host, this provides the Associated Data Query needed
IOstats: do you refer the the output of "iostat". I've posted a Graph Template for this (but this is not that straightforward, as I must confess). Or do you refer to DiskIO. There have been posts on this on the forum
Extending cacti's out-of-the-box capabilities by using SNMP Queries, Scripts and the like will allow you to get _very_ much data! Serach the Scripts and Templates forum
Reinhard
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Post by dust2k »

I could not find Host MIB - CPU Utilization, did I miss something during the installatin ? I need CPU and memory, Linux - memory Usage doesn't work properly and Linux Advance Memory Usage seems also have the problem.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

dust2k wrote:I could not find Host MIB - CPU Utilization, did I miss something during the installatin ? I need CPU and memory, Linux - memory Usage doesn't work properly and Linux Advance Memory Usage seems also have the problem.
Then, please refer to ucd/net - CPU Usage templates
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests