[Xymon] Alerting on the existence of a file with wildcards
Jeremy Laidman
jlaidman at rebel-it.com.au
Wed Jan 2 03:38:05 CET 2013
I'm guessing the same. The "^" means to tie to the start of the string,
which makes no sense unless it's at the start of the string. Try something
like this:
FILE /opt/WSCluster1/WebSphere/wp_profile/%^javacore yellow NOEXIST
Note that the regex "^javacore" will match anything starting with
"javacore" no matter what follows. It's as if there's an implied wildcard
at the end.
J
On 29 December 2012 01:04, Michael Burger
<Mike.Burger at freedommortgage.com>wrote:
> 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*
>
> *[image: 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*<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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130102/72c227eb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3153 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130102/72c227eb/attachment.gif>
More information about the Xymon
mailing list