Charles,

I use both exec (and extend, thanks to Dave's patch :) ) with Cacti
(used to use MRTG) and Nagios.

What you have to do with Cacti is create a data input method that
calls your custom exec task OID via an external script (or the script
server, which is what I use), then make sure the exec task returns
name:value pairs like non-SNMP scripts would .. e.g.

1min:1 5min:20 15min:3

Then you can map the data input method's output to a data template and
continue as usual.

Same thing for MRTG, you have to create a script that uses snmpget to
retrieve the output from the exec task and then reformats it for MRTG
output.

Works well for both.

Might be able to bypass the script server piece for Cacti by doing a
GET on the OID directly (SNMP query or SNMP instead of a custom data
input method), I haven't tried that yet

Regards,
Max

On 4/13/07, Charles Sprickman <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've got a number of very simple things that I'd like to monitor via snmp,
> just because the infrastructure is already there and I monitor/graph a
> number of other things via snmp.
>
> What I'm looking at right now are some qmail queue values (deferals,
> errors, etc.).  I have a script that outputs some values and writes them
> out to a file.
>
> In snmpd.conf I have something like this:
>
> exec .1.3.6.1.4.1.2021.9100.1 QmailQueue1 /usr/local/adm/bin/qm-stat-cat.sh 1
> exec .1.3.6.1.4.1.2021.9100.2 QmailQueue2 /usr/local/adm/bin/qm-stat-cat.sh 2
> exec .1.3.6.1.4.1.2021.9100.3 QmailQueue3 /usr/local/adm/bin/qm-stat-cat.sh 3
>
> It does work, but I'm totally lost on how to make sure these values, which
> are always integers are reported as such.
>
> I spent many days puzzling over why mrtg just gave me empty graphs even
> though I was able to poll it:
>
> toolbox[~]# snmpwalk -v1 -c foo h07 1.3.6.1.4.1.2021.9100.1.101.8
> UCD-SNMP-MIB::ucdavis.9100.1.101.8 = STRING: "0"
>
> Turns out that mrtg (and nagios, and probably other stuff) does not like
> to see the "STRING" type.
>
> What am I missing here?  How does the exec method decide whether the
> returned value is a string or integer?
>
> OTOH, the "pass" method also looks interesting.  Does anyone know of a
> link to a simple demo script made for "pass"?  I didn't see much about it
> in the net-snmp wiki.
>
> Thanks,
>
> Charles
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Net-snmp-users mailing list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to