Custom Notifies
Jeremy Kister
argus-02 at jeremykister.com
Fri Jul 18 13:25:03 EDT 2008
On 7/15/2008 3:49 PM, Sagi Brody wrote:
> However, I'll probably be using 1 generic "service Prog{.." type service
> to execute a script to contact the server to check if sees anything is
> down. I'd like the unack page to actually display details obtained from
> the program. How can I do this?
not tested:
### on server being monitored:
echo "anotify 6969/tcp # for argus notifications" >> /etc/services
echo "anotify stream tcp nowait nobody /usr/bin/cat /usr/bin/cat
/tmp/notify.argus" >> /etc/inetd.conf
kill -HUP `ps -ef | awk '/inetd/ { print $2 }'
### in argus config:
Service TCP {
hostname: remote_server_name_or_ip_address
label: local_notifies
port: 6969
uname: local_notifies
nexpect: ALARM:
pluck: ALARM:(.+)
messagedn: %o{ip::hostname} says: [%v]
}
argusctl hup
# after argus has reloaded, on the client machine, do something like
echo "ALARM: my head hurts" >> /tmp/notify.argus
# this should make argus send you a page that looks like
10000 1/Jul 00:00 - machine says: [my head hurts]
# and a few minutes later
rm /tmp/notify.argus
--
Jeremy Kister
http://jeremy.kister.net./
More information about the Arguslist
mailing list