Shu Hung (Koala)
2010-09-03 17:24:21 UTC
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:
[***@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"`:***@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}
:***@somehost:::::2' (eval): syntax error at (eval 23) line 1, near "} :"
2010-09-04 01:17:21: ERROR: Target[testshell][_OUT_] ' $target->[5]{$mode}
:***@somehost:::::2' (eval): syntax error at (eval 24) line 1, near "} :"
What could be the problem? Any suggestion?
Thanks!
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:
[***@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"`:***@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}
:***@somehost:::::2' (eval): syntax error at (eval 23) line 1, near "} :"
2010-09-04 01:17:21: ERROR: Target[testshell][_OUT_] ' $target->[5]{$mode}
:***@somehost:::::2' (eval): syntax error at (eval 24) line 1, near "} :"
What could be the problem? Any suggestion?
Thanks!