<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" id="owaParaStyle" style="display: none;">P {margin-top:0;margin-bottom:0;}</style><style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style>
</head>
<body dir="ltr" fpstyle="1" aria-label="Message body" tabindex="0">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
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):
<div><br>
</div>
<div>#!/bin/sh</div>
<div>
<div>
<div><br>
</div>
<div>###</div>
<div># chkconfig: 35 88</div>
<div># description: Reboot message</div>
<div>###</div>
</div>
<div><br>
</div>
<div><span style="font-size: 12pt;">SENDMAIL="/usr/sbin/sendmail"</span></div>
<div><span style="font-size: 12pt;">HOST=`hostname`</span></div>
<div>NOW=`date`</div>
<div>MAILTO="mail_me@example.com mail_me2@example.com"</div>
<div><br>
</div>
<div>cat <<EOF | $SENDMAIL $MAILTO</div>
<div>Subject: $HOST Rebooted!</div>
<div>To: $MAILTO</div>
<div>Content-Type: text/plain</div>
<div><br>
</div>
<div>ATTENTION!  <span style="font-size: 12pt;">Reboot of $HOST has taken place.</span></div>
<div><br>
</div>
<div>EOF</div>
<div><br>
</div>
<div>I'm sure there are better ways and this could be more fleshed out but you will know immediately that a machine restarted.</div>
<div><br>
</div>
<div>=G=</div>
<div><br>
</div>
<div>
<div style="color: rgb(40, 40, 40);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Xymon <xymon-bounces@xymon.com> on behalf of Bauer-Lee, Sue <Sue.Bauer-Lee@Multiplan.com><br>
<b>Sent:</b> Thursday, July 10, 2014 11:24 AM<br>
<b>To:</b> xymon@xymon.com<br>
<b>Subject:</b> [Xymon] system reboot email alert</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal">Hello All!</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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.
</p>
<p class="MsoNormal">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.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">If I already can, how??</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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.
<span style="font-family:Wingdings">L</span> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Is someone already successfully conquering this task?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
<br clear="both">
______________________________________________________________________<br>
This email has been scanned by the Symantec Email Security.cloud service.<br>
For more information please visit http://www.symanteccloud.com<br>
______________________________________________________________________<br>
<br>
<address><i><font size="1" color="silver" face="Arial"><span style="font-size:8.0pt; font-family:Arial; color:silver; font-style:normal">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.
  </span></font></i></address>
</div>
</div>
</div>
</div>
</div>
</body>
</html>