check_mrtgtraf

Michael Hertrick m.hertrick at neovera.com
Thu May 12 16:29:44 CEST 2005



I was just working this very same issue yesterday.  Quite a coincidence.

The if/else logic was modified to accurately report OK and UNKNOWN 
status.  There is attached a diff for my check_mrtgtraf.c.

Also I changed 1024 to 1000 for converting the units because the numbers 
were closer to what the MRTG graphs reported.  Then again, I ain't a 
mathematician so you may want to keep yours at the original value of 1024.

There's one last fix in there for the performance data labels.  The 
"out" was mistakenly labeled "in".


~Mike.


Todd Richmond wrote:

> I have check_mrtgtraf checking the right log file and throwing 
> warnings and critical errors when it should but for some strange 
> reason when everything is running fine the pluging returns a status of 
> unknown.  I dont see in the plugin --help where i have to set an "ok" 
> value.
>
> here are the configs:
>
> pluging config
>
> # 'traffic_average' command definition
> define command{
>        command_name    traffic_average
>        command_line    /usr/lib/nagios/plugins/check_mrtgtraf $ARG1$ 
> 10 AVG -w $ARG2$ -c $ARG3$ $ARG4$ $ARG5$
>        }
>
>
> services.cfg
>
> check_command                 
> traffic_average!/var/www/lnm/mrtg/140.211.60.1.1.log!1000000,512000!1100000,612500 
>
>
>
> Todd Richmond
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when 
> reporting any issue. ::: Messages without supporting info will risk 
> being sent to /dev/null
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_mrtgtraf.diff
Type: text/x-patch
Size: 2753 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050512/f23496dc/attachment.bin>


More information about the Users mailing list