About rsmonitor Installation Configuration and use Preview

Configuration and use

Running

The main program is called rsmon_runall.sh. This is intended to be invoked from cron, but can also be run from the command line during testing.

This program understands two command line options:

  • --confdir <config_dir>
  • --nopoll

The --confdir option is used to tell rsmonitor where the config files can be found, if they aren't in the default $HOME/rsmonitor/conf directory.

The --nopoll option is used to indicate that the servers should not be checked, the stored information from the last poll will be used. The summary pages are updated and (if enabled) healt state alerting is performed. This is basically used for testing of new features or tuned alarm levels.

Configuration files

rsmonitor uses the following configuration files:

  • rsmonitor.conf
    Here the paths used by rsmonitor can be customized
  • rsmonitor_servers.conf
    The servers to be monitored are specified in this file.

The distribution is shipped with sample configuration files. The use of the files are documented in these sample files.

Application monitoring

rsmonitor looks in a directory specified by the AppMonDir setting in rsmonitor.conf for scripts called <servername>.sh. If such a script is found for a monitored server it is executed to check the status of the applications on the server.

The rules for writing such scripts are simple. The script can do whatever you like, but it should produce at least 3 lines of output, formatted like this:

  Date:   <date>
  Host:   <hostname>
  Status: <status>

Only the information in the third line is parsed by rsmonitor, the two first are currently skipped. They should still contain valid information to be useful in diagnosing problems.

The status should be either OK, Warning or ALARM - case is important!

The rest of the output is ignored by rsmonitor, but all the output is saved to a file that can be accessed through the rsmonitor status web pages, so outputting useful information after these 3 lines is a good idea.

Any information ending up in stderr will be caught by cron and mailed to the rsmon user. To avoid ending up with a massively huge mailbox this should be avoided under normal situations.

Server documentation

For each server rsmonitor checks in a directory called server_doc in the OutputDir for a file named <servername>.html or <servername>.txt. If such a file is found the server name in the Server column in the html tables will be a link to this file.

If both a .txt and a .html file is found the .html version will be used.

Performance conciderations

rsmonitor does 2 ssh connects with public key authentication to each server for each poll. All servers are polled more or less in parallell. If many servers are monitored this will lead to a rather high load on the monitoring server. Therefore it is a good idea to put rsmonitor on a machine that isn't doing too much other cpu intensive work.

The application monitoring scripts can also run commands on the monitored servers using ssh. Care should be taken to get as much testing as possible done in as few ssh connects as possible, since the public key authentication is very heavy both on the monitoring and the monitored servers.


Last modified: Sat Mar 3 23:48:25 CET 2007
Rune Sætre < rune.saetre at netcom-gsm.no >