[mrtg] external command problems
spork at bway.net
Sun Apr 29 06:47:50 CEST 2007
On Thu, 26 Apr 2007, Steve Shipway wrote:
>> Sorry to be a nag, but does anyone have any ideas on this? The script
>> output appears valid to me - right now it just spits out two numbers
> Are you completely sure it is outputting
> (obviously \n is a newline)? Although lines 3&4 can be blank, they
> still need to exist. This might be the cause of the problems.
The output was fine... Apparently "0" always becomes "undef".
The reason my graphs weren't showing anything was that I had at some point
in my tinkering removed the "gauge" option. So mrtg was just sitting
there waiting for the number to increment (which it really won't by more
than a digit or two).
All is well now. That "undef" thing was really throwing me as I was
interpreting that as "your script fed me something I can't parse".
I tested with a simpler script that just spit out two digits, and that
showed me what was going on.
More information about the mrtg