no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | monitors:smart [2011/10/10 15:08] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== smartmon ====== | ||
| + | |||
| + | ^ Author | [[ michael.adelmann@gmail.com | mikadel ]] | | ||
| + | ^ Compatibility | Xymon 4.3 | | ||
| + | ^ Requirements | Linux, smartmontools | | ||
| + | ^ Download | None | | ||
| + | ^ Last Update | 2011-10-06 | | ||
| + | |||
| + | ===== Description ===== | ||
| + | |||
| + | In conjunction with the smartmontools package this script monitors the S.M.A.R.T. status of your hard drives on Linux. This also works if your hard drives are " | ||
| + | |||
| + | Note: This currently only works for the first hard drive. | ||
| + | |||
| + | |||
| + | {{: | ||
| + | ===== Installation ===== | ||
| + | === Client side === | ||
| + | |||
| + | Create the following files in your xymon client directory: | ||
| + | |||
| + | monitoring script: < | ||
| + | |||
| + | monitoring config: < | ||
| + | |||
| + | xymon monitor config: < | ||
| + | |||
| + | |||
| + | Find your RAID crontroller at http:// | ||
| + | |||
| + | Additionally you have to allow sudo for hobbit. Edit visudo and add this line: | ||
| + | |||
| + | hobbit | ||
| + | |||
| + | === Server side === | ||
| + | |||
| + | None. | ||
| + | |||
| + | ===== Source ===== | ||
| + | ==== smart ==== | ||
| + | |||
| + | <hidden onHidden=" | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | |||
| + | COLOR=" | ||
| + | COLUMN=" | ||
| + | CONFIG=" | ||
| + | MSG=" | ||
| + | RAID="" | ||
| + | SMARTCTL="/ | ||
| + | SUDO="/ | ||
| + | |||
| + | # read config file | ||
| + | source $CONFIG | ||
| + | |||
| + | if [ -n " | ||
| + | RAID=" | ||
| + | fi | ||
| + | RESULT=" | ||
| + | |||
| + | |||
| + | TMP=`$SUDO $SMARTCTL / | ||
| + | SMART=`echo " | ||
| + | |||
| + | if [ -n " | ||
| + | MSG=" | ||
| + | COLOR=" | ||
| + | RESULT=" | ||
| + | |||
| + | STATUS=`echo " | ||
| + | if [ -z " | ||
| + | COLOR=" | ||
| + | RESULT=" | ||
| + | else | ||
| + | RESULT=" | ||
| + | fi | ||
| + | |||
| + | SELF=`echo " | ||
| + | if [ -z " | ||
| + | COLOR=" | ||
| + | RESULT=" | ||
| + | else | ||
| + | RESULT=" | ||
| + | fi | ||
| + | fi | ||
| + | |||
| + | MSG=`echo -e " | ||
| + | |||
| + | $BB $BBDISP " | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== smart.cfg ==== | ||
| + | |||
| + | <hidden onHidden=" | ||
| + | < | ||
| + | [smart] | ||
| + | ENVFILE / | ||
| + | CMD $HOBBITCLIENTHOME/ | ||
| + | LOGFILE / | ||
| + | INTERVAL 5m | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== smart.conf ==== | ||
| + | |||
| + | <hidden onHidden=" | ||
| + | < | ||
| + | # S.M.A.R.T. monitoring configuration | ||
| + | CONTROLLER=" | ||
| + | COUNT=1 | ||
| + | DEVICE=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== Known Bugs and Issues ===== | ||
| + | |||
| + | This currently only works for the first hard drive. | ||
| + | |||
| + | ===== To Do ===== | ||
| + | |||
| + | Enable monitoring for all hard drives. | ||
| + | |||
| + | ===== Credits ===== | ||
| + | |||
| + | ===== Changelog ===== | ||
| + | |||
| + | * **2011-10-06** | ||
| + | * Initial release | ||