summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-06-26 23:33:49 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-06-26 23:33:49 (GMT)
commite85f4067779a1c60faff53754d879ca37d06b25e (patch)
tree5b9b4c99acfe19b997dec7843f21b86244f47ab2 /plugins
parentc7ce7bb6e22588aaa4243f4ad7c4b0961013664d (diff)
downloadmonitoring-plugins-e85f4067779a1c60faff53754d879ca37d06b25e.tar.gz
Fixed different thresholds if using exclude lists
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@558 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_disk.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 2b285d3..01b316b 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -242,13 +242,13 @@ main (int argc, char **argv)
242 free_space_pct = (float)fsp.fsu_bavail*100/fsp.fsu_blocks; 242 free_space_pct = (float)fsp.fsu_bavail*100/fsp.fsu_blocks;
243 total_space = (float)fsp.fsu_blocks*fsp.fsu_blocksize/mult; 243 total_space = (float)fsp.fsu_blocks*fsp.fsu_blocksize/mult;
244 if (disk_result!=STATE_OK || verbose>=0) 244 if (disk_result!=STATE_OK || verbose>=0)
245 asprintf (&output, "%s [%.0f %s (%2.0f%%) free on %s]", 245 asprintf (&output, "%s [%.0f %s (%.0f%%) free on %s]",
246 output, 246 output,
247 free_space, 247 free_space,
248 units, 248 units,
249 free_space_pct, 249 free_space_pct,
250 (!strcmp(file_system, "none") || display_mntp) ? me->me_devname : me->me_mountdir); 250 (!strcmp(file_system, "none") || display_mntp) ? me->me_devname : me->me_mountdir);
251 asprintf (&details, "%s\n%.0f of %.0f %s (%2.0f%%) free on %s (type %s mounted on %s) warn:%d crit:%d warn%%:%.0f%% crit%%:%.0f%%", 251 asprintf (&details, "%s\n%.0f of %.0f %s (%.0f%%) free on %s (type %s mounted on %s) warn:%d crit:%d warn%%:%.0f%% crit%%:%.0f%%",
252 details, 252 details,
253 free_space, 253 free_space,
254 total_space, 254 total_space,
@@ -553,10 +553,11 @@ walk_name_list (struct name_list *list, const char *name)
553 while (list) { 553 while (list) {
554 if (! strcmp(list->name, name)) { 554 if (! strcmp(list->name, name)) {
555 list->found = 1; 555 list->found = 1;
556 w_df = list->w_df; 556 /* if required for name_lists that have not saved w_df, etc (eg exclude lists) */
557 c_df = list->c_df; 557 if (list->w_df) w_df = list->w_df;
558 w_dfp = list->w_dfp; 558 if (list->c_df) c_df = list->c_df;
559 c_dfp = list->c_dfp; 559 if (list->w_dfp) w_dfp = list->w_dfp;
560 if (list->c_dfp) c_dfp = list->c_dfp;
560 return TRUE; 561 return TRUE;
561 } 562 }
562 list = list->name_next; 563 list = list->name_next;