tdsnoc

Logmon woes

Discussion created by tdsnoc on Jul 30, 2014
Latest reply on Jul 30, 2014 by remko.dobber

Hey all,

 

I think I've read every post related to logmon issues out there and have tried everything (including opening a case with support which has been escalated).

 

What I'm trying to do should be totally simple but for the life of me I can't get it working. There's a small executable sitting on a bunch of linux systems that returns a very simple string, /path/to/script.sh returns:

 

/dev/device-name NN

 

Where NN is a percent. What I want logmon to do is to generate an alarm if that value is below certain thresholds, for example minor at 50 and major at 25. Getting it to run the command works fine, and I can see from the logs that it's getting the correct string (on the system I'm testing this on it returns "/dev/vgc 43"). I've tried creating all of the following watcher rules.

 

Watcher name, expression, variable1, variable2

dev-lt-50, *, dev col1-1 = *, life col2-2 < 50

dev-gt-50, *, dev col1-1 = *, life col2-2 > 50

dev-lt-25, *, dev col1-1 = *, life col2-2 < 25

dev-gt-25, *, dev col1-1 = *, life col2-2 > 25

dev-eq-43, *, dev col1-1 = *, life col2-2 = 43

dev-ne-43, *, dev col1-1 = *, life col2-2 <> 43

**(All of the above seem to trigger all the time)**

 

dev-eq-43, /(vg.).(\d+)/, dev $1 = *, life $2 = 43

dev-eq-44, /(vg.).(\d+)/, dev $1 = *, life $2 = 44

dev-gt-45, /(vg.).(\d+)/, dev $1 = *, life $2 > 45

dev-lt-45, /(vg.).(\d+)/, dev $1 = *, life $2 < 45

dev-gt-40, /(vg.).(\d+)/, dev $1 = *, life $2 > 40

dev-lt-40, /(vg.).(\d+)/, dev $1 = *, life $2 < 40

**(These seem to trigger randomly. I've seen different ones trigger on logmon restarts even without editing anything)**

 

dev-eq-any, /(vg.).(\d+)/, dev $1 = *, life $2 = *

dev-ne-any, /(vg.).(\d+)/, dev $1 = *, life $2 <> *

**(The first one usually triggers, the second rarely. This was more of a sanity check which clearly failed, not sure if that's the probe or me ;P)**


What's also very strange is that the alarm message, which is always "${dev} lifespan is ${life} (${WATCHER})" will sometimes show ${life} as "43" (correct) but sometimes it'll come in as "4" or "3"....????

 

Btw I also tried creating a file that just contains "/dev/vgc 43" in it and having logmon cat that instead, same results..

 

Any suggestions would be very welcome!

Outcomes