Carlos Chiriboga Calderon <[EMAIL PROTECTED]> (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 -
signature.asc
Description: Digital signature
------------------------------------------------------------------------- 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/
_______________________________________________ Nagios-users mailing list Nagios-users@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