[Xymon] Alerting on the existence of a file with wildcards

David Baldwin david.baldwin at ausport.gov.au
Wed Jan 2 04:10:08 CET 2013


Michael,

Regular expressions must be specified for the entire match, so the
following is probably closer to the mark:

        FILE %/opt/WSCluster.*/WebSphere/wp_profile/javacore yellow NOEXIST

In the client-local.cfg you can probably try an alternative also:

file:`find /opt/WSCluster*/WebSphere/wp_profile -type f -name javacore*
| sort -r`


David.
>
> I’ve successfully tested monitoring for the appearance of a statically
> defined file (i.e. no wildcards), and have been happy with the result.
>
>  
>
> I’m now tasked with trying to alarm on the appearance of file where
> only part of the filename will be static, hence the need for wildcards.
>
>  
>
> I’m at the point where the presence of a file causes a green
> condition, and the removal of that file causes a white condition.
>
>  
>
> The client-local.cfg is set up to look like this (the commented lines
> are my various attempts to test/change the behavior):
>
>  
>
> file:`find /opt/WSCluster*/WebSphere/wp_profile | grep javacore | sort -r`
>
> #file:`find /opt/WSCluster*/WebSphere/wp_profile | grep javacore |
> sort -r | head -n 1`
>
> #file:`find /opt/WSCluster1/WebSphere/wp_profile | grep javacore |
> sort -r | head -n 1`
>
> #file:`find /opt/WSCluster2/WebSphere/wp_profile | grep javacore >
> /dev/null | sort -r | head --lines=1`
>
> #file:`find /opt/WSCluster3/WebSphere/wp_profile | grep javacore >
> /dev/null | sort -r | head --lines=1`
>
> log:/var/adm/syslog/syslog.log:10240
>
>  
>
> The analysis.cfg is set up like so (again, commented lines are my
> attempts to test/change the behavior):
>
>  
>
>         FILE /opt/WSCluster1/WebSphere/wp_profile/%javacore(^*.)
> yellow NOEXIST
>
> #       FILE /opt/WSCluster(^*.)/WebSphere/wp_profile/javacore(^*.)
> NOEXIST yellow
>
> #       FILE /opt/WSCluster(^*.)/WebSphere/wp_profile/javacore(^*.) yellow
>
>  
>
> I’ve put a test file out,
> /opt/WSCluster1/WebSphere/wp_profile/javacore.mike1, and Xymon is
> reporting green on the file’s existence…which, of course, is not the
> desired behavior.
>
>  
>
> My guess is that I’m completely bollixing the regex…any thoughts or
> help would be appreciated.
>
>  
>
> --
>
> *Mike Burger*
>
> *AIX Administrator*
>
> *cid:image001.gif at 01CC72C8.834C1990*
> <http://freedomhome.fhmc.local/intranet/main.jsp>
>
> *Phone (317) 537-3680**, **Fax****(317) 537-4680, Cell (317) 797-2040 ***
>
> *E-mail:  **Mike.Burger at FreedomMortgage.com*
> <mailto:Anthony.House at freedommortgage.com>
>
> "Once word leaks out that a pirate's gone soft, people begin to
> disobey you and then it's nothing but work, work, work, all the time."
> --Westley/The Dread Pirate Roberts
>
>  
>
> CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for
> the sole use of the intended recipient(s) and may contain confidential
> information. Any unauthorized review, use, disclosure, alteration or
> distribution is strictly prohibited and may violate state or federal law. If you
> are not the intended recipient, please contact the sender by reply e-mail,
> delete this email and destroy all copies of the message.
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon


-- 
David Baldwin - Senior Systems Administrator (Datacentres + Networks)
Information and Communication Technology Services
Australian Sports Commission          http://ausport.gov.au
Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616
david.baldwin at ausport.gov.au          Leverrier Street Bruce ACT 2617


-------------------------------------------------------------------------------------
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au

This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.
-------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130102/c59b80cb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 3153 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130102/c59b80cb/attachment.gif>


More information about the Xymon mailing list