%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/modules/ |
Current File : //lib/python2.7/site-packages/salt/modules/nagios.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l m Z e j e � Z d Z d � Z d d d � Z d � Z d � Z d d � Z d d d � Z d d � Z d � Z d � Z d � Z d � Z d S( uA Run nagios plugins/checks from salt and get the return as data. i ( t absolute_importt print_functiont unicode_literalsN( t sixu /usr/lib/nagios/plugins/c C@ s t j j t � r d St d f S( u3 Only load if nagios-plugins are installed u nagiosuO The nagios execution module cannot be loaded: nagios-plugins are not installed.( t ost patht isdirt PLUGINDIRt False( ( ( s7 /usr/lib/python2.7/site-packages/salt/modules/nagios.pyt __virtual__ s u u cmd.retcodec C@ sG i } t � } | | k rC t | d j t | | � d t �} n | S( u` Execute nagios plugin if it's in the directory with salt command specified in run_type u {0}{1} {2}t python_shell( t list_pluginst __salt__t formatR R ( t plugint argst run_typet datat all_plugins( ( s7 /usr/lib/python2.7/site-packages/salt/modules/nagios.pyt _execute_cmd s c C@ s� t d | � } i } x� | D]� } i | | <| | } xq | D]i } t | t � ru t t j | � � } | | } n | } d } t | | � } | | | � | | | <q>