mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Updated some beacon-specific documentation formatting
This commit is contained in:
parent
5488c4aaa2
commit
f0778a0a60
6 changed files with 34 additions and 39 deletions
|
@ -30,17 +30,15 @@ def beacon(config):
|
|||
'''
|
||||
Monitor the disk usage of the minion
|
||||
|
||||
Specify thresholds for for each load average
|
||||
and only emit a beacon if any of them are
|
||||
Specify thresholds for each disk and only emit a beacon if any of them are
|
||||
exceeded.
|
||||
|
||||
code_block:: yaml
|
||||
|
||||
beacons:
|
||||
- diskusage:
|
||||
- /: 63%
|
||||
- /mnt/nfs: 50%
|
||||
|
||||
diskusage:
|
||||
- /: 63%
|
||||
- /mnt/nfs: 50%
|
||||
'''
|
||||
ret = []
|
||||
for diskusage in config:
|
||||
|
|
|
@ -5,8 +5,8 @@ Watch files and translate the changes into salt events
|
|||
:depends: - pyinotify Python module >= 0.9.5
|
||||
|
||||
:Caution: Using generic mask options like open, access, ignored, and
|
||||
: closed_nowrite with reactors can easily cause the reactor
|
||||
: to loop on itself.
|
||||
closed_nowrite with reactors can easily cause the reactor
|
||||
to loop on itself.
|
||||
|
||||
'''
|
||||
# Import Python libs
|
||||
|
|
|
@ -46,10 +46,10 @@ def beacon(config):
|
|||
.. code-block:: yaml
|
||||
|
||||
beacons:
|
||||
journald:
|
||||
sshd:
|
||||
SYSLOG_IDENTIFIER: sshd
|
||||
PRIORITY: 6
|
||||
journald:
|
||||
sshd:
|
||||
SYSLOG_IDENTIFIER: sshd
|
||||
PRIORITY: 6
|
||||
'''
|
||||
ret = []
|
||||
journal = _get_journal()
|
||||
|
|
|
@ -27,7 +27,7 @@ def beacon(config):
|
|||
'''
|
||||
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
|
||||
exceeded.
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ def beacon(config):
|
|||
'''
|
||||
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
|
||||
exceeded.
|
||||
|
||||
|
@ -49,33 +49,33 @@ def beacon(config):
|
|||
configured values.
|
||||
|
||||
beacons:
|
||||
network_info:
|
||||
eth0:
|
||||
- type: equal
|
||||
- bytes_sent: 100000
|
||||
- bytes_recv: 100000
|
||||
- packets_sent: 100000
|
||||
- packets_recv: 100000
|
||||
- errin: 100
|
||||
- errout: 100
|
||||
- dropin: 100
|
||||
- dropout: 100
|
||||
network_info:
|
||||
eth0:
|
||||
- type: equal
|
||||
- bytes_sent: 100000
|
||||
- bytes_recv: 100000
|
||||
- packets_sent: 100000
|
||||
- packets_recv: 100000
|
||||
- errin: 100
|
||||
- errout: 100
|
||||
- dropin: 100
|
||||
- dropout: 100
|
||||
|
||||
Emit beacon when any values are greater
|
||||
than to configured values.
|
||||
|
||||
beacons:
|
||||
network_info:
|
||||
eth0:
|
||||
- type: greater
|
||||
- bytes_sent: 100000
|
||||
- bytes_recv: 100000
|
||||
- packets_sent: 100000
|
||||
- packets_recv: 100000
|
||||
- errin: 100
|
||||
- errout: 100
|
||||
- dropin: 100
|
||||
- dropout: 100
|
||||
network_info:
|
||||
eth0:
|
||||
- type: greater
|
||||
- bytes_sent: 100000
|
||||
- bytes_recv: 100000
|
||||
- packets_sent: 100000
|
||||
- packets_recv: 100000
|
||||
- errin: 100
|
||||
- errout: 100
|
||||
- dropin: 100
|
||||
- dropout: 100
|
||||
|
||||
|
||||
'''
|
||||
|
|
|
@ -24,7 +24,6 @@ def beacon(config):
|
|||
salt-master:
|
||||
mysql:
|
||||
|
||||
|
||||
The config above sets up beacons to check for
|
||||
the salt-master and mysql services.
|
||||
|
||||
|
@ -53,8 +52,6 @@ def beacon(config):
|
|||
nginx:
|
||||
onchangeonly: True
|
||||
uncleanshutdown: /run/nginx.pid
|
||||
|
||||
|
||||
'''
|
||||
ret = []
|
||||
for service in config:
|
||||
|
|
Loading…
Add table
Reference in a new issue