[hobbit] hobbit-clients.cfg

Henrik Stoerner henrik at hswn.dk
Wed Jul 5 23:38:40 CEST 2006


On Wed, Jul 05, 2006 at 05:18:07PM -0400, Sean Hennessey wrote:
>> What exactly is the point in having both of these rules ? I cannot tell
>> if you want 5 or 9 sm_server processes.
> 
> --For testing purposes to see if my regexp's where wrong or the docs where
> wrong :)

Fair enough. Although for regexp testing, I'd recommend using the
"pcretest" utility that comes with the PCRE library. It's the best
way of doing that.

> I was thinking about digging into the code to see if it would be possible to
> have it exit once it hits the first match. Do you see this as being a major
> endeavor? It's either that, write out over 40 individual host lines, or
> write some exclude's.

It's not really possible, because logically it doesn't make sense.
Consider this: You have a bunch of "java" processes you want to check -
there must be at least 10. And then there's a specific "java -Dfoobar"
process that must exist, but only once. So:
   PROC java 10
   PROC %java.*-Dfoobar 1 1

If you exit after the first match, then the second rule is ignored, and
you won't get the check for that specific java process. So maybe we can
reverse the lines:
   PROC %java.*-Dfoobar 1 1
   PROC java 10

Now you get the right check for the "java ... -Dfoobar" process, but
that one won't be counted along with the other "java" processes - and
that doesn't seem right either.


So I still believe the current way that Hobbit does it is "right". In
your case, how about

HOST=pdcd20-ic1
	PROC sm_server 9 9 RED

HOST=%(c[ar]y|omz|rch|[pn]dc)(d20-ic[1-3]|d15-ic[3-5]|d[0-9]*-icb).*
	PROC sm_server 2 2 RED EXHOST=pdcd20-ic1

HOST=%(c[ar]y|omz|rch|[pn]dc)d[0-9]*-ic.*
	PROC sm_server 1 1 RED EXHOST=pdcd20-ic1



Regards,
Henrik




More information about the Xymon mailing list