based on the day I would use crontab<br><br>but I obviously didn't get the questions because I didn't even recognize the IGNORE switch<br><br>always trying to create the wheel instead of reading the docs I guess :)<br>
<br><br>-Steinar<br><br><div class="gmail_quote">On Thu, Mar 12, 2009 at 10:35 PM, Steinar M. Skúlason <span dir="ltr"><<a href="mailto:steinarms@gmail.com" target="_blank">steinarms@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">oops, accidentally sent that one, damn touch pad :)<br><br>what I meant to finish is you only mention which services you would like to receive alerts for <br>

<br>HOST=hostname<br>   MAIL <a href="mailto:bill@microsoft.com" target="_blank">bill@microsoft.com</a> RECOVERED REPEAT=60 COLOR=red SERVICE=http    <br>
<br><br>If it's based on time of day or some other criteria, then I think that hobbit-alerts.cfg resolves environment variales<br>Or just create a small sed script to change lines in hobbit-alerts.cfg .. like :<br><br>


#!/bin/bash<br>file="/usr/lib/hobbit/server/etc/hobbit-alerts.cfg"<br>OLDTEXT="SERVICE=.*$"<br>NEWTEXT="http,ssh"<br>if [ -f $file ]; then<br>   sed "s/^$OLDTEXT/$NEWTEXT/g" < $file >/tmp/$$ && mv /tmp/$$ $file<br>


fi<br><br>This replaces everything from SERVICE to end of line with what you put in NEWTEXT for all lines in the file<br><br>This will only change the first occurrence <br>sed "s/^$OLDTEXT/$NEWTEXT/" < $file >/tmp/$$ && mv /tmp/$$ $file<br>


<br>an easier sed search and relplace can also be just  <br>sed<a name="11ffcd5407d5b1ba_11ffcd3baa4c7a4c_6526"> </a> -e 's/<i>oldtext</i>/newtext/'  <filename><br><br><br>Hope this helps,<br>wasn't quite sure what you ment<div>

<div></div><div><br><br><div class="gmail_quote">
On Thu, Mar 12, 2009 at 10:16 PM, Steinar M. Skúlason <span dir="ltr"><<a href="mailto:steinarms@gmail.com" target="_blank">steinarms@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


Do you want to ignore these permanently <br>Or randomly ? <br>Or based on what day it is ?<br><br>Of course permanently is easy<br><br>HOST=sfdsf<div><div></div><div><br> <br><br><div class="gmail_quote">On Thu, Mar 12, 2009 at 9:54 PM, Martin Flemming <span dir="ltr"><<a href="mailto:martin.flemming@desy.de" target="_blank">martin.flemming@desy.de</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi !<br>
<br>
I've got in my hobbit-alerts.cfg<br>
many HOST and PAGE/SUBPAGE rules ...<br>
<br>
Now i need (at the top i think)<br>
one rule, which disable alerting of some Services<br>
for all hosts ..<br>
<br>
My first attempt is at the top<br>
<br>
IGNORE SERVICE=test1,test2,test3<br>
<br>
.. i thought, that's it .. but now, my mailmaster<br>
is angry because many mails hanging around in the  mail-queue<br>
<br>
with <a href="mailto:IGNORE@desy.de" target="_blank">IGNORE@desy.de</a> ....<br>
<br>
Any hint ?<br>
<br>
thanks & cheers,<br>
<br>
       Martin<br>
<br>
To unsubscribe from the hobbit list, send an e-mail to<br>
<a href="mailto:hobbit-unsubscribe@hswn.dk" target="_blank">hobbit-unsubscribe@hswn.dk</a><br>
<br>
<br>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>