NRPE Plug-in Development

Heiko Schlittermann hs at schlittermann.de
Sat Jan 5 00:07:15 CET 2008


Carlos Chiriboga Calderon <cchiriboga at palosanto.com> (Fr 04 Jan 2008 23:37:10 CET):
> First, i need express my excuses becouse my level of knowledge of english is very low.
> 
> Now, i'm writing a new plugin for get the bandwith used in a sample time,
> the program run fine but i cant make then the nagios read the result
> correctly.
> 
> the help of my program is this:
> 
> ************************
> **Check BandWidth 0.01**
> ************************
> 
> Usage:
> 
> check_bw -t <numeric_value> -wu <numeric_value> -wd <numeric_value> -cu
> <numeric_value> -cd <numeric_value> -if <network_interface>
> 
> Donde:
>         -t      Time of the sample
>         -wu     Minimal Value of up Bandwidth used for a Warning
>         -wd     Minimal Value of Down Bandwidth used for a Warning 
>         -cu     Minimal Value of up Bandwidth used for a Critical
>         -cd     Minimal Value of up Bandwidth used for a Critical
>         -if     Name of Network Interface.
> 
> In what format i need print the output?

Your plugin should have a proper exit code

    0 - ok
    1 - warning
    2 - critical
    3 - unknown

This is the main information, nagios uses. All the rest is just for
prosaic purposes :-)

To STDOUT you can write anything you want, it appears in the status
detail: 

    "OK - current bw: 17Mbit/s"

In case you want to enable some extended monitoring
(performance), you may output the performance data:

    "OK - current bw: 17Mbit/s|in:12 out:22"

There doesn't seem to be consens about the line end (at least I saw
plugins writing a new line and other don't.

BTW: I've written a shell based traffic checker - sampling over
the period it's called again. If you're interested - just for curiosity
- drop me a note :)

    Best regards from Dresden
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann HS12-RIPE -----------------------------------------
 gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
 gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080105/70ca023a/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
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


More information about the Users mailing list