[mrtg] MRTG with extend command in Net-SNMP
Shu Hung (Koala)
koalay at gmail.com
Fri Sep 17 12:00:31 CEST 2010
I tried this configuration in my snmpd.conf
extend 1.3.6.1.4.1.1.2.3.4.5.6 /usr/local/snmpd-5.5/etc/snmp/scripts/test.sh
After restarting snmpd, I use snmpwalk to test it:
[user at foobar ~] snmpwalk -v 2c -c public somehost 1.3.6.1.4.1.1.2.3.4.5.6
It gives me this error:
SNMPv2-SMI::enterprises.1.2.3.4.5.6 = No Such Object available on this agent
at this OID
I tried to run mrtg right the way. It gives me this error:
2010-09-17 17:58:01: ERROR: Target[testshell][_IN_] '1.3.6.1.4.1.1.2.3.4.5.
$target->[5]{$mode} ' (warn): Use of uninitialized value in concatenation
(.) or string at (eval 23) line 1.
2010-09-17 17:58:01: ERROR: Target[testshell][_OUT_] '1.3.6.1.4.1.1.2.3.4.5.
$target->[5]{$mode} ' (warn): Use of uninitialized value in concatenation
(.) or string at (eval 24) line 1.
What should I do?
Koala Yeung
On Wed, Sep 8, 2010 at 06:15, Steve Shipway <steve at steveshipway.org> wrote:
> You are not allowed to specify an OID to MRTG like this:
>
> NET-SNMP-EXTEND-MIB::nsExtendOutputFull.”testshell”
>
> You can use dotted numeric notation:
>
> 1.3.6.1.4.1.1.2.3.4.5.6
>
> Or symbolic notation (with suffix) if the MIB has been previously loaded:
>
> ifInErrors.6
>
> However you cannot specify an OID using the ‘*MIBNAME*::*symbolicname*format, and you cannot use the .”textindex” suffix, only a numeric suffix.
> The output of snmpwalk is not necessarily compatible with MRTG as it can
> use these additional two notation formats.
>
>
>
> The ‘:::::2’ suffix is a collapsed form of the Extended Hostname Syntax for
> specifying a Target in MRTG and is separate from the OID specification.
>
>
>
> See http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html for
> documentation on the Target syntax, and how you can specify an OID.
>
>
>
> Steve
> ------------------------------
>
> *Steve Shipway*
>
> steve at steveshipway.org
>
> http://www.steveshipway.org/software
>
> P Please consider the environment before printing this e-mail
>
>
>
>
>
> *From:* Shu Hung (Koala) [mailto:koalay at gmail.com]
> *Sent:* Tuesday, 7 September 2010 9:28 p.m.
> *To:* Steve Shipway
> *Cc:* mrtg at lists.oetiker.ch
> *Subject:* Re: [mrtg] MRTG with extend command in Net-SNMP
>
>
>
> I'm not quite sure I get you.
>
> As far as I know, the '::::2' suffix is to set the SNMP version number that
> MRTG would use. It's not a part of OID at all. To my understanding, I'm
> using this text OID for my script:
>
> NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell"
>
>
> And the snmpwalk result seems to indicate that my script works with snmpd
> as expected. This is the result:
>
> NET-SNMP-EXTEND-MIB::nsExtendOutputFull."testshell" = STRING: 1
>
> 2
>
> custom 1
>
> custom 2
>
>
> How can I plot a graph with MRTG?
> Or which part did I get wrong?
>
>
> Koala Yeung
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20100917/a99c3c72/attachment.htm
More information about the mrtg
mailing list