Поиск по этому блогу

вторник, 2 апреля 2013 г.

How to create perl/bash/python handler for snmpd

How to create perl/bash/python handler for snmpd? It's pretty simple.

Just add to snmpd config:
pass_persist [your OID] [path to script]

Next step is creating the script(handler):
Your script should print to STDOUT:
[your OID]
[type]
[value]

For example:

.1.3.6.1.4.5.9.4.1
integer
0


It works:
# snmpget localhost .1.3.6.1.4.5.9.4.1
SNMPv2-SMI::private.5.9.4.1 = INTEGER: 0


Enjoy :).

Комментариев нет:

Отправить комментарий