[hobbit] how to specify the same log for different servers [client-local.cfg and LOG in hobbit-clients.cfg]

Galen Johnson Galen.Johnson at sas.com
Wed Feb 13 15:42:00 CET 2008


I've done something like this successfully:

log:`date +"/path/to/logs/Server_%Y.%m.%d.log"`:10240

So you might be able to do to use the shell to do what you need via the `...` command.

=G=

-----Original Message-----
From: itsimonb at gmail.com [mailto:itsimonb at gmail.com] On Behalf Of Szymon Bakowski
Sent: Wednesday, February 13, 2008 9:30 AM
To: hobbit at hswn.dk
Subject: Re: [hobbit] how to specify the same log for different servers [client-local.cfg and LOG in hobbit-clients.cfg]

Hmm, I am not sure of that.

I believe that * stands for ANY character, not just proceeding one -
you have to use classes to be able to use preceding characters.
Secondly, non-escaped dot stands for exactly one character so it has
to be escaped, hasn't it ? (So the entry in hobbit-client.cfg should
look more like this: LOG %/var/lib/app/host\.* "ERROR" yellow - but
what I am really after is something like  "LOG %/var/lib/app/host*
"ERROR" yellow" in hobbit-client.cfg and
"log:%/var/lib/app/host*:10240" in clients-local.cfg)

Also, as Henrik said, I cannot use regexp in clients-local.cfg (which
is a pain in the *** :D - just joking) but here is another question
coming:

Having two logs on two machines, from the same program but differently
named and not being able to use regex in clients-local.cfg, how can I
define files that I am after (files that particular hobbit client will
be exporting to server? - is the only solution here to make these logs
being named identical ?)?

Are regex expression not being paresed through whole client-local.cfg
file or just classes ?

ex.
In client-local.cfg I cannot use "log:%/var/lib/app/host??.log:10240"
(which would perfectly sorted my problem out matching one of the two
logs on both servers) or can I?

Regs

Szymon

On 12/02/2008, Steve Anderson <Steve.Anderson at bipsolutions.com> wrote:
> Try
>
> LOG %/var/lib/app/host.* "ERROR" yellow
>
> Iirc, this is using regular expression pattern matching, and a * means '0 or more of the preceding character'. So you need the . (any character) for it to extend.
>
>
>
>
> -----Original Message-----
> From: itsimonb at gmail.com [mailto:itsimonb at gmail.com] On Behalf Of Szymon Bakowski
> Sent: 12 February 2008 17:14
> To: hobbit at hswn.dk
> Subject: [hobbit] how to specify the same log for different servers [client-local.cfg and LOG in hobbit-clients.cfg]
>
> Hello to all,
>
> A quick question:
>
> I do have to servers, load balanced, generating two logs comming from
> the same application. My goal is to be able to log error messages from
> these two machines, having different log names but logs holding the
> same content.
>
> Log on the firs machine is in format:
>
> host1.log
>
> and log on the other machine is
>
> host2.log
>
> What I did is in client-local.cfg file I have defined new class as following:
>
> log:/var/lib/app/host*.log:10240
>
> and tried to use it within hobbit-clients.cfg by doing (I do remember
> that we can not uses classes within this file, just bb-hosts):
>
> HOST=%host..\.domain\.com
> ...
>         LOG %/var/lib/app/host* "ERROR" yellow
>
>
> But unfortunatelly it doesnt work :(
>
> Is there any viable exit from this situation? Am I missing something
> here or it is simply not possible to do it that way?
>
> Kind regards
>
> Szymon
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>
> ______________________________________________
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
>
>
>
> BiP Solutions Limited is a company registered in Scotland with Company Number SC086146 and VAT number 38303966 and having its registered office at Park House, 300 Glasgow Road, Shawfield, Glasgow, G73 1SQ ****************************************************************************
> This e-mail (and any attachment) is intended only for the attention of the addressee(s). Its unauthorised use, disclosure, storage or copying is not permitted. If you are not the intended recipient, please destroyall copies and inform the sender by return e-mail.
> This e-mail (whether you are the sender or the recipient) may be monitored, recorded and retained by BiP Solutions Ltd.
> E-mail monitoring/ blocking software may be used, and e-mail content may be read at any time. You have a responsibility to ensure laws are not broken when composing or forwarding e-mails and their contents.
> ****************************************************************************
>

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk




More information about the Xymon mailing list