Re: Setting up SNMP

From: Krzysztof Oledzki <ole#ans.pl>
Date: Sat, 7 Feb 2009 17:29:48 +0100 (CET)

On Wed, 4 Feb 2009, Ruy Diaz wrote:

>
>> 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';

Good. I think we are making a slow progress here.

> 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?

First, lets check if haproxy.pl is indeed working: try to walk "1.3.6.1.4.1.29385.106.2.0".

Then make sure that snmpd/haproxy.pl is able to read the socket provided by the proxy. By default haproxy.pl expects "/var/run/haproxy.stat", also make sure that you have valid permissions for the socket.

Best regards,

                         Krzysztof Olędzki Received on 2009/02/07 17:29

This archive was generated by hypermail 2.2.0 : 2009/02/07 18:45 CET