[Xymon] Custom Tests

Scot Kreienkamp Scot.Kreienkamp at la-z-boy.com
Thu Jun 23 16:49:01 CEST 2016


I would suggest formatting your output as an HTML table.  Here’s the reporting part of a script I wrote from a custom test that expands on the built in CPU stats.  The status line has to be exactly as written up to the color.  Everything after the color is up to you.

$XYMON $XYMSRV "status $HOSTNAME.$TESTNAME $COLOR `date` $STATUS

<table>
<tr><td>$IDLECOLORDOT</td><td> Idle time:</td><td>$IDLEPERCENT%</td></tr>
<tr><td>$IOWAITCOLORDOT</td><td> IO Wait time:</td><td>$IOWAITPERCENT%</td></tr>
<tr><td>$USERPERCENTCOLORDOT</td><td> User time:</td><td>$USERPERCENT%</td></tr>
<tr><td>$NICEPERCENTCOLORDOT</td><td> Nice time:</td><td>$NICEPERCENT%</td></tr>
<tr><td>$SYSTEMPERCENTCOLORDOT</td><td> System time:</td><td>$SYSTEMPERCENT%</td></tr>
<tr><td>$IRQPERCENTCOLORDOT</td><td> IRQ time:</td><td>$IRQPERCENT%</td></tr>
<tr><td>$SOFTIRQPERCENTCOLORDOT</td><td> Soft IRQ time:</td><td>$SOFTIRQPERCENT%</td></tr>
</table>

"



From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Joshua Hunt
Sent: Wednesday, June 22, 2016 6:54 PM
To: xymon at xymon.com
Subject: [Xymon] Custom Tests

Hello again Xymon members,


I'm very new to both Unix systems and Xymon, and I have to say learning Xymon on a Unix system is currently leaving me pretty stumped for a lot of things.

Right now I am attempting to create a script that will read the past 20 minutes of a log file, and report an array of values back to Xymon. I am looking for the end result to have a "green face" if less than five zeroes are detected, a yellow from 5 - 10, and a red from 10 and up. I have the script written, but I am unsure how to implement it into Xymon and have the results printed out when I click on the face beneath the test column. Results to be viewed after clicking the test column are in the format as followed:

TIMESTAMP     DATANAME     DATATYPE     FREQUENCY     TIMEFRAME

With respective info included. So how would I go around formatting the end result of a test to look like this when you clicked for more information?

Cheers all!

Joshua H

Scot Kreienkamp  | Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive | Monroe, Michigan 48162 | Office: 734-384-6403 | | Mobile: 7349151444 | Email: Scot.Kreienkamp at la-z-boy.com

This message is intended only for the individual or entity to which it is addressed.  It may contain privileged, confidential information which is exempt from disclosure under applicable laws.  If you are not the intended recipient, you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information.  If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160623/4d66e72d/attachment.html>


More information about the Xymon mailing list