summaryrefslogtreecommitdiffstats
path: root/web/attachments/210121-check_disk.multiple_perfdata.patch
blob: bf2d265255e0244aac8d72a6b2c10e0dbba3f627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Index: plugins/check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.81
diff -u -r1.81 check_disk.c
--- plugins/check_disk.c	20 Dec 2006 19:25:59 -0000	1.81
+++ plugins/check_disk.c	7 Jan 2007 07:01:22 -0000
@@ -164,8 +164,8 @@
   double dfree_pct = -1, dused_pct = -1;
   double dused_units, dfree_units, dtotal_units;
   double dused_inodes_percent, dfree_inodes_percent;
-  double warning_high_tide = UINT_MAX;
-  double critical_high_tide = UINT_MAX;
+  double warning_high_tide;
+  double critical_high_tide;
   int temp_result;
 
   struct mount_entry *me;
@@ -300,6 +300,11 @@
          Hack here. Trying to get warn/crit levels from freespace_(units|percent) for perf
          data. Assumption that start=0. Roll on new syntax...
       */
+
+      /* *_high_tide must be reinitialized at each run */
+      warning_high_tide = UINT_MAX;
+      critical_high_tide = UINT_MAX;
+
       if (path->freespace_units->warning != NULL) {
         warning_high_tide = dtotal_units - path->freespace_units->warning->end;
       }