Re: Setting up SNMP

From: Ruy Diaz <ruy.diaz#with.us>
Date: Wed, 04 Feb 2009 10:09:53 -0800

> Your perl/net-snmp environment is damaged. You have mismatched files
> from 5.4.2.1 and 5.4.1.
>
>> Compilation failed in require at /etc/snmp/haproxy.pl line 18.
>> BEGIN failed--compilation aborted at /etc/snmp/haproxy.pl line 18.
>>
>> During my previous fiddling around trying to find the root of the
>> problem, I did copy net-snmp-5.4.2.1/perl/blib/lib/NetSNMP/agent.pm
>> to /usr/local/lib/perl/5.10.0/NetSNMP/agent.pm.
>
> So now you have one file from 5.4.2.1 and others from 5.4.1. My
> suggestion is to stick with 5.4.1 or to make a proper upgrade to 5.4.2.1.
>

I've reinstalled the 5.4.1 with perl enabled. Now if I'm getting the following result on haproxy.pl:

$ perl /etc/snmp/haproxy.pl

netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()

Warning: no access control information configured.   It's unlikely this agent can serve any useful purpose in this state.   Run "snmpconf -g basic_setup" to help you configure the Haproxy.conf file for this agent.

I ran snmpconf (answering to the best of my ability) but am still getting the same results. I actually ended up copying the resulting snmp.conf file to /etc/snmpd/snmpd.local.conf with the following contents:

proc httpd 1
rwuser ruy auth
rocommunity public
rwcommunity public
trapcommunity public
authtrapenable 1
disablePerl false
perl do '/etc/snmp/haproxy.pl';

Syslog shows no errors, and it does show the incoming connection when I do the snmpbulkwalk. But the result is still:

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

Did i get the snmpd.conf wrong? Or is there still something else I need to configure?

Cheers
Ruy Received on 2009/02/04 19:09

This archive was generated by hypermail 2.2.0 : 2009/02/04 19:15 CET