[mrtg] MRTG with extend command in Net-SNMP
Shu Hung (Koala)
koalay at gmail.com
Fri Sep 3 19:24:21 CEST 2010
Hello,
I'm trying to make a custom SNMP graph with extend command and MRTG
I've manage to get results from snmpwalk. The command and result looks like
this:
[user at foobar ~] snmpwalk -v 2c -c public somehost
'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell"'
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell" = STRING: 1
2
custom 1
custom 2
I then try to get these figures with MRTG. My config looks like this:
Target[testshell]:
`NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell"`:public at somehost:::::2
Title[testshell]: Test Shell
MaxBytes[testshell]: 5
PageTop[testshell]: <H1>Test Shell</H1>
YLegend[testshell]: Test Shell
ShortLegend[testshell]:
Options[testshell]: nopercent, gauge
Then when I run MRTG, the following error appears:
sh: NET-SNMP-EXTEND-MIB::nsExtendOutputFull.testshell: command not found
2010-09-04 01:17:21: WARNING: Could not get any data from external command
'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell"'
Maybe the external command did not even start. (Illegal seek)
2010-09-04 01:17:21: WARNING: Problem with External get
'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell"':
Expected a Number for 'in' but nothing'
2010-09-04 01:17:21: WARNING: Problem with External get
'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell"':
Expected a Number for 'out' but nothing'
2010-09-04 01:17:21: ERROR: Target[testshell][_IN_] ' $target->[5]{$mode}
:public at somehost:::::2' (eval): syntax error at (eval 23) line 1, near "} :"
2010-09-04 01:17:21: ERROR: Target[testshell][_OUT_] ' $target->[5]{$mode}
:public at somehost:::::2' (eval): syntax error at (eval 24) line 1, near "} :"
What could be the problem? Any suggestion?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20100904/77b7ad19/attachment.htm
More information about the mrtg
mailing list