salt.beacons.log_beacon

Beacon to fire events at specific log messages.

New in version 2017.7.0.

salt.beacons.log_beacon.beacon(config)

Read the log file and return match whole string

beacons:
  log:
    - file: <path>
    - tags:
        <tag>:
          regex: <pattern>

Note

regex matching is based on the re module

The defined tag is added to the beacon event tag. This is not the tag in the log.

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.
salt.beacons.log_beacon.validate(config)

Validate the beacon configuration