<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Perhaps it's because I'm working on this at 4am, but I'm having a
problem with the EXHOST option, that according to hobbitd_alert --test
isn't working, I also am not sure how to do a particular host/service
exclusion. <br>
<br>
Heres basically what my below alert config is meant to accomplish.<br>
1. For any alerts on any servers, send alerts to an alert email address.<br>
2. For 2 particular web servers (web5.mydomain.com and
web6.mydomain.com), send an alert to one person, but <b>not </b>the
alert alias.<br>
3. For a set of oracle servers, send an extra alert message to an
alternate email address/cellphone.<br>
4. After hours (from 5pm until 8am), only send alerts to an alternate
email address (but still need the seperate alert for the web5 and web6
hosts described in #2).<br>
5. After hours (from 5pm until 8am), send an alert to my cellphone for
any hosts and services being red for more than 30 mins.<br>
6. Do not alert for high load average on a particular server from
6-10am.<br>
<br>
My first problem is I am not sure how to implement #2 (exclude alerts
for the msgs on web5 and web6 from being sent to the main alert email,
and instead send them to the alternate address). I'm thinking one
solution would be to define it as the very first rule and use the
"STOP" option, like:  HOST=$WEB_SERVERS SERVICE=msgs COLOR=red MAIL
<a class="moz-txt-link-abbreviated" href="mailto:webdev@mydomain.com">webdev@mydomain.com</a> STOP<br>
<br>
Also, according to the tests I did with hobbit_alert --test, the last
rule is not working...Is there a more logical way to simply specify
that a single host/service combo be ignored during a certain
timeframe?  My hobbit-alerts.cfg is below, if you see anything wrong or
have suggestions on a better way to accomplish my list above I would
appreciate it.<br>
<br>
# hobbitd-alerts.cfg<br>
# oradb1-9.mydomain.com<br>
$ORACLE_SERVERS=%oradb(.).mydomain.com<br>
# web1-9.mydomain.com<br>
$WEB_SERVERS=%web(.).mydomain.com<br>
# All hosts<br>
$ALL_HOSTS=*<br>
<br>
# Send me an email alert if any service on any host goes red.<br>
# Note: This rule will probably be removed once the alert rules are
deemed fully working.<br>
HOST=$ALL_HOSTS SERVICE=* COLOR=red MAIL <a class="moz-txt-link-abbreviated" href="mailto:alert@mydomain.com">alert@mydomain.com</a><br>
<br>
# Notify webdev about (only) web errors on web5 and web6<br>
# FIXME: Need to make it so that <a class="moz-txt-link-abbreviated" href="mailto:alert@mydomain.com">alert@mydomain.com</a> does NOT get these!<br>
HOST=$WEB_SERVERS SERVICE=msgs COLOR=red MAIL <a class="moz-txt-link-abbreviated" href="mailto:webdev@mydomain.com">webdev@mydomain.com</a><br>
<br>
# Send an alert to dba phone on oracle-specific problems<br>
HOST=$ORACLE_SERVERS SERVICE=msgs,oradb,orasys COLOR=red FORMAT=sms<br>
MAIL <a class="moz-txt-link-abbreviated" href="mailto:dbacell@cellphone.com">dbacell@cellphone.com</a><br>
<br>
# Send me a page if any hosts go red for more than 30 minutes during
offhours<br>
HOST=$ALL_HOSTS SERVICE=* COLOR=red DURATION>30  TIME=1700-0800
FORMAT=sms<br>
     MAIL <a class="moz-txt-link-abbreviated" href="mailto:mycell@cellphone.com">mycell@cellphone.com</a><br>
<br>
# Ignore high load average warnings for dataproc1 in the mornings<br>
EXHOST=dataproc1.mydomain.com SERVICE=cpu COLOR=red TIME=0600-1000<br>
     MAIL <a class="moz-txt-link-abbreviated" href="mailto:me@mydomain.com">me@mydomain.com</a><br>
</body>
</html>