Xymon Mailing List Archive search

linecount?????

list Joshua Krause
Fri, 5 Oct 2007 09:35:11 -0400
Message-Id: <user-794eef387da4@xymon.invalid>

Is there a way to alarm if the count of a particular word isn't  
there.  I am trying to monitor a log file that applies to a callerid  
program we use.  It will always be sending a phrase "SIP" and when  
that phrase isn't there then the application needs to be checked.  An  
I was hoping that the linecount would be able to help me.  Just  
couldn't find on anything on how to alarm on it.

Josh

On Oct 5, 2007, at 9:09 AM, Trent Melcher wrote:
THis is from the man page

COUNTING LOGENTRIES
A special type of log-handling is possible, where the number of lines
matching a regular expressions are merely counted. This is
linecount:FILENAME, followed by a number of lines of the form
ID:PATTERN. E.g.


   linecount:/var/log/messages

   diskerrors:I/O error.*device.*hd

   badlogins:Failed login


Looks like your format for the patterns you want to match isnt correct

Trent


On Fri, 2007-10-05 at 08:52 -0400, Joshua Krause wrote:
How do you enable it?  My client-local.cfg looks like this:

[gsonc-spg-dncs]
file:/export/home/dncs/mystro/bfs/Compass_OOB/rta.grp.z
log:/dvs/dncs/tmp/bootpd.000:10240
trigger recvd
log:/var/adm/messages:10240
ignore MARK
ignore sendmail

[gsonc-spg-mas-1]
file:/usr/local/mystro/logs/CallerId.log
log:/var/log/messages:10240
ignore MARK
linecount:/usr/local/mystro/logs/CallerId.log
callerid SIP


and my hobbit-client.cfg looks like this:

HOST=%gsonc-spg-dncs
	FILE	/export/home/dncs/mystro/bfs/Compass_OOB/rta.grp.z SIZE>1400
TRACK=rta
	LOG	/dvs/dncs/tmp/bootpd.000 recvd COLOR=yellow
	LOAD	10.0 15.0

HOST=%gsonc-spg-mas-1
	FILE	/usr/local/mystro/logs/CallerId.log TRACK=callerid
	LOG	/usr/local/mystro/logs/CallerId.log TRACK=sip

Am I doing this right or is this not right?