1753828 Members
8481 Online
108806 Solutions
New Discussion юеВ

Re: SNMP extensibility

 
Joey Groff
New Member

SNMP extensibility

I am working on a LH3000 Netserver. Currently I've installed net-snmp, and I've gotten all the basic functions to work (snmpget, snmptrap) and the daemons set up on the netserver.

What I'm attempting to do is to implement some of the HP mibs so that I will be able to use SNMP to tell when a powersupply goes out, or a RAID drive is full/goes out, things of that nature.

Any pointers in the right direction would be greatly appreciated, Thanks.
3 REPLIES 3
Patrick Preuss
Trusted Contributor

Re: SNMP extensibility

Hi,
as far as i know.
You can extend Net Snmp with any Mib Values you want.

you can try this
from /usr/share/snmp/snmpconf/snmpd.conf/extending
token exec
info run a simple command using exec()
info arguments: [oid] name /path/to/executable arguments
question 1 The OID where the results table should be display [default=extTable]
question 2 The "name" to associate with this command when displaying the results
question 3 The path to the program to be run.
question 4 The arguments to pass to $3
# from the conf
exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest

# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.50
# enterprises.ucdavis.50.1.1 = 1
# enterprises.ucdavis.50.2.1 = "shelltest"
# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
# enterprises.ucdavis.50.100.1 = 35
# enterprises.ucdavis.50.101.1 = "hello world."
# enterprises.ucdavis.50.101.2 = "hi there."
# enterprises.ucdavis.50.102.1 = 0


for example you get the values from your raid adapter and put the at the deired point in the mib

if you have the mibs and a mib browser you can look up the oid value for the raid sub system for an net server.






Look at:
http://net-snmp.sourceforge.net/tutorial/agent/guide.html
Goodbye Douglas! Whereever you are now, keep your towel and don't panic.
Patrick Preuss
Trusted Contributor

Re: SNMP extensibility

Hi,
as far as i know.
You can extend Net Snmp with any Mib Values you want.

you can try this
from /usr/share/snmp/snmpconf/snmpd.conf/extending
token exec
info run a simple command using exec()
info arguments: [oid] name /path/to/executable arguments
question 1 The OID where the results table should be display [default=extTable]
question 2 The "name" to associate with this command when displaying the results
question 3 The path to the program to be run.
question 4 The arguments to pass to $3

exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest

# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.50
# enterprises.ucdavis.50.1.1 = 1
# enterprises.ucdavis.50.2.1 = "shelltest"
# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
# enterprises.ucdavis.50.100.1 = 35
# enterprises.ucdavis.50.101.1 = "hello world."
# enterprises.ucdavis.50.101.2 = "hi there."
# enterprises.ucdavis.50.102.1 = 0


for example you get the values from your raid adapter and put the at any desired point in the mib.
FOR HP Netserver RAID adapter take a look at the HP Mibs and change the oid Value to this.

exec shelltest /bin/sh cat /proc/sys/myraidvalues



Look at:
http://net-snmp.sourceforge.net/tutorial/agent/guide.html


regards
Patrick

Goodbye Douglas! Whereever you are now, keep your towel and don't panic.
Patrick Preuss
Trusted Contributor

Re: SNMP extensibility

Sorry for the First posting but my Internet link has been broken:-)

regards
Patrick
Goodbye Douglas! Whereever you are now, keep your towel and don't panic.