HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/monit.cpython-310.pyc
o

�N�gu
�@s dZdd�Zdd�Zdd�ZdS)af
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.
cCsdtvrdSdS)zJ
    Only make this state available if the monit module is available.
    �
monit.summaryZmonit)Fz monit module could not be loaded)�__salt__�rr�E/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/monit.py�__virtual__srcC��d|did�}td|�}zM|��D]E\}}d||vr(|�d�|d<d|d	<qtd
r=d|�d�|d<d|d	<|WStd
|�|�d�|d<d|d|<d|d	<W|SW|Styo|�d�|d<d|d	<Y|Sw)z~
    Get the summary from module monit and try to see if service is
    being monitored. If not then monitor the service.
    N���result�name�comment�changesrZRunningz is being being monitored.rTr	�test�Service z is set to be monitored.z
monit.monitorz started to be monitored.r� not found in configuration.F�r�itemsZ__opts__�KeyError�r
�retr	�key�valuerrr�monitor �0

��
�rcCr)z�
    Get the summary from module monit and try to see if service is
    being monitored. If it is then stop monitoring the service.
    Nrrrz
Not monitoredz is not being monitored.rTr	r
rz is set to be unmonitored.zmonit.unmonitorz stopped being monitored.rrFrrrrr�	unmonitor>rrN)�__doc__rrrrrrr�<module>s