[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] no service-alert for all hosts
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] no service-alert for all hosts
- From: Steinar M. Skúlason <steinarms (at) gmail.com>
- Date: Thu, 12 Mar 2009 22:41:05 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=H+NB5xo6AMms4IuSVhvnYoXB25lca+J/dqfPPGkY6I4=; b=mzY1OAd65RdXoNB9l4Yz9Ujt4TGjPBFEjYrmPLy2J9WtFlNKp+G0GWunqbUC7D0WzW D0hREF4Ws6PbnprDhJl6tU8DC0S4H76E5klCSIARTv2vGF5xmEpaXU3W9eMd3RZq4zha Fh15m+eIsRq+7Outmh2f8th2pMyS+pOPQdXgg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FNJsxBmsNVfg46/4CFX3M9OG2ar23/XVEOdXVqEnQW9lSK5KCLcLui8g9DZ+S7Y0pp tJ3QO1/yzej0LNdQ2YSLGykHCKOhSLYsprIX66ZrSI/877dth26ts2l/qAl+dosFjWvm LG3XeFrKJIDRs1MYEIz1wXp8BBxKkpvGGLzZw=
- References: <Pine.LNX.4.64.0903122237160.3600 (at) pal31.desy.de> <17bd4d510903121516y628e4302n89b07c661c6f5a43 (at) mail.gmail.com> <17bd4d510903121535k580182c8g9a7440c37b1c8d96 (at) mail.gmail.com>
based on the day I would use crontab
but I obviously didn't get the questions because I didn't even recognize the
IGNORE switch
always trying to create the wheel instead of reading the docs I guess :)
-Steinar
On Thu, Mar 12, 2009 at 10:35 PM, Steinar M. Skúlason
<steinarms (at) gmail.com>wrote:
> oops, accidentally sent that one, damn touch pad :)
>
> what I meant to finish is you only mention which services you would like to
> receive alerts for
>
> HOST=hostname
> MAIL bill (at) microsoft.com RECOVERED REPEAT=60 COLOR=red SERVICE=http
>
>
> If it's based on time of day or some other criteria, then I think that
> hobbit-alerts.cfg resolves environment variales
> Or just create a small sed script to change lines in hobbit-alerts.cfg ..
> like :
>
> #!/bin/bash
> file="/usr/lib/hobbit/server/etc/hobbit-alerts.cfg"
> OLDTEXT="SERVICE=.*$"
> NEWTEXT="http,ssh"
> if [ -f $file ]; then
> sed "s/^$OLDTEXT/$NEWTEXT/g" < $file >/tmp/$$ && mv /tmp/$$ $file
> fi
>
> This replaces everything from SERVICE to end of line with what you put in
> NEWTEXT for all lines in the file
>
> This will only change the first occurrence
> sed "s/^$OLDTEXT/$NEWTEXT/" < $file >/tmp/$$ && mv /tmp/$$ $file
>
> an easier sed search and relplace can also be just
> sed -e 's/*oldtext*/newtext/' <filename>
>
>
> Hope this helps,
> wasn't quite sure what you ment
>
>
> On Thu, Mar 12, 2009 at 10:16 PM, Steinar M. Skúlason <steinarms (at) gmail.com
> > wrote:
>
>> Do you want to ignore these permanently
>> Or randomly ?
>> Or based on what day it is ?
>>
>> Of course permanently is easy
>>
>> HOST=sfdsf
>>
>>
>>
>> On Thu, Mar 12, 2009 at 9:54 PM, Martin Flemming <martin.flemming (at) desy.de
>> > wrote:
>>
>>>
>>> Hi !
>>>
>>> I've got in my hobbit-alerts.cfg
>>> many HOST and PAGE/SUBPAGE rules ...
>>>
>>> Now i need (at the top i think)
>>> one rule, which disable alerting of some Services
>>> for all hosts ..
>>>
>>> My first attempt is at the top
>>>
>>> IGNORE SERVICE=test1,test2,test3
>>>
>>> .. i thought, that's it .. but now, my mailmaster
>>> is angry because many mails hanging around in the mail-queue
>>>
>>> with IGNORE (at) desy.de ....
>>>
>>> Any hint ?
>>>
>>> thanks & cheers,
>>>
>>> Martin
>>>
>>> To unsubscribe from the hobbit list, send an e-mail to
>>> hobbit-unsubscribe (at) hswn.dk
>>>
>>>
>>>
>>
>