%PDF- %PDF-
| Direktori : /proc/thread-self/root/proc/3522530/root/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/thread-self/root/proc/3522530/root/lib/python2.7/site-packages/salt/states/uptime.pyo |
�
���^c @@ s8 d Z d d l m Z m Z m Z d � Z d � Z d S( u�
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
i ( t absolute_importt print_functiont unicode_literalsc C@ s
d t k S( u3
Only load if the uptime module is present
u uptime.checks_list( t __salt__( ( ( s6 /usr/lib/python2.7/site-packages/salt/states/uptime.pyt __virtual__( s c K@ s
i | d 6i d 6d d 6d d 6} t d d | � r` t | d <d j | � | d <i | d <| St d s� t d
| | � } | r� t | d <d } | j | � | d <i | d 6| d <q t | d <d
j | � | d <i | d <n% d } | j d d d | j | � � | S( uq
Makes sure an URL is monitored by uptime. Checks if URL is already
monitored, and if not, adds it.
u nameu changesu resultu u commentu uptime.check_existst nameu URL {0} is already monitoredu testu
uptime.createu( Successfully added the URL {0} to uptimeu
url_monitoredu Failed to add {0} to uptimeu&