Setting up SNMP

From: Ruy Diaz <>
Date: Tue, 03 Feb 2009 09:22:44 -0800


I've been trying to get SNMP monitoring to work for the last few days and have had quite a hard time getting it up. I am quite new to Linux, load balancing and SNMP so please take it easy on me.

I am running Ubuntu 8.10, Haproxy and I have just compiled net-snmp with perl enabled (tried configuring with both v3 and v2c without success). I have copied to /etc/snmp/haproxy and I modified /etc/snmp/snmpd.conf to include the lines indicated in the netsnmp-perl README.

However, when I run:

$ sudo snmpbulkwalk -c public -v2c SNMPv2-SMI::enterprises.29385.106 = No more variables left in this MIB View (It is past the end of the MIB tree)

Digging through forums I thought what I needed was to add a 'stats socket /var/run/haproxy.stat mod 777' line to my haproxy config, but when I add this, I get the following error:

[ALERT] 032/163027 (24099) : parsing [/etc/haproxy/haproxy.cfg:29] : unknown stats parameter 'stats' (expects 'hide-version', 'uri', 'realm', 'auth' or 'enable').
[ALERT] 032/163027 (24099) : Error reading configuration file :

One thing I did notice is that if I run the snmpbulkwalk with a less specific OID, I get an entry that might shed some light:

$ sudo snmpbulkwalk -c public -v2c SNMPv2-MIB::sysDescr.0 = STRING: Linux ruy-desktop 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686

SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (6120062) 17:00:00.62
SNMPv2-MIB::sysContact.0 = STRING: Root <root#localhost> (configure 


SNMPv2-MIB::sysName.0 = STRING: ruy-desktop *SNMPv2-MIB::sysLocation.0 = STRING: Unknown (configure
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and 
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model. SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = No more variables left in this MIB View (It 
is past the end of the MIB tree)

Does the /etc/snmp/snmpd.local.conf file need to exist? Is this where I should be placing the haproxy lines?

Any pointers on what I'm doing wrong?

Ruy Received on 2009/02/03 18:22

This archive was generated by hypermail 2.2.0 : 2009/02/03 18:30 CET