diff options
Diffstat (limited to 'func/minion/modules/nagios-check.py')
-rw-r--r-- | func/minion/modules/nagios-check.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/func/minion/modules/nagios-check.py b/func/minion/modules/nagios-check.py index f1c0714..89f2c61 100644 --- a/func/minion/modules/nagios-check.py +++ b/func/minion/modules/nagios-check.py @@ -32,3 +32,21 @@ class Nagios(func_module.FuncModule): cmdref = sub_process.Popen(command.split(),stdout=sub_process.PIPE,stderr=sub_process.PIPE, shell=False) data = cmdref.communicate() return (cmdref.returncode, data[0], data[1]) + + def register_method_args(self): + """ + Implementing argument getter part + """ + + return{ + 'run':{ + 'args':{ + 'check_command':{ + 'type':'string', + 'optional':False, + 'description':"The command to be checked" + } + }, + 'description':"Runs a nagios check returning the return code" + } + } |