[Xymon] system reboot email alert

Bauer-Lee, Sue Sue.Bauer-Lee at Multiplan.com
Fri Jul 11 18:59:41 CEST 2014


Thanks so much. That kind of script I can write and will certainly accomplish the email alert issue.



I'd much prefer to use xymon: it knows the host rebooted so my question was directed at why we can't  isolate that alert to report it via email/sms/whatever outside of JUST a column color change in the web interface .....


From: Galen Johnson [mailto:Galen.Johnson at sas.com]
Sent: Thursday, July 10, 2014 1:40 PM
To: Bauer-Lee, Sue; xymon at xymon.com
Subject: RE: system reboot email alert

Yes...but not with Xymon.  I have a script that runs on startup that sends an email to alert me that the server rebooted with instructions for what to do (if needed).  We used to have some services that required user specific ssh-agents to be running so this was written to let those teams know to log back in and restart the agents.  Basically (from memory):

#!/bin/sh

###
# chkconfig: 35 88
# description: Reboot message
###

SENDMAIL="/usr/sbin/sendmail"
HOST=`hostname`
NOW=`date`
MAILTO="mail_me at example.com mail_me2 at example.com<mailto:mail_me at example.com%20mail_me2 at example.com>"

cat <<EOF | $SENDMAIL $MAILTO
Subject: $HOST Rebooted!
To: $MAILTO
Content-Type: text/plain

ATTENTION!  Reboot of $HOST has taken place.

EOF

I'm sure there are better ways and this could be more fleshed out but you will know immediately that a machine restarted.

=G=

________________________________
From: Xymon <xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>> on behalf of Bauer-Lee, Sue <Sue.Bauer-Lee at Multiplan.com<mailto:Sue.Bauer-Lee at Multiplan.com>>
Sent: Thursday, July 10, 2014 11:24 AM
To: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: [Xymon] system reboot email alert

Hello All!

Times have changed a bit in the infrastructure environment such that many have a large contingent of virtual machines and blades. These hosts tend to reboot rather quickly, hence connectivity failures tend to not get noticed. I have a request on the table to send an email alert with a specific subject line to indicate that a host has rebooted.

I've seen a few posts over the years regarding requests to alert for system reboots. I also saw a post or two about adding a dynamic column capability. Some responses suggested an external script to accomplish the task of emailing an alert.

I'm asking the question again because as I peruse the analysis.cfg and review the rules, I know I can issue an email alert for PROC and DISK.
That begs the question of 'why can't I issue an email alert for UP'? I'm fine with the 'yellow' on CPU test for recent reboot, but since it also includes load changes, I'm not interested in a generic email for either one when they occur.

If I already can, how??

And if not, suggestions for a simple approach? I'm not exactly getting the desired results server-wide with an external script that should just send an email for a CPU status color=yellow without interfering with our other configured alerts. :(

Is someone already successfully conquering this task?



______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
NOTICE OF CONFIDENTIALITY: This message and any attachments contains confidential information belonging to the sender intended only for the use of the individual or entity named above. If you are not the intended recipient, be advised that copying, disclosure or reliance upon the contents is strictly prohibited. If you have received this message in error please notify the sender immediately.

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________


NOTICE OF CONFIDENTIALITY: This message and any attachments contains confidential information belonging to the sender intended only for the use of the individual or entity named above. If you are not the intended recipient, be advised that copying, disclosure or reliance upon the contents is strictly prohibited. If you have received this message in error please notify the sender immediately.



______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140711/681bb2f8/attachment.html>


More information about the Xymon mailing list