Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated notes for watchdog design

...

Action NameDescription
log.logtype()Log the event to a file, as plain text or in JSON format
script.scriptname()Execute a user-defined script, possibly capturing the output
escalate.policyname()Mark this event for escalation using a particular escalation policy
email(contactname)Email the event details to a particular contact
syslog.targetserver(prio)Send the event as Syslog message to a Syslog server,
optionally overriding the event priority
nmissyslog.targetserver(prio)Send the event as Syslog message to an NMIS Syslog server,
in the format expected by NMIS
priority(adjustment)Change the priority of the event
Adjustment can be a number between 0 and 10 for fixed assignment, or +number or -number for relative adjustment.
tag.tagname(value)Set a custom event property's value for static enrichment.
Tagname is the name of the property to modify and must be a single string without spaces. Values are not restricted. Be careful not to overwrite properties that opEvents uses internally.
watchdog.set(waittime)
watchdog.disable()
Creates or updates a watchdog timer for the node associated with the current event. The timer is set to expire in waittime seconds from now. If the timer is not disabled or updated before the expiration time, then a synthetic event named "Watchdog Timer expired" is generated. Note that all four watchdog actions are disabled if the current event itself is a watchdog expiration event.
element_watchdog.set(waittime)
element_watchdog.disable()
Similar to the  previous, but for watchdog timers that are specific to both the node and the element (e.g. an interface) of the current event. Element watchdog timers are independent of node watchdogs and of each other: Updating or disabling an element watchdog for say, eth1 doesn't affect a timer for lo0 for the same node.

Notes for watchdog and element_watchdog

The watchdog timer system does require a priming event to establish the timer in the first place, and if a timer is disabled using watchdog.disable() it is completely removed and forgotten.

The consequence of this design is that newly added nodes or elements are not subject to any watchdog timers until opEvent receives an event that causes the watchdog creation. This is normally not a problem, unless such a new node is not creating events because it is down for example. To create watchdog timers without or independent of an event, you can use opeventd's command line event creation facility.

Configuration for log.XYZ()

...