Xymon Digest, Vol 10, Issue 16
Message: 6 Date: Thu, 17 Nov 2011 08:05:13 -0000 From: "Neil Simmonds" <Neil.Simmonds at express-gifts.co.uk> To: "Xymon Mailing List" <xymon at xymon.com> Subject: [Xymon] Automated remedial actions
Hi all,
I've got a requirement to take a specific action on a unix server should we get a specific message in a log file.
I'm not sure this is even possible in Xymon and I suspect I'll have to try and work out some way of doing it with a script.
Perhaps an external script that will somehow check for the message, run the relevant command to fix it and report a warning alert so that we know it has happened.
If there is some better way of doing it through Xymon I'd really like to know how.
Hi Neil,
the Xymon setup I run currently monitors over 140 systems and the server sits on a linux box. If you go poking around the data/ directory you'll find all the gathered information from all the monitored systems.
One of my scripts is currently monitoring the process list output of two different servers for the presence of a certain process. If the process is running on either of the systems then that is fine, report green. If the process is running on both systems OR it is not running on either system then that is bad, report red.
Extending the functionality of Xymon using system scripts makes it just that much more useful, I think.
This script is run by xymon, and the setup for it is done in the server/etc/tasks.cfg file , more info from http://www.xymon.com/xymon/help/manpages/man5/tasks.cfg.5.html
You could also be able to run the scripts under cron, but then you would also have be careful that any files/datamanipulated by the script was done in a way that the xymon processes could still access it.
Good luck, Steff Watkins
participants (1)
-
s.watkins@nhm.ac.uk