diff options
author | Achim Gottinger <achim@gentoo.org> | 2001-01-20 01:05:43 +0000 |
---|---|---|
committer | Achim Gottinger <achim@gentoo.org> | 2001-01-20 01:05:43 +0000 |
commit | 4ccb60c65fe9eec86e26a3a38f5d75529cb5bf05 (patch) | |
tree | 9bc6dd40cf40ee79696884984b44f6c6faa39202 /app-admin/mon/files | |
parent | *** empty log message *** (diff) | |
download | gentoo-2-4ccb60c65fe9eec86e26a3a38f5d75529cb5bf05.tar.gz gentoo-2-4ccb60c65fe9eec86e26a3a38f5d75529cb5bf05.tar.bz2 gentoo-2-4ccb60c65fe9eec86e26a3a38f5d75529cb5bf05.zip |
*** empty log message ***
Diffstat (limited to 'app-admin/mon/files')
-rwxr-xr-x | app-admin/mon/files/mon | 29 | ||||
-rw-r--r-- | app-admin/mon/files/mon.cf | 34 |
2 files changed, 63 insertions, 0 deletions
diff --git a/app-admin/mon/files/mon b/app-admin/mon/files/mon new file mode 100755 index 000000000000..f6aa304b54b7 --- /dev/null +++ b/app-admin/mon/files/mon @@ -0,0 +1,29 @@ +#!/bin/sh +#RCUPDATE:3 4:99:This line is required for script management + +. /etc/rc.d/config/functions + +SERVICE=mon +EXE="/usr/sbin/mon" +PID="/var/run/mon.pid" + +opts="start stop" + +start() { + ebegin "Starting ${SERVICE}..." + start-stop-daemon --start --quiet --exec $EXE -- -P $PID -f 1>&2 + eend $? +} + +stop() { + ebegin "Stoppig ${SERVICE}..." + start-stop-daemon --stop --quiet --pid $PID 1>&2 + eend $? "Error stopping $SERVICE" +} + +restart () { + stop + start +} + +doservice ${@} diff --git a/app-admin/mon/files/mon.cf b/app-admin/mon/files/mon.cf new file mode 100644 index 000000000000..ce5157e5314d --- /dev/null +++ b/app-admin/mon/files/mon.cf @@ -0,0 +1,34 @@ +# +# Very simple mon.cf file +# +# $Id: mon.cf,v 1.1 2001/01/20 01:05:43 achim Exp $ +# +alertdir = /usr/lib/mon/alert.d +mondir = /usr/lib/mon/mon.d +logdir = /var/log/mon.d +statedir = /var/lib/mon.d +maxprocs = 20 +histlength = 100 +randstart = 60s + +# +# define groups of hosts to monitor +# +hostgroup servers localhost + +watch servers + service ping + interval 5m + monitor fping.monitor + period wd {Mon-Fri} hr {7am-24pm} + alert mail.alert root@localhost + alertevery 1h + period wd {Sat-Sun} + alert mail.alert root@localhost + service telnet + interval 10m + monitor telnet.monitor + period wd {Mon-Fri} hr {7am-24pm} + alertevery 1h + alertafter 2 30m + alert mail.alert root@localhost |