[mrtg] external command problems
Charles Sprickman
spork at bway.net
Sat Apr 21 05:22:42 CEST 2007
Hello,
I've got a simple shell script that wraps around snmpget to allow me to
feed some snmp values that are integers but reported as strings to mrtg.
I'm calling it like so:
Target[h07_queue_1]:`/usr/local/adm/bin/snmpget-wrap.sh h07
NET-SNMP-EXTEND-MIB::nsExtendOutLine.\"QmailQueue1\".7
NET-SNMP-EXTEND-MIB::nsExtendOutLine.\"QmailQueue1\".8`
Directory[h07_queue_1]: queues
MaxBytes[h07_queue_1]: 100
Title[h07_queue_1]: Deferrals and Failures
PageTop[h07_queue_1]: <H1>h07 q1 Deferrals and Failures</H1>
Unscaled[h07_queue_1]: ymwd
ShortLegend[h07_queue_1]: msgs
LegendI[h07_queue_1]: % deferred msgs
LegendO[h07_queue_1]: % failed msgs
YLegend[h07_queue_1]: % msgs
Options[h07_queue_1]: growright
When I run the command by hand (as the mrtg user) it looks like it gives
the proper output:
0
84
Timeticks: (352871) 0:58:48.71
h07
But in the debug output from mrtg I see the following:
toolbox[/usr/local/etc/mrtg]# /usr/local/bin/mrtg --debug=snpo ./queues.cfg
--snpo: run external /usr/local/adm/bin/snmpget-wrap.sh h07
NET-SNMP-EXTEND-MIB::nsExtendOutLine.\"QmailQueue1\".7
NET-SNMP-EXTEND-MIB::nsExtendOutLine.\"QmailQueue1\".8
--snpo: External result:3 out:undef uptime:Timeticks: (421570) 1:10:15.70
name:h07
The uptime and hostname get parsed correctly, but it seems to be skipping
"in" and putting "out" in the wrong place...
What am I missing?
This is mrtg 2.14.5.
Thanks,
Charles
More information about the mrtg
mailing list