[Xymon] Core File Alerts Problem

Nick Pettefar Nick at pettefar.com
Fri Jul 31 19:33:42 CEST 2015


Thanks Jeremy!  Finally got it working OK!


Regards,

Nick Pettefar


On 31 July 2015 at 05:59, Jeremy Laidman <jlaidman at rebel-it.com.au> wrote:
> On 30 July 2015 at 00:54, Root, Paul T <Paul.Root at centurylink.com> wrote:
>>
>> I think you want /var/core/core.* in the client-local.cfg
>>
>> It's regex not just wildcard, so you need the . to stand for anything and
>> * is 1 or more.
>
>
> I'm pretty sure it's not a regex for the term in backquotes - the string is
> simply given to /bin/sh to execute.  Can you test yours by creating a core
> file?
>
> I think the real problem is that the NOEXIST test won't even be executed
> when there are no files, because there's no file to test against.
>
> Consider if I wanted to test for the existence of /tmp/badfile, and go
> yellow if it exists.  In client-local.cfg I would have:
>
> file:/tmp/badfile
>
> In analysis.cfg, I would have:
>
> FILE %^/tmp/badfile YELLOW NOEXIST
>
> This should work just fine.  Now consider if I updated client-local.cfg to
> look like this:
>
> file:
>
> Now, what will happen?  The Xymon client will have no files to report, and
> so there will be nothing relevant in the client data.  Therefore the entry
> in analysis.cfg has no filenames to match on, and so won't even try.  The
> fact that there's no filenames to test means that the file check goes blank,
> reporting that the file check has not been setup yet.
>
> By including a backtick expression that gives an empty result, you're
> producing an outcome that you weren't expecting.
>
> I think what might give what you need is something like this:
>
> FILE:`ls -d /var/core; ls /var/core/core*`
>
> When there are core files, the result of this will be as if you configured:
>
> FILE:/var/core
> FILE:/var/core/core91234
> FILE:/var/core/core2244
>
> And the line in analysys.cfg will match two of them, so YELLOW.
>
> When there are no core files, the result will be as if you configured:
>
> FILE:/var/core
>
> And the line in analysis.cfg will not match, so GREEN.
>
> It's green rather than clear because there is at least one "[file:]" section
> in the client data against which the line in analysis.cfg can match.
>
> Hope that helps!
>
> Cheers
> Jeremy
>



More information about the Xymon mailing list