%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/states/ |
Current File : //usr/lib/python2.7/site-packages/salt/states/monit.pyo |
� ���^c @@ sA d Z d d l m Z m Z m Z d � Z d � Z d � Z d S( uf Monit state =========== Manage monit states .. code-block:: yaml monit_enable_service_monitoring: monit.monitor: - name: service monit_disable_service_monitoring: monit.unmonitor: - name: service .. note:: Use of these states require that the :mod:`monit <salt.modules.monit>` execution module is available. i ( t absolute_importt print_functiont unicode_literalsc C@ s d t k r d St S( uJ Only make this state available if the monit module is available. u monit.summaryu monit( t __salt__t False( ( ( s5 /usr/lib/python2.7/site-packages/salt/states/monit.pyt __virtual__ s c C@ s i d d 6| d 6d d 6i d 6} t d | � } y� x� | j � D]� \ } } d | | k r~ d j | � | d <t | d <qB t d r� d j | � | d <d | d <| St d | � d j | � | d <d | d | <t | d <PqB WWn. t k rd j | � | d <t | d <n X| S( u~ Get the summary from module monit and try to see if service is being monitored. If not then monitor the service. u resultu nameu u commentu changesu monit.summaryu Runningu {0} is being being monitored.u testu# Service {0} is set to be monitored.u monit.monitoru {0} started to be monitored.u {0} not found in configuration.N( t NoneR t itemst formatt Truet __opts__t KeyErrorR ( t namet rett resultt keyt value( ( s5 /usr/lib/python2.7/site-packages/salt/states/monit.pyt monitor"