code: 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
      '''
      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 datf _execute_cmd(plugin, args='', run_type='cmd.retcode'):
      '''
      Execute nagios plugin if it's in the directory with salt command specified in run_type
      '''
      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
docs: Execute nagios plugin if it's in the directory with salt command specified in run_type