analysis.cfg failed alerting
list Josh Luthman
In client-local.cfg
file:`ls -1 /opt/powermonitor-notices/*`
On the files column I see
green /opt/powermonitor-notices/noticeofpowerfailure.192.168.97.10
Now in the hobbit-clients.cfg (AKA analysis.cfg now) configuration
neither of these work
FILE
/opt/powermonitor-notices/noticeofpowerfailure.192.168.97.10 red
noexist
FILE noticeofpowerfailure.192.168.97.10 red noexist
FILE %noticeofpowerfailure* red noexist
Ideally I would like the last one there to work so I don't need to
specify the IP and can simply use a regular expression and cover all
of them.
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
list Jeremy Laidman
On Thu, Feb 23, 2012 at 9:12 AM, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
FILE %noticeofpowerfailure* red noexist
You're not using the asterisk (*) correctly for a regular expression. It matches zero or more of the previous character, in this case, "e". Instead try this: FILE %noticeofpowerfailure.* red noexist The dot matches anything, and is not a literal dot in regular expressions. You haven't said what you're trying to do. The "noexist" check will generate an alert if the file exists, which might be counter-intuitive depending on your frame of mind. Is that what you want? Cheers Jeremy
list Josh Luthman
I changed it to %noticeofpowerfailure.* red noexist and will wait to see what happens. Thanks for the clarification. The check is right. I tested that earlier with a less complex method. If there is any file that comes up with ls noticeofpowerfailure* then I want to know. If the file exists, that means there is a site without power.
▸
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
On Wed, Feb 22, 2012 at 5:30 PM, Jeremy Laidman
▸
<user-71895fb2e44c@xymon.invalid> wrote:On Thu, Feb 23, 2012 at 9:12 AM, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:FILE %noticeofpowerfailure* red noexistYou're not using the asterisk (*) correctly for a regular expression. It matches zero or more of the previous character, in this case, "e". Instead try this: FILE %noticeofpowerfailure.* red noexist The dot matches anything, and is not a literal dot in regular expressions. You haven't said what you're trying to do. The "noexist" check will generate an alert if the file exists, which might be counter-intuitive depending on your frame of mind. Is that what you want? Cheers Jeremy