Improve the beacons index, fix log_beacon docs

This commit is contained in:
Max Arnold 2021-01-29 11:17:20 +07:00 committed by Megan Wilhite
parent dd40c41194
commit eabd759b30
4 changed files with 34 additions and 31 deletions

View file

@ -1,6 +1,7 @@
salt.beacons.log module
=======================
==============================
salt.beacons.log_beacon module
==============================
.. automodule:: salt.beacons.log
.. automodule:: salt.beacons.log_beacon
:members:
:undoc-members:

View file

@ -1,18 +1,21 @@
#
# Junos redundant routing engine beacon
#
# NOTE this beacon only works on the Juniper native minion
#
# Copies salt-minion keys to the backup RE when present
#
# Configure with
#
# beacon:
# beacons:
# junos_rre_keys:
# - interval: 43200
#
# `interval` above is in seconds, 43200 is recommended (every 12 hours)
"""
Junos redundant routing engine beacon.
NOTE this beacon only works on the Juniper native minion
Copies salt-minion keys to the backup RE when present
Configure with
.. code-block:: yaml
beacon:
beacons:
junos_rre_keys:
- interval: 43200
`interval` above is in seconds, 43200 is recommended (every 12 hours)
"""
__virtualname__ = "junos_rre_keys"

View file

@ -67,11 +67,11 @@ def beacon(config):
.. code-block:: yaml
beacons:
log:
- file: <path>
- tags:
<tag>:
regex: <pattern>
log:
- file: <path>
- tags:
<tag>:
regex: <pattern>
.. note::
@ -83,12 +83,13 @@ def beacon(config):
This is not the tag in the log.
.. code-block:: yaml
beacons:
log:
- file: /var/log/messages #path to log.
- tags:
goodbye/world: # tag added to beacon event tag.
regex: .*good-bye.* # match good-bye string anywhere in the log entry.
log:
- file: /var/log/messages #path to log.
- tags:
goodbye/world: # tag added to beacon event tag.
regex: .*good-bye.* # match good-bye string anywhere in the log entry.
"""
_config = {}
list(map(_config.update, config))

View file

@ -1,10 +1,8 @@
"""
watchdog beacon
Watch files and translate the changes into salt events.
.. versionadded:: 2019.2.0
Watch files and translate the changes into salt events
:depends: - watchdog Python module >= 0.8.3
"""