From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/41661-check_disk.patch | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 web/attachments/41661-check_disk.patch (limited to 'web/attachments/41661-check_disk.patch') diff --git a/web/attachments/41661-check_disk.patch b/web/attachments/41661-check_disk.patch new file mode 100644 index 0000000..ef6ce3e --- /dev/null +++ b/web/attachments/41661-check_disk.patch @@ -0,0 +1,30 @@ +Index: check_disk.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v +retrieving revision 1.7 +diff -r1.7 check_disk.c +30a31,32 +> * - Modification by www.datux.nl 2003-01-24 +> * added performance data output +66a69,71 +> int perf_total_disk = 0; +> int perf_free_disk = 0; +> int perf_used_disk = 0; +98a104 +> /* did we get some usefull output from the 'df' process? */ +120a127,129 +> perf_total_disk+=total_disk; +> perf_free_disk+=free_disk; +> perf_used_disk+=used_disk; +150,151c159,166 +< 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)); -- cgit v1.2.3-74-g34f1