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__/uptime.cpython-310.pyc
o

�N�gl�@sdZdd�Zdd�ZdS)a�
Monitor Web Server with Uptime
==============================

`Uptime <https://github.com/fzaninotto/uptime>`_ is an open source
remote monitoring application using Node.js, MongoDB, and Twitter
Bootstrap.

.. warning::

    This state module is beta. It might be changed later to include
    more or less automation.

.. note::

    This state module requires a pillar to specify the location of
    your uptime install

    .. code-block:: yaml

        uptime:
          application_url: "http://uptime-url.example.org"

Example:

.. code-block:: yaml

    url:
      uptime.monitored
    url/sitemap.xml:
      uptime.monitored:
         - polling: 600 # every hour

cCsdtvrdSdS)z3
    Only load if the uptime module is present
    zuptime.checks_listT)Fz!uptime module could not be loaded)�__salt__�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/uptime.py�__virtual__%srcKs�|iddd�}td|d�r d|d<d|�d	�|d
<i|d<|StdsWtd
|fi|��}|rEd|d<d}|�|�|d
<d|i|d<|Sd|d<d|�d�|d
<i|d<|Sd}|jd|�|�d�|S)zq
    Makes sure an URL is monitored by uptime. Checks if URL is already
    monitored, and if not, adds it.

    N�)�name�changes�result�commentzuptime.check_exists)rTrzURL z is already monitoredr	r�testz
uptime.createz(Successfully added the URL {0} to uptime�
url_monitoredFzFailed to add z
 to uptimez&URL {0} is going to be added to uptime)rr	)rZ__opts__�format�update)r�params�retr�msgrrr�	monitored.s*��rN)�__doc__rrrrrr�<module>s$