1

On our servers ( debian, centos and ubuntu ) we set in snmpd.conf

extend .1.3.6.1.4.1.2021.7890.1 distro "/bin/cat /etc/debian_version" 

This way a centralized monitor ( Observium ) read the OS distro. Fine.

I read http://net-snmp.sourceforge.net/docs/man/snmpd.conf.html but ...

The OID .1.3.6.1.4.1.2021.7890.1 is a de-facto "standard" ?

Why python doesn't work ?

extend .1.3.6.1.4.1.2021.7890.2 purpose "/usr/bin/python /root/snmp_helper.py --product" 

I cannot spot error in

/var/log/messages

26 oct : I tried with another command :

Host $HOSTNAME

not working. With

snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.7890

I found this error

iso.3.6.1.4.1.2021.7890.3.3.1.1.6.115.101.114.105.97.108 = STRING: "Host \$HOSTNAME not found: 3(NXDOMAIN)"

Can I use bash variables and stdout rediretion ? Which is the right syntax for the extensions ?

2 Answers 2

0

Observium supports only distro extend oid node, nor others.

Your extend of SNMP agent works as expected and you can check it by manually walking on purpose oid node.

Observium Poller can be extended to poll additional values, for example, see how "distro" node is used in ./includes/polling/os/unix.inc.php

1
  • Fedor, thank for your comment, but this is a SNMP config problem. I don't understand how to use bash variables in to the commands. Commented Oct 26, 2015 at 10:19
0

Sorry, it is a snmp' extensions newbie question.

To use variables and stdin stdout redirection, you have to prepend the command with the interpreter, like this :

extend .1.3.6.1.4.1.2021.7890.2 purpose "/bin/cat /sys/devices/virtual/dmi/id/product_name"

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.