Find the answer to your Linux question:
Results 1 to 2 of 2
I've been working with SNMP for quite a while now and I though I was developing a pretty intuitive idea of how it works but I've been running in this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    4

    SNMP Configuration


    I've been working with SNMP for quite a while now and I though I was developing a pretty intuitive idea of how it works but I've been running in this issue. Hopefully some of you could help.


    So in my snmpd file I'd like to monitor my / parition and my /localhd parition. Considering I have a crap load of other mounting points I don't want to use the dirrective

    > includeAllDisks 10%

    So in order to noy use that directive I fiugred I would just use:

    > disk / 10%
    > disk /localhd 10%

    Now this is where things get weird. I restart snmpd and no errors show up nothing really changes. I do an snmpwalk on disk OID and this is what I get:

    Code:
    UCD-SNMP-MIB::dskIndex.1 = INTEGER: 0
    UCD-SNMP-MIB::dskIndex.2 = INTEGER: 1
    UCD-SNMP-MIB::dskPath.1 = STRING: /
    UCD-SNMP-MIB::dskPath.2 = STRING: /localhd
    UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/ram0
    UCD-SNMP-MIB::dskDevice.2 = STRING: /dev/sda2
    UCD-SNMP-MIB::dskMinimum.1 = INTEGER: 100000
    UCD-SNMP-MIB::dskMinimum.2 = INTEGER: 100000
    UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: -1
    UCD-SNMP-MIB::dskMinPercent.2 = INTEGER: -1
    UCD-SNMP-MIB::dskTotal.1 = INTEGER: 0
    UCD-SNMP-MIB::dskTotal.2 = INTEGER: 0
    UCD-SNMP-MIB::dskAvail.1 = INTEGER: 0
    UCD-SNMP-MIB::dskAvail.2 = INTEGER: 0
    UCD-SNMP-MIB::dskUsed.1 = INTEGER: 0
    UCD-SNMP-MIB::dskUsed.2 = INTEGER: 0
    UCD-SNMP-MIB::dskPercent.1 = INTEGER: 0
    UCD-SNMP-MIB::dskPercent.2 = INTEGER: 0
    UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 0
    UCD-SNMP-MIB::dskPercentNode.2 = INTEGER: 0
    UCD-SNMP-MIB::dskTotalLow.1 = Gauge32: 0
    UCD-SNMP-MIB::dskTotalLow.2 = Gauge32: 0
    UCD-SNMP-MIB::dskTotalHigh.1 = Gauge32: 0
    UCD-SNMP-MIB::dskTotalHigh.2 = Gauge32: 0
    UCD-SNMP-MIB::dskAvailLow.1 = Gauge32: 0
    UCD-SNMP-MIB::dskAvailLow.2 = Gauge32: 0
    UCD-SNMP-MIB::dskAvailHigh.1 = Gauge32: 0
    UCD-SNMP-MIB::dskAvailHigh.2 = Gauge32: 0
    UCD-SNMP-MIB::dskUsedLow.1 = Gauge32: 0
    UCD-SNMP-MIB::dskUsedLow.2 = Gauge32: 0
    UCD-SNMP-MIB::dskUsedHigh.1 = Gauge32: 0
    UCD-SNMP-MIB::dskUsedHigh.2 = Gauge32: 0
    UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: error(1)
    UCD-SNMP-MIB::dskErrorFlag.2 = INTEGER: error(1)
    UCD-SNMP-MIB::dskErrorMsg.1 = STRING: /: less than 100000 free (= 0)
    UCD-SNMP-MIB::dskErrorMsg.2 = STRING: /localhd: less than 100000 free (= 0
    As you can see all the data collected is crap. I check the log file for errors and nothing came up. Now if I add the includeAllDisks directive everything works like a charm. WHY!!!! I figured that includeAllDisks is some sort of command for snmp to look at all your mounting points initially and set them up for monitoring. It even states that after you start snmp any new mounting points will not be monitored. What am I missing? Any help would be greatly appreciated.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    try reverting to a simplistic snmp configuration and move forward, adding layers of complexity.

    for example, try putting just these lines in your SNMP server's snmpd.conf:
    Code:
    rocommunity public
    disk / 10%
    disk /data 10%
    don't forget to restart the snmp daemon.

    then from a client:
    Code:
    snmpwalk -v 1 -c public <SERVER_IPADDR> dskTable
    of course, make sure your firewall is not in the way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •