Remstats Home


  About remstats
  architecture
  Release Notes
  FAQ
  Conventions
  Prerequisites
  Installation
  Configuration
      access
      alerts
      alert-destination-map
      alert-template-map
      alert-templates
      archives
      availability
      colors
      customgraphs
      dbi-connects
      dbi-selects
      environment
      general
      groups
      hosts
      host templates
      html
      links
      ntops
      oids
      pages
      page-templates
      remotepings
      run
      run-stages
      rrds
      scripts
      times
      tools
      views
      view templates
  Configuration Tools
  Servers
  Collectors
  Updater
  Monitors
  pagemakers
  run-remstats2
  CGIs
  troubleshooting
  do-traceroutes
  Miscellany
  Thank-you
  Index


  Live Data

  Remstats was written by
  Thomas Erskine at the
  CRC in Canada and now
  at SourceWorks.

[Top] [Prev] [Next]

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.

Map Lines

A map line looks like:

	map DEST TIME DOW DOM MON ALIAS

Where:

  • DEST is an abstract alert destination, listed in the alerts config-file
  • TIME is a time-of-day specification, comma-separated time-ranges or '*' meaning all times. A range looks like HHMM-HHMM.
  • DOW is a day-of-the-week spec, a comma-separated list of weekdays, in numeric form (0=sunday, 1=monday, ...) or '*' for all weekdays.
  • DOM is a day-of-the-month spec. It's a comma-separated list of day-ranges, where a range is a day or DD-DD, or '*' ofr all days.
  • MON is a month spec. It's a comma-separated list of month-ranges, in numeric form, like MM or MM-MM or '*' for all months.
  • ALIAS is the alias that this DESTination maps to during the specified time-period. It's defined in an alias line.

This permits different DESTinations to be sent to different people at different times, depending on who's on duty.

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.

Method Lines

A method line looks like:

	method METHOD COMMAND-LINE

Where:

  • METHOD is the method being defined
  • COMMAND-LINE is the program to run with any arguments it requires. It will be passed the alert message on stdin and the address to send it to at the end of the COMMAND-LINE.

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.


[Top] [Remstats] [SourceWorks] [RRDtool] [SourceForge]
Last updated mardi 21 novembre 2006, 18:54:25 (UTC+0100) by <terskine@users.sourceforge.net>.