Xymon Mailing List Archive search

Alarm Output to Text File?

list Japheth Cleaver
Tue, 8 Dec 2015 13:11:16 -0800
Message-Id: <user-8f2c10ea6e9c@xymon.invalid>

On Tue, December 8, 2015 11:43 am, Foster Patch wrote:
Hi,

Pretty random question here- I have had the severe frustration of working
with CPU monitoring on Windows 2000. I was wondering if it is possible to
write a text file if an alarm like CPU goes red. I would have a persistent
script running in the background that would check to see if that file
exists, and commit and action based on its existence. I am still very new
to Xymon and was just wondering if this was possible.

Thank you,
Foster Patch
Hi,

Actually, you can have xymon perform any arbitrary action you like as a
result of an alert. See the 'SCRIPT' option in alerts.cfg(5) for the
syntax. When the script executes, it'll get a whole bunch of details set
in various environment variables, which can be used to do whatever you
like.

Various folks use this as an integration point with other systems, so it
could do an HTTP POST into a ticketing / pager system, save data to a file
for further processing (like this), send an SNMP trap to something else,
or perform any other action the 'xymon' system user has the ability to.

About the only thing to keep in mind is that this is one of the few places
in xymon that we actually fork a process when processing a message, so if
you're writing something very heavy, consider what might happen if you get
an alert storm.

There are a number of sample scripts at
https://wiki.xymonton.org/doku.php/alerts that might work for you, or at
least give you some further ideas.


HTH,

-jc