I think you are misunderstanding how to specify an MRTG Target. The backticks `xxx` are used to specify an external program (data collection plugin) to run which will output the values to graph.
However, the format of your Target seems to indicate that you are attempting to specify an OID this way. Read the MRTG manaual on the format of the Target specifier -- oid&oid:commun...@device . You can use symbolic names for an OID if you have previously loaded the MIB -- you can't specify the MIB with the :: notation in the Target line. Also, MRTG does not support the ."xxx" suffic for identifying table members, you have to use numeric syntax (I know this can cause problems with dynamic tables as produced by net-snmp; you can get around this by writing a data collection plugin to do it, see the check_ucd data collection plugin which will get data via SNMP from a net-snmp module. Steve Steve Shipway University of Auckland ITS UNIX Systems Design Lead [email protected]<mailto:[email protected]> Ph: +64 9 373 7599 ext 86487 ________________________________ From: [email protected] [[email protected]] on behalf of Shu Hung (Koala) [[email protected]] Sent: Saturday, 4 September 2010 5:24 a.m. To: [email protected] Subject: [mrtg] MRTG with extend command in Net-SNMP 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: [u...@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"`:pub...@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} :pub...@somehost:::::2' (eval): syntax error at (eval 23) line 1, near "} :" 2010-09-04 01:17:21: ERROR: Target[testshell][_OUT_] ' $target->[5]{$mode} :pub...@somehost:::::2' (eval): syntax error at (eval 24) line 1, near "} :" What could be the problem? Any suggestion? Thanks!
_______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
