Configuration - alert-destination-map
This config-file specifies the mapping from an abstract alert destination,
specified in the alerts config-file, and the address(es) to
send it to. The alerter attempts to match the abstract alert destination
against each of the map
lines and sends alerts to any which match.
There are three kinds of lines in this config-file: map
, alias
, and method
.
Map
lines map from an abstract alert destination, listed in the alerts
config-file, to a less abstract alias, listed here. The alias
lines allow a
crude list capability and also permit the use of different methods to deliver the
alert. Method
lines tell what program to run with what arguments in order to
deliver to that type of address.
Alias Lines
An alias line looks like:
alias ALIAS METHOD:ADDR ...
Where:
-
ALIAS is the alias being defined
-
METHOD is an alert-delivery method (see methods below)
-
ADDR is an address which is valid for that method
This indirection permits delivery of the same alert via multiple methods, in case
one or more of the methods isn't available, as well as to different people.
An Example
We have three guys on different shifts who manage network operations (Tom, Dick and Harry)
during the week. On the week-end Frank is on call. We also want to email a copy to
an email address which collects all the alerts.
We want to send the alerts to whoever is working at the time. Say the abstract destination
specified in the alerts config-file is alerts
. We might use lines
like those below:
map alerts 0600-1359 1,2,3,4,5 * * tom
map alerts 1400-2159 1,2,3,4,5 * * dick
map alerts 0000-0559,2200-2359 1,2,3,4,5 * * harry
map alerts * 0,6 * * frank
alias tom email:tom@our.com email:alert-history@our.com winpopup:console
alias dick email:dick@our.com email:alert-history@our.com winpopup:console
alias harry email:harry@our.com email:alert-history@our.com winpopup:console
alias frank page:555-1234 email:alert-history@our.com winpopup:console
method email /usr/lib/remstats/bin/alert-email
method winpopup /usr/lib/remstats/bin/alert-winpopup
method page /usr/lib/remstats/binalert-page
Note: the hypothetical page
method isn't provided with remstats. There are lots of different
programs to send pages. Look at alerter if you want to add your own methods; it's easy.
[