On Mon, 2005-07-18 at 14:54 +0200, Frederik Vanhee wrote:
> Hello,
>
> I'm doing some experiments with performance data, but experience some
> strange behaviour
> I have a plugin 'check_iftraffic.pl' that returns this :
>
> Total RX Bytes : 145.74 MB, Total TX Bytes: 242,75 MB, Average Traffic:
> 2,89 kB/s (0,0%) in, 6,25 kB/s (0,0%) out | inUsage=0.0,85,98
> outUsage=0.0,85,98
>
> In nagios.cfg, I put 'process_performance_data=1'
> So I expect that Nagios splits the plugin output in two Macros :
> The text before the | should be the service output and the text after
> the | should be recognized as performance data
>
> $SERVICEOUTPUT$=Total RX Bytes : 145.74 MB, Total TX Bytes: 242,75 MB,
> Average Traffic: 2,89 kB/s (0,0%) in, 6,25 kB/s (0,0%) out
> $SERVICEPERFDATA$=inUsage=0.0,85,98 outUsage=0.0,85,98
>
> Instead of what I expect, Nagios drops the text before the | and the
> text after the | is treated as the plugin output, so in my status-cgi's,
> I get :
>
> inUsage=0.0,85,98 outUsage=0.0,85,98
>
> and I don't get any performance data.
>
> I thought it had something to do with an illegal character, this is what
> I have in nagios.cfg :
> illegal_macro_output_chars=`~$&|'"<>
>
>
> Any hints ?
> Apart from perfparse, what programs are you using to interpret
> performance data ?
>
> Thanks,
> Frederik
>
http://nagiosplug.sourceforge.net/developer-guidelines.html
You should use semicolons instead of commas as the delimiter. Also, make
sure you are returning the values in the correct order.
<snip from page>
'label'=value[UOM];[warn];[crit];[min];[max]
</snip>
Hope this gets you going,
-g
--
// Garrett Honeycutt
// Sr. Systems Administrator
// 3GUpload.com, Inc.
// 317.472.4969 Office
|