no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | monitors:messaging.sh [2009/12/17 19:30] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== messaging.sh ====== | ||
| + | |||
| + | ^ Author | [[ stuart@carmichael.net.au | Stuart Carmichael ]] | | ||
| + | ^ Compatibility | Xymon 4.2 | | ||
| + | ^ Requirements | Linux, unix | | ||
| + | ^ Download | {{: | ||
| + | ^ Last Update | 2009-12-16 | | ||
| + | |||
| + | ===== Description ===== | ||
| + | I want a way to message the sysadmin of my server. The message might be a | ||
| + | status message from a backup (success/ | ||
| + | It could be a reminder to myself (" | ||
| + | |||
| + | The way I have implemented this is as separate text files in a messaging | ||
| + | directory. When an automated job/ | ||
| + | the $MESSAGEDIR, | ||
| + | column. There may be any number of messages in the messaging directory | ||
| + | (the highest priority message will be the status of the entire group for | ||
| + | this host). A keyword ' | ||
| + | of the message. | ||
| + | |||
| + | This script continually monitors the $MESSAGEDIR, | ||
| + | details from Xymon once the message files themselves have been dealt with | ||
| + | (for example: automatically via a cron job; manually deleted/ | ||
| + | the issue has been dealt with). | ||
| + | |||
| + | If no messages appear in $MESSAGEDIR, | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Example: | ||
| + | To create the " | ||
| + | < | ||
| + | echo "green Backup completed at `date` > / | ||
| + | </ | ||
| + | ===== Installation ===== | ||
| + | This is a client side script. The following must be completed on all Xymon client which you want to send messages to the server. | ||
| + | |||
| + | === Client side === | ||
| + | 1. Download the script (see download link, above), copy into the Client' | ||
| + | |||
| + | 2. Update the client' | ||
| + | |||
| + | < | ||
| + | [messaging] | ||
| + | ENVFILE $HOBBITCLIENTHOME/ | ||
| + | CMD $HOBBITCLIENTHOME/ | ||
| + | LOGFILE $HOBBITCLIENTHOME/ | ||
| + | INTERVAL 5m | ||
| + | </ | ||
| + | |||
| + | 3. (optional) review the messaging.sh script, and change the location of $MESSAGEDIR to somewhere more appropriate to your server (default is / | ||
| + | |||
| + | 4.Create the $MESSAGEDIR directory. Ensure the xymon user can read files in this directory | ||
| + | |||
| + | |||
| + | Script will create “messaging” alerts of the appropriate severity level when text files are created in the $MESSAGEDIR directory. The first word on the first line of each text message file defines the severity level. Severity levels can be one of: green, yellow, red. Any other severity level is assumed to mean ' | ||
| + | |||
| + | === Server side === | ||
| + | No actions required | ||
| + | |||
| + | ===== Source ===== | ||
| + | ==== messaging.sh ==== | ||
| + | See download link, above. | ||
| + | |||
| + | ===== Known Bugs and Issues ===== | ||
| + | |||
| + | ===== To Do ===== | ||
| + | |||
| + | ===== Credits ===== | ||
| + | |||
| + | ===== Changelog ===== | ||
| + | |||
| + | * **2009-12-16** | ||
| + | * Initial release | ||