Update:

I tried running

$ perl /etc/snmp/haproxy.pl

And I got an error indicating a missing agent.pm, so I copied it from net-snmp-5.4.2.1/perl/blib/lib/NetSNMP/. Upon running the perl command again, now I get a missing autosplit.ix. So I am wondering if there is some step that I am missing in setting up net-snmp correctly.

$ perl /etc/snmp/haproxy.pl
Can't locate auto/NetSNMP/agent/autosplit.ix in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/perl/5.10/AutoLoader.pm line 186.
at /usr/local/lib/perl/5.10.0/NetSNMP/agent.pm line 8
Can't locate NetSNMP/default_store.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/lib/perl/5.10.0/NetSNMP/agent.pm line 10. BEGIN failed--compilation aborted at /usr/local/lib/perl/5.10.0/NetSNMP/agent.pm line 10.
Compilation failed in require at /etc/snmp/haproxy.pl line 18.
BEGIN failed--compilation aborted at /etc/snmp/haproxy.pl line 18.

Ruy

Ruy Diaz wrote:
Hi,

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 1.3.15.7 and I have just compiled net-snmp 5.4.2.1 with perl enabled (tried configuring with both v3 and v2c without success). I have copied haproxy.pl 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 127.0.0.1 1.3.6.1.4.1.29385.106
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 : /etc/haproxy/haproxy.cfg

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 127.0.0.1 1.3.6.1
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 <r...@localhost> (configure /etc/snmp/snmpd.local.conf)
SNMPv2-MIB::sysName.0 = STRING: ruy-desktop
*SNMPv2-MIB::sysLocation.0 = STRING: Unknown (configure /etc/snmp/snmpd.local.conf)*
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.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching. 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?

Thanks
Ruy

Reply via email to