mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
commit
f104bc786b
@ -25,7 +25,7 @@ def __virtual__():
|
||||
return False
|
||||
|
||||
|
||||
def _execute_cmd(plugin, args='', run_type='cmd.retcode', key_name=None):
|
||||
def _execute_cmd(plugin, args='', run_type='cmd.retcode'):
|
||||
'''
|
||||
Execute nagios plugin if it's in the directory with salt command specified in run_type
|
||||
'''
|
||||
@ -88,7 +88,7 @@ def run(plugin, args='', key_name=None):
|
||||
Run nagios plugin and return all the data execution with cmd.run
|
||||
|
||||
'''
|
||||
data = _execute_cmd(plugin, args, 'cmd.run', key_name)
|
||||
data = _execute_cmd(plugin, args, 'cmd.run')
|
||||
|
||||
return data
|
||||
|
||||
@ -112,7 +112,7 @@ def retcode(plugin, args='', key_name=None):
|
||||
|
||||
data[key_name] = {}
|
||||
|
||||
status = _execute_cmd(plugin, args, 'cmd.retcode', key_name)
|
||||
status = _execute_cmd(plugin, args, 'cmd.retcode')
|
||||
data[key_name]['status'] = status
|
||||
|
||||
return data
|
||||
@ -122,7 +122,7 @@ def run_all(plugin, args='', key_name=None):
|
||||
'''
|
||||
Run nagios plugin and return all the data execution with cmd.run_all
|
||||
'''
|
||||
data = _execute_cmd(plugin, args, 'cmd.run_all', key_name)
|
||||
data = _execute_cmd(plugin, args, 'cmd.run_all')
|
||||
return data
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user