%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/modules/ |
Current File : //lib/python2.7/site-packages/salt/modules/monit.pyc |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z i d d 6d d 6Z d � Z d � Z d � Z d � Z d � Z d � Z d d � Z d d � Z d � Z d � Z d � Z e d � Z d � Z d S( uM Monit service module. This module will create a monit type service watcher. i ( t absolute_importt print_functiont unicode_literalsNu idu id_u reloadu reload_c C@ s) t j j j d � d k r t St d f S( Nu monituQ The monit execution module cannot be loaded: the monit binary is not in the path.( t saltt utilst patht whicht Nonet Truet False( ( ( s6 /usr/lib/python2.7/site-packages/salt/modules/monit.pyt __virtual__ s c C@ s$ d j | � } t d | d t �S( u^ CLI Example: .. code-block:: bash salt '*' monit.start <service name> u monit start {0}u cmd.retcodet python_shell( t formatt __salt__R ( t namet cmd( ( s6 /usr/lib/python2.7/site-packages/salt/modules/monit.pyt start s c C@ s$ d j | � } t d | d t �S( uy Stops service via monit CLI Example: .. code-block:: bash salt '*' monit.stop <service name> u monit stop {0}u cmd.retcodeR ( R R R ( R R ( ( s6 /usr/lib/python2.7/site-packages/salt/modules/monit.pyt stop* s c C@ s$ d j | � } t d | d t �S( u~ Restart service via monit CLI Example: .. code-block:: bash salt '*' monit.restart <service name> u monit restart {0}u cmd.retcodeR ( R R R ( R R ( ( s6 /usr/lib/python2.7/site-packages/salt/modules/monit.pyt restart9 s c C@ s$ d j | � } t d | d t �S( u� Unmonitor service via monit CLI Example: .. code-block:: bash salt '*' monit.unmonitor <service name> u monit unmonitor {0}u cmd.retcodeR ( R R R ( R R ( ( s6 /usr/lib/python2.7/site-packages/salt/modules/monit.pyt unmonitorH s c C@ s$ d j | � } t d | d t �S( u~ monitor service via monit CLI Example: .. code-block:: bash salt '*' monit.monitor <service name> u monit monitor {0}u cmd.retcodeR ( R R R ( R R ( ( s6 /usr/lib/python2.7/site-packages/salt/modules/monit.pyt monitorW s u c C@ s i } d } t d | � j � } x� | D]� } d | k rN t d d d t � S| s) | | k s) d | k rs q) q) | j d � } t | � d k r) | d j � | d | d j � } } } | d k r� | | k r� q) n | | k r� i | | <n | | | | <q) q) W| S( u� Display a summary from monit CLI Example: .. code-block:: bash salt '*' monit.summary salt '*' monit.summary <service name> u monit summaryu cmd.runu daemon is not runningt monitt resultu The Monit daemonu 'i i i i u ( R t splitlinest dictR t splitt lent strip( t svc_namet retR t rest linet partst resourceR t status_( ( s6 /usr/lib/python2.7/site-packages/salt/modules/monit.pyt summaryf s"