Only in nagios-plugins-1.3.0/plugins: Makefile Only in nagios-plugins-1.3.0/plugins: check_by_ssh Only in nagios-plugins-1.3.0/plugins: check_by_ssh.o Only in nagios-plugins-1.3.0/plugins: check_dig Only in nagios-plugins-1.3.0/plugins: check_dig.o Only in nagios-plugins-1.3.0/plugins: check_disk diff -u nagios-plugins-1.3.0-orig/plugins/check_disk.c nagios-plugins-1.3.0/plugins/check_disk.c --- nagios-plugins-1.3.0-orig/plugins/check_disk.c 2003-02-15 13:48:44.000000000 +0100 +++ nagios-plugins-1.3.0/plugins/check_disk.c 2003-05-20 12:51:58.000000000 +0200 @@ -28,6 +28,8 @@ * initailize usp to -1, eliminate 'found' variable * accept any filename/filesystem * use sscanf, drop while loop + * - Modification by www.datux.nl 2003-01-24 + * added performance data output * *****************************************************************************/ @@ -64,6 +66,9 @@ int total_disk = -1; int used_disk = -1; int free_disk = -1; + int perf_total_disk = 0; + int perf_free_disk = 0; + int perf_used_disk = 0; int result = STATE_UNKNOWN; int disk_result = STATE_UNKNOWN; char *command_line = ""; @@ -96,6 +101,7 @@ if (!index (input_buffer, '/')) continue; + /* did we get some usefull output from the 'df' process? */ if (sscanf (input_buffer, "%s %d %d %d %d%% %s", file_system, &total_disk, &used_disk, &free_disk, &usp, mntp) == 6 || sscanf (input_buffer, "%s %*s %d %d %d %d%% %s", file_system, @@ -118,6 +124,9 @@ free_disk, 100 - usp, display_mntp ? mntp : file_system); result = max_state (result, disk_result); + perf_total_disk+=total_disk; + perf_free_disk+=free_disk; + perf_used_disk+=used_disk; } else { @@ -147,8 +156,14 @@ else if (result == STATE_UNKNOWN) printf ("Unable to read output\n%s\n%s\n", command_line, input_buffer); else - printf ("DISK %s%s\n", state_text (result), output); - + printf ("DISK %s%s|total=%d,used=%d,free=%d,used_perc=%f,free_perc=%f\n", + state_text (result), + output, + perf_total_disk, + perf_used_disk, + perf_free_disk, + 100-((float)perf_free_disk*100/(float)perf_total_disk), + ((float)perf_free_disk*100/(float)perf_total_disk)); return result; } Only in nagios-plugins-1.3.0/plugins: check_disk.o Only in nagios-plugins-1.3.0/plugins: check_dns Only in nagios-plugins-1.3.0/plugins: check_dns.o Only in nagios-plugins-1.3.0/plugins: check_dummy Only in nagios-plugins-1.3.0/plugins: check_dummy.o Only in nagios-plugins-1.3.0/plugins: check_ftp Only in nagios-plugins-1.3.0/plugins: check_http diff -u nagios-plugins-1.3.0-orig/plugins/check_http.c nagios-plugins-1.3.0/plugins/check_http.c --- nagios-plugins-1.3.0-orig/plugins/check_http.c 2003-02-22 08:22:02.000000000 +0100 +++ nagios-plugins-1.3.0/plugins/check_http.c 2003-05-20 12:51:58.000000000 +0200 @@ -21,6 +21,9 @@ * * $Id: check_http.c,v 1.24 2003/02/21 21:59:17 tonvoon Exp $ * + * Sun Feb 9 17:11:53 CET 2003 Modified by Edwin Eefting (edwin@datux.nl) + * fixed performance data: no spaces please :) + * *****************************************************************************/ const char *progname = "check_http"; @@ -795,7 +798,7 @@ else if (onredirect == STATE_CRITICAL) printf ("HTTP CRITICAL"); elapsed_time = delta_time (tv); - asprintf (&msg, ": %s - %7.3f second response time %s%s|time=%7.3f\n", + asprintf (&msg, ": %s - %7.3f second response time %s%s|time=%f\n", status_line, elapsed_time, timestamp, (display_html ? "" : ""), elapsed_time); terminate (onredirect, msg); @@ -807,7 +810,7 @@ /* check elapsed time */ elapsed_time = delta_time (tv); - asprintf (&msg, "HTTP problem: %s - %7.3f second response time %s%s|time=%7.3f\n", + asprintf (&msg, "HTTP problem: %s - %7.3f second response time %s%s|time=%f\n", status_line, elapsed_time, timestamp, (display_html ? "" : ""), elapsed_time); if (check_critical_time == TRUE && elapsed_time > critical_time) @@ -835,14 +838,14 @@ if (strlen (regexp)) { errcode = regexec (&preg, page, REGS, pmatch, 0); if (errcode == 0) { - printf ("HTTP ok: %s - %7.3f second response time %s%s|time=%7.3f\n", + printf ("HTTP ok: %s - %7.3f second response time %s%s|time=%f\n", status_line, elapsed_time, timestamp, (display_html ? "" : ""), elapsed_time); exit (STATE_OK); } else { if (errcode == REG_NOMATCH) { - printf ("HTTP CRITICAL: pattern not found%s|time=%7.3f\n", + printf ("HTTP CRITICAL: pattern not found%s|time=%f\n", (display_html ? "" : ""), elapsed_time); exit (STATE_CRITICAL); } @@ -856,7 +859,7 @@ #endif /* We only get here if all tests have been passed */ - asprintf (&msg, "HTTP ok: %s - %7.3f second response time %s%s|time=%7.3f\n", + asprintf (&msg, "HTTP ok: %s - %7.3f second response time %s%s|time=%f\n", status_line, (float)elapsed_time, timestamp, (display_html ? "" : ""), elapsed_time); terminate (STATE_OK, msg); Only in nagios-plugins-1.3.0/plugins: check_http.c.rej Only in nagios-plugins-1.3.0/plugins: check_http.c~ Only in nagios-plugins-1.3.0/plugins: check_http.o Only in nagios-plugins-1.3.0/plugins: check_imap Only in nagios-plugins-1.3.0/plugins: check_load diff -u nagios-plugins-1.3.0-orig/plugins/check_load.c nagios-plugins-1.3.0/plugins/check_load.c --- nagios-plugins-1.3.0-orig/plugins/check_load.c 2003-02-18 23:16:06.000000000 +0100 +++ nagios-plugins-1.3.0/plugins/check_load.c 2003-05-20 12:51:58.000000000 +0200 @@ -19,6 +19,9 @@ * mods by Ethan Galstad (nagios@nagios.org) * 08/18/1999 - Integrated some code with common plugin utilities * mods by Ethan Galstad (nagios@nagios.org) + * 20/01/2003 - Now returns performance data + * mods by Edwin Eefting (www.DatuX.nl) + * * $Date: 2003/02/18 22:10:55 $ * Note: The load format is the same used by "uptime" and "w" * @@ -139,6 +142,10 @@ } if ((la1 >= wload1) || (la5 >= wload5) || (la15 >= wload15)) { printf ("WARNING - %s\n", status_line); + + /* performance data */ + printf ("|load1=%.2f,load5=%.2f,load15=%.2f", la1, la5, la15); + return STATE_WARNING; } printf ("OK - %s\n", status_line); Only in nagios-plugins-1.3.0/plugins: check_load.o Only in nagios-plugins-1.3.0/plugins: check_mrtg Only in nagios-plugins-1.3.0/plugins: check_mrtg.o Only in nagios-plugins-1.3.0/plugins: check_mrtgtraf Only in nagios-plugins-1.3.0/plugins: check_mrtgtraf.o Only in nagios-plugins-1.3.0/plugins: check_mysql Only in nagios-plugins-1.3.0/plugins: check_mysql.o Only in nagios-plugins-1.3.0/plugins: check_nagios Only in nagios-plugins-1.3.0/plugins: check_nagios.o Only in nagios-plugins-1.3.0/plugins: check_nntp Only in nagios-plugins-1.3.0/plugins: check_nt Only in nagios-plugins-1.3.0/plugins: check_nt.o Only in nagios-plugins-1.3.0/plugins: check_nwstat Only in nagios-plugins-1.3.0/plugins: check_nwstat.o Only in nagios-plugins-1.3.0/plugins: check_overcr Only in nagios-plugins-1.3.0/plugins: check_overcr.o Only in nagios-plugins-1.3.0/plugins: check_ping diff -u nagios-plugins-1.3.0-orig/plugins/check_ping.c nagios-plugins-1.3.0/plugins/check_ping.c --- nagios-plugins-1.3.0-orig/plugins/check_ping.c 2003-02-15 13:48:45.000000000 +0100 +++ nagios-plugins-1.3.0/plugins/check_ping.c 2003-05-20 12:51:58.000000000 +0200 @@ -8,6 +8,10 @@ * * $Id: check_ping.c,v 1.11 2003/01/13 12:15:16 kdebisschop Exp $ * +* updated Mon Jan 20 19:03:57 CET 2003 by Edwin Eefting (DatuX.nl) +* -minor bugfixes +* -now returns performance data +* *****************************************************************************/ const char *progname = "check_ping"; @@ -18,7 +22,7 @@ #define SUMMARY "Use ping to check connection statistics for a remote host.\n" #define OPTIONS "\ --H -w ,%% -c ,%%\n\ +-H -w ,% -c ,%\n\ [-p packets] [-t timeout] [-L]\n" #define LONGOPTIONS "\ @@ -135,14 +139,19 @@ state_text (result), warn_text, pl, rta); if (display_html == TRUE) printf (""); - printf ("\n"); + + /* print performance data */ + printf("|loss=%d",pl); + if (pl != 100) + printf(",rta=%f",rta); + printf("\n"); if (verbose) printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); return result; } - + /* process command-line arguments */ int @@ -340,7 +349,7 @@ if (max_packets == -1) max_packets = DEFAULT_MAX_PACKETS; - max_seconds = crta / 1000.0 * max_packets + max_packets; + max_seconds = crta / 1000.0 * max_packets + max_packets + 10; if (max_seconds > timeout_interval) timeout_interval = (int)max_seconds; Only in nagios-plugins-1.3.0/plugins: check_ping.o Only in nagios-plugins-1.3.0/plugins: check_pop Only in nagios-plugins-1.3.0/plugins: check_procs diff -u nagios-plugins-1.3.0-orig/plugins/check_procs.c nagios-plugins-1.3.0/plugins/check_procs.c --- nagios-plugins-1.3.0-orig/plugins/check_procs.c 2003-02-15 13:48:45.000000000 +0100 +++ nagios-plugins-1.3.0/plugins/check_procs.c 2003-05-20 12:51:58.000000000 +0200 @@ -32,6 +32,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * +* feb-9-2003 modified by Edwin Eefting (www.DatuX.nl) edwin@datux.nl +* returns performance data +* ******************************************************************************/ const char *progname = "check_procs"; @@ -197,6 +200,9 @@ return result; } + //add performance data to "format string" + asprintf(&fmt,"%s|procs=%d\n",fmt,procs); + if (verbose && (options & STAT)) printf ("%s ", statopts); if (verbose && (options & PROG)) @@ -427,6 +433,7 @@ options |= STAT; } + return validate_arguments (); } @@ -457,10 +464,10 @@ if (options == 0) { options = 1; - asprintf (&fmt, "%%s - %%d processes running\n"); + asprintf (&fmt, "%%s - %%d processes running"); } else { - asprintf (&fmt, "%%s - %%d processes running with %s\n", fmt); + asprintf (&fmt, "%%s - %%d processes running with %s", fmt); } return options; Only in nagios-plugins-1.3.0/plugins: check_procs.o Only in nagios-plugins-1.3.0/plugins: check_real Only in nagios-plugins-1.3.0/plugins: check_real.o Only in nagios-plugins-1.3.0/plugins: check_smtp Only in nagios-plugins-1.3.0/plugins: check_smtp.o Only in nagios-plugins-1.3.0/plugins: check_ssh Only in nagios-plugins-1.3.0/plugins: check_ssh.o Only in nagios-plugins-1.3.0/plugins: check_swap diff -u nagios-plugins-1.3.0-orig/plugins/check_swap.c nagios-plugins-1.3.0/plugins/check_swap.c --- nagios-plugins-1.3.0-orig/plugins/check_swap.c 2003-02-18 06:35:52.000000000 +0100 +++ nagios-plugins-1.3.0/plugins/check_swap.c 2003-05-20 14:02:11.000000000 +0200 @@ -23,6 +23,9 @@ * * $Id: check_swap.c,v 1.9 2003/02/18 03:46:15 sghosh Exp $ * + * feb 9 2003 - Modified by Edwin Eefting (www.DatuX.nl) edwin@datux.nl + * Returns performance data + * *****************************************************************************/ #include "common.h" @@ -51,7 +54,7 @@ int main (int argc, char **argv) { - int percent_used, percent; + float percent_used, percent; long unsigned int total_swap = 0, used_swap = 0, free_swap = 0; long unsigned int total, used, free; int result = STATE_OK; @@ -93,8 +96,8 @@ result = max_state (STATE_CRITICAL, result); else if (percent_used >= warn_percent || free_swap <= warn_size) result = max_state (STATE_WARNING, result); - asprintf (&status, "%s %2d%% (%lu out of %lu)", status, percent_used, - used_swap, total_swap); + asprintf (&status, "%s %2.0f%% (%lu out of %lu)|user_perc=%f,user=%d,total=%d", status, percent_used, + used_swap, total_swap, percent_used, used_swap, total_swap); fclose (fp); #else #ifdef HAVE_SWAP @@ -146,8 +149,8 @@ result = max_state (STATE_CRITICAL, result); else if (percent_used >= warn_percent || free_swap <= warn_size) result = max_state (STATE_WARNING, result); - asprintf (&status, "%s %2d%% (%lu out of %lu)", - status, percent_used, used_swap, total_swap); + asprintf (&status, "%s %2.0f%% (%lu out of %lu)|used_perc=%f,user=%d,total=%d", + status, percent_used, used_swap, total_swap, percent_used, used_swap, total_swap); /* If we get anything on STDERR, at least set warning */ while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) Only in nagios-plugins-1.3.0/plugins: check_swap.c.rej Only in nagios-plugins-1.3.0/plugins: check_swap.c~ Only in nagios-plugins-1.3.0/plugins: check_swap.o Only in nagios-plugins-1.3.0/plugins: check_tcp Only in nagios-plugins-1.3.0/plugins: check_tcp.o Only in nagios-plugins-1.3.0/plugins: check_time Only in nagios-plugins-1.3.0/plugins: check_time.o Only in nagios-plugins-1.3.0/plugins: check_udp Only in nagios-plugins-1.3.0/plugins: check_udp.o Only in nagios-plugins-1.3.0/plugins: check_ups Only in nagios-plugins-1.3.0/plugins: check_ups.o Only in nagios-plugins-1.3.0/plugins: check_users diff -u nagios-plugins-1.3.0-orig/plugins/check_users.c nagios-plugins-1.3.0/plugins/check_users.c --- nagios-plugins-1.3.0-orig/plugins/check_users.c 2003-02-15 13:48:46.000000000 +0100 +++ nagios-plugins-1.3.0/plugins/check_users.c 2003-05-20 12:51:58.000000000 +0200 @@ -42,6 +42,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * + * feb-9-2003 modified by Edwin Eefting (www.DatuX.nl) edwin@datux.nl + * returns performance data + * *****************************************************************************/ #include "common.h" @@ -120,8 +123,8 @@ if (result == STATE_UNKNOWN) printf ("Unable to read output\n"); else - printf ("USERS %s - %d users currently logged in\n", state_text (result), - users); + printf ("USERS %s - %d users currently logged in|users=%d\n", state_text (result), + users,users); return result; } Only in nagios-plugins-1.3.0/plugins: check_users.o Only in nagios-plugins-1.3.0/plugins: check_vsz Only in nagios-plugins-1.3.0/plugins: check_vsz.o Only in nagios-plugins-1.3.0/plugins: common.h Only in nagios-plugins-1.3.0/plugins: config.h Only in nagios-plugins-1.3.0/plugins: negate Only in nagios-plugins-1.3.0/plugins: negate.o Only in nagios-plugins-1.3.0/plugins: netutils.h Only in nagios-plugins-1.3.0/plugins: netutils.o Only in nagios-plugins-1.3.0/plugins: perf.patch Only in nagios-plugins-1.3.0/plugins: popen.h Only in nagios-plugins-1.3.0/plugins: popen.o Only in nagios-plugins-1.3.0/plugins: stamp-h1 Only in nagios-plugins-1.3.0/plugins: stamp-h2 Only in nagios-plugins-1.3.0/plugins: stamp-h3 Only in nagios-plugins-1.3.0/plugins: stamp-h4 Only in nagios-plugins-1.3.0/plugins: stamp-h5 Only in nagios-plugins-1.3.0/plugins: stamp-h6 Common subdirectories: nagios-plugins-1.3.0-orig/plugins/t and nagios-plugins-1.3.0/plugins/t Only in nagios-plugins-1.3.0/plugins: urlize Only in nagios-plugins-1.3.0/plugins: urlize.o Only in nagios-plugins-1.3.0/plugins: utils.h Only in nagios-plugins-1.3.0/plugins: utils.o Only in nagios-plugins-1.3.0/plugins: version.h