spong-cleanup8
Perform nightly maintenance to the spong database
Usage
spong-cleanup
Overview
This program performs routine, regular maintenance of the spong database.
- •
-
Cleans out any history older then 7 days. It moves the old history for each host into the
$SPONG_ARCHIVEdirectory. If you don't think you would ever want to get at that history, then you can just change the script so that it is deleted.
- •
-
* Removes any acknowledgements that are no longer valid.
- •
-
* Removes any services that don't seem to be reported any more (if you stop monitoring something on a machine - the old entry will still hang around and show up as purple).
The spong-cleanup program should be run every night as a cronjob. This will ensure that database queries are speedy especially the History Log displays.
Configuration
Configuration Files
spong-cleanup reads the standard spong.conf and spong.conf.<host> configuration files.
Configuration Variables
- $SPONGDB
-
This defines the directory where the Spong database will be stored. Each host will have a subdirectory in this directory which is named for the host.
- $SPONG_ARCHIVE
-
The directory where to put old history file entries for each host. Each host has it's own file in this directory.
- $OLD_HISTORY
-
This is the number of days of history to keep for each host in the spong-server database. Any old history is append to the file for the host under the $SPONG_ARCHIVE directory.
- $OLD_SERVICE
-
This is the number of days to retain stale service status (i.e. purple status) entries in the spong-server database. Any service service status entries older than <$OLD_SERVICE> days old are deleted from the database.
Files
spong.conf, spong.conf.[hostname]
Dependencies
Perl v5.005_03 or greater is required.
History
- Debian 5.0 (Lenny): the text shown here
- Debian 4.0 (Etch)
- Debian 3.1 (Sarge)
- Debian 3.0 (Woody)