net-snmp pass scripts

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
chas
Posts: 1
Joined: Thu Sep 15, 2005 7:14 am

net-snmp pass scripts

Post by chas »

I know this isn't strictly a cacti issue, but there seems to be some people on here well clued up on snmp on here and I want to get this data into cacti.

I've set up pass script in my sndpd.conf:
pass 1.3.6.1.2.1.28.6.1 /usr/local/bin/my_snmp.pl

That script just reads in a load of parameters from a file and returns them as a subset of 1.3.6.1.2.1.28.6.1.

I am able to use snmpwalk to retrieve specific values from within that tree:

$ snmpwalk -Os -c community -v 1 server 1.3.6.1.2.1.28.6.1.1
mib-2.28.6.1.1 = INTEGER: 662

$ snmpwalk -Os -c community -v 1 server 1.3.6.1.2.1.28.6.1.6
mib-2.28.6.1.6 = INTEGER: 1

But if I try and snmpwalk that tree itself I don't get any data back, so cacti can't walk that tree and retreive the values.

$ snmpwalk -Os -c community -v 1 server 1.3.6.1.2.1.28.6.1
$ echo $?
0

I imagine I've got something missing from my script, but can't work out what..

I've attached the script and the datafile to this post.

Cheers,
Chas.
Attachments
my_snmp.pl.gz
The script...
(352 Bytes) Downloaded 334 times
my_snmp.gz
The data file
(96 Bytes) Downloaded 256 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests