Updated some beacon-specific documentation formatting

This commit is contained in:
Christer Edwards 2015-05-24 20:57:06 -06:00
parent 7646cb16ea
commit 4552e6eb7b
7 changed files with 34 additions and 40 deletions

View File

@ -41,17 +41,15 @@ def beacon(config):
''' '''
Monitor the disk usage of the minion Monitor the disk usage of the minion
Specify thresholds for for each load average Specify thresholds for each disk and only emit a beacon if any of them are
and only emit a beacon if any of them are
exceeded. exceeded.
.. code-block:: yaml .. code-block:: yaml
beacons: beacons:
diskusage: diskusage:
- /: 63% - /: 63%
- /mnt/nfs: 50% - /mnt/nfs: 50%
''' '''
ret = [] ret = []
for diskusage in config: for diskusage in config:

View File

@ -5,8 +5,8 @@ Watch files and translate the changes into salt events
:depends: - pyinotify Python module >= 0.9.5 :depends: - pyinotify Python module >= 0.9.5
:Caution: Using generic mask options like open, access, ignored, and :Caution: Using generic mask options like open, access, ignored, and
: closed_nowrite with reactors can easily cause the reactor closed_nowrite with reactors can easily cause the reactor
: to loop on itself. to loop on itself.
''' '''
# Import Python libs # Import Python libs

View File

@ -70,10 +70,10 @@ def beacon(config):
.. code-block:: yaml .. code-block:: yaml
beacons: beacons:
journald: journald:
sshd: sshd:
SYSLOG_IDENTIFIER: sshd SYSLOG_IDENTIFIER: sshd
PRIORITY: 6 PRIORITY: 6
''' '''
ret = [] ret = []
journal = _get_journal() journal = _get_journal()

View File

@ -66,7 +66,7 @@ def beacon(config):
''' '''
Emit the load averages of this host. Emit the load averages of this host.
Specify thresholds for for each load average Specify thresholds for each load average
and only emit a beacon if any of them are and only emit a beacon if any of them are
exceeded. exceeded.

View File

@ -68,7 +68,7 @@ def beacon(config):
''' '''
Emit the network statistics of this host. Emit the network statistics of this host.
Specify thresholds for for each network stat Specify thresholds for each network stat
and only emit a beacon if any of them are and only emit a beacon if any of them are
exceeded. exceeded.
@ -78,17 +78,17 @@ def beacon(config):
.. code-block:: yaml .. code-block:: yaml
beacons: beacons:
network_info: network_info:
eth0: eth0:
- type: equal - type: equal
- bytes_sent: 100000 - bytes_sent: 100000
- bytes_recv: 100000 - bytes_recv: 100000
- packets_sent: 100000 - packets_sent: 100000
- packets_recv: 100000 - packets_recv: 100000
- errin: 100 - errin: 100
- errout: 100 - errout: 100
- dropin: 100 - dropin: 100
- dropout: 100 - dropout: 100
Emit beacon when any values are greater Emit beacon when any values are greater
than to configured values. than to configured values.
@ -96,17 +96,17 @@ def beacon(config):
.. code-block:: yaml .. code-block:: yaml
beacons: beacons:
network_info: network_info:
eth0: eth0:
- type: greater - type: greater
- bytes_sent: 100000 - bytes_sent: 100000
- bytes_recv: 100000 - bytes_recv: 100000
- packets_sent: 100000 - packets_sent: 100000
- packets_recv: 100000 - packets_recv: 100000
- errin: 100 - errin: 100
- errout: 100 - errout: 100
- dropin: 100 - dropin: 100
- dropout: 100 - dropout: 100
''' '''

View File

@ -36,7 +36,6 @@ def beacon(config):
salt-master: running salt-master: running
mysql: stopped mysql: stopped
The config above sets up beacons to check that The config above sets up beacons to check that
processes are running or stopped. processes are running or stopped.
''' '''

View File

@ -38,7 +38,6 @@ def beacon(config):
salt-master: salt-master:
mysql: mysql:
The config above sets up beacons to check for The config above sets up beacons to check for
the salt-master and mysql services. the salt-master and mysql services.
@ -67,8 +66,6 @@ def beacon(config):
nginx: nginx:
onchangeonly: True onchangeonly: True
uncleanshutdown: /run/nginx.pid uncleanshutdown: /run/nginx.pid
''' '''
ret = [] ret = []
for service in config: for service in config: