[nagiosplug] check_disk: get_fs_usage hasn't been run if using ...
"Nagios Plugin Development" <[email protected]> Tue, 17 Sep 2013 08:20:28 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug
Branch: master
Commit: 982cbeea0008c7dbbf670b2fa274115ee13556fb
Author: Sven Nierlein <[email protected]>
Committer: Sven Nierlein <[email protected]>
Date: Mon Sep 16 15:30:56 2013 +0200
URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=982cbee
check_disk: get_fs_usage hasn't been run if using groups
the reason why it still worked sometimes was fsu_blocks beeing uninitialized
which resulted in a true test sometimes.
---
plugins/check_disk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 47dc0ad..04d588f 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -263,11 +263,11 @@ main (int argc, char **argv)
} else if (fs_include_list && !np_find_name (fs_include_list, me->me_type)) {
continue;
}
-
- stat_path(path);
- get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
}
+ stat_path(path);
+ get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
+
if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) {
get_stats (path, &fsp);
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk