From f9465dc9328dc68df6487a09605a191d736229e6 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Mon, 17 Jan 2011 15:14:22 +0100 Subject: [PATCH] Default check "global", fail with unknown check Signed-off-by: Sven Velt --- check_naf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/check_naf.py b/check_naf.py index 5f7b48d..bddbf8a 100755 --- a/check_naf.py +++ b/check_naf.py @@ -344,7 +344,7 @@ def main(): checks.append(tuple([check, target, quad[2], quad[3]])) if len(checks) == 0: - plugin.back2nagios(3, 'No check specified!') + checks = [('global','','','')] for quad in checks: (check, target, warn, crit) = tuple(quad) @@ -367,6 +367,9 @@ def main(): result = plugin.check_vol_inode(volume=target, warn=warn, crit=crit) elif check =='vol_files': result = plugin.check_vol_files(volume=target, warn=warn, crit=crit) + else: + result = plugin.remember_check(check, plugin.RETURNCODE['UNKNOWN'], 'Unknown check "' + check + '"!') + # from pprint import pprint # pprint(plugin.dump_brain())