Xymon Mailing List Archive search

Test for file existence/contents and send contents in alert

2 messages in this thread

list Zoltan Forray · Wed, 23 Sep 2020 16:33:52 -0400 ·
I have a request to perform the following test and am not sure Xymon can do
both parts of the request.  If so, can someone show me how?  I felt this is
a FILE test to see if the file exists and/or is empty.

This is their request:

*The test should be added as a procruntime test.*

*The test should look for the file /home/tomcat/alertbody.txt*

*If the file is not present, the test result is OK.*

*If the file is present, the test result is CRITICAL, and the contents of
alertbody.txt should be sent to alert recipients (if that is possible).*

-- 
*Zoltan Forray*
IBM Spectrum Protect (p.k.a. TSM) Administrator
VMware Administrator
Xymon Monitor Administrator
Virginia Commonwealth University
UCC/Office of Technology Services
www.ucc.vcu.edu
user-755163d80bce@xymon.invalid - XXX-XXX-XXXX
Don't be a phishing victim - VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details
visit http://phishing.vcu.edu/
<https://adminmicro2.questionpro.com>;
list Scot Kreienkamp · Wed, 23 Sep 2020 21:24:55 +0000 ·
It can definitely do it.  The easiest way to accomplish this would be with an external test which would run on the tomcat host, that way it has access to the alertbody.txt file.  When the file appears include the contents in the body of the red report to xymon and it will then send it out to the recipients as part of the alert.


Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive | Monroe, Michigan 48162 | ? XXX-XXX-XXXX | |  ? X-XXX-XXX-XXXX  | ? user-9678697f1438@xymon.invalid
www.la-z-boy.com<http://www.la-z-boy.com>;  | facebook.com/lazboy<http://facebook.com/lazboy>;  | twitter.com/lazboy<http://twitter.com/lazboy>; | youtube.com/lazboy<http://youtube.com/lazboy>;
[cid:4C-lzbVertical_Tag_400px_d8b9412e-f3ea-46a1-99dc-a7c57261e11e.jpg]
From: Xymon <xymon-bounces at xymon.com> On Behalf Of Zoltan Forray
Sent: Wednesday, September 23, 2020 4:34 PM
To: Xymon at xymon.com
Subject: [Xymon] Test for file existence/contents and send contents in alert

ATTENTION:   This email was sent to La-Z-Boy from an external source.     Be vigilant when opening attachments or clicking links.
quoted from Zoltan Forray
I have a request to perform the following test and am not sure Xymon can do both parts of the request.  If so, can someone show me how?  I felt this is a FILE test to see if the file exists and/or is empty.

This is their request:


The test should be added as a procruntime test.

The test should look for the file /home/tomcat/alertbody.txt

If the file is not present, the test result is OK.

If the file is present, the test result is CRITICAL, and the contents of alertbody.txt should be sent to alert recipients (if that is possible).

--
Zoltan Forray
IBM Spectrum Protect (p.k.a. TSM) Administrator
VMware Administrator
Xymon Monitor Administrator
Virginia Commonwealth University
UCC/Office of Technology Services

www.ucc.vcu.edu<http://www.ucc.vcu.edu>;
user-755163d80bce@xymon.invalid<mailto:user-755163d80bce@xymon.invalid> - XXX-XXX-XXXX
Don't be a phishing victim - VCU and other reputable organizations will never use email to request that you reply with your password, social security number or confidential personal information. For more details visit http://phishing.vcu.edu/
[https://lh3.googleusercontent.com/FF7QOE6HHo76fiVfPG5-Krr-VRtvUTz6NDmhiixC-LrDtt31nXMqKVoDA206SM2HHjZllGlHj37GkIfIoSr-HqvGKcE_jws4bg7-un7EQhdWbKmApzXnXmKnkenWAEzTrNwev0KK]<https://adminmicro2.questionpro.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.