def _execute_cmd(plugin, args='', run_type='cmd.retcode'):
 data = {}
 all_plugins = list_plugins()
 if (plugin in all_plugins):
  data = __salt__[run_type]('{0}{1} {2}'.format(PLUGINDIR, plugin, args), python_shell=False)
 return data

def _execute_cmd ( plugin , args = '' , run_type = 'cmd.retcode' ) : data = { } all_plugins = list_plugins ( ) if ( plugin in all_plugins ) : data = __salt__ [ run_type ] ( '{0}{1} {2}' . format ( PLUGINDIR , plugin , args ) , python_shell = False ) return data
execute nagios plugin if its in the directory with salt command specified in run_type .