Re: canīt get snmp to work

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 29 Apr 2008 11:16:30 +0200


Hi Pablo,

On Tue, Apr 22, 2008 at 07:47:58PM +0200, Pablo Escobar wrote:
> Hi Willy,
>
> Finally I got it working.

cool, thanks for the heads up.

> I found that default snmpd server on debian etch has no perl support, thatīs
> why I was getting this errors on syslog:
>
> /etc/snmp/snmpd.conf: line 25: Warning: Unknown token: disablePerl.
> /etc/snmp/snmpd.conf: line 26: Warning: Unknown token: perl.
>
> So I had to recompile snmpd package with perl support. I did on the "debian
> way", I am going to try to describe to steps I followed, maybe itīs usefull
> for any reader of the list interested on getting snmp support.
>
> Intall required packages:
>
> $> apt-get install build-essential fakeroot dpkg-dev #this to build .deb
> $> mkdir build
> $> cd build
> $> apt-get source snmpd
> $> apt-get build-dep snmpd
> $> dpkg-source -x net-snmp_5.2.3-7etch2.dsc
> $> cd net-snmp-5.2.3/
>
> To compile with perl support you have to pass the
> flag "--enable-embedded-perl" to the configure script. It is supposed that
> you can do it in this way:
>
> $>DEB_BUILD_OPTIONS="--enable-embedded-perl" fakeroot debian/rules binary
>
> but this didnīt worked for me so I had to edit with a text editor the file
> net-snmp-5.2.3/debian/rules and manually add the
> flag "--enable-embedded-perl"
>
> After this I generated the .deb packages with:
> $> fakeroot debian/rules binary
>
> Then I installed all the generated .deb files and when I restarted the snmpd
> server the error on syslog dissapeared.
>
> I also also had to change a line on my haproxy.cfg. I had this on the global
> section:
>
> stats socket /var/run/haproxy.stat mode 600
>
> and had to change for this:
>
> stats socket /var/run/haproxy.stat mode 777
>
> Now I can query with snmpwalk:
>
> [root][harry]# snmpbulkwalk -c public -v2c IPHAPROXY
> 1.3.6.1.4.1.29385.106.1.0.17
> SNMPv2-SMI::enterprises.29385.106.1.0.17.1.0 = STRING: "OPEN"
>
> Now itīs time for cacti :)
>
> Many thanks for your help Willy, you are developing a great software and also
> make this mailing list really interesting with your inputs.
>
> If anyone is interested on getting the snmpd .deb files with perl support for
> debian etch x86_64 just mail me.

Well, what would be really cool is if you could add a "howto" file in the netsnmp-perl directory so that other persons know how to rebuild their netsnmp package with perl support.

Thanks,
Willy Received on 2008/04/29 11:16

This archive was generated by hypermail 2.2.0 : 2008/04/29 11:30 CEST