msgs not matching
list Neil Simmonds
I'm trying to get a match on a log file string but seem to be struggling.
In my analysis.cfg I have the following, LOG /xymon/server/etc/test.log
"%Thread \"WebContainer.{1,75} and may be hung*" COLOR=yellow
On the msgs column on the relevant server I get,
No entries in /xymon/server/etc/test.log
No entries in /tmp/xymontest/ATPReceiptDiag.log
Full log /xymon/server/etc/test.log
Thread "WebContainer : 23" (0000006f) has been active for 686236
milliseconds and may be hung.
Full log /tmp/xymontest/ATPReceiptDiag.log
I've tested my string in my usual regular expression tester and it seems it
should work ok.
Is there something obvious that I've missed?
list Usa Ims
On my xymon 4.3.7 I also modified the client-local.cfg. The client-local.cfg file contains settings that are used by each Xymon client when it runs on a monitored host. It provides a convenient way of configuring clients from a central location without having to setup special configuration maintenance tools on all clients. The client-local.cfg file is currently used to configure what logfiles the client should fetch data from, to be used as the basis for the "msgs" status column; and to configure which files and directories are being monitored in the "files" status column. Note that there is a dependency between the client-local.cfg file and the anaysis.cfg(5) file. When monitoring e.g. a logfile, you must first enter it into the client-local.cfg file, to trigger the Xymon client into reporting any data about the logfile. Next, you must configure analysis.cfg so the Xymon server knows what to look for in the file data sent by the client. So: client-local.cfg defines what raw data is collected by the client, and analysis.cfg defines how to analyze them. On Thu, 9/11/14, Neil Simmonds <user-feff97fabd3d@xymon.invalid> wrote: Subject: [Xymon] msgs not matching To: xymon at xymon.com Date: Thursday, September 11, 2014, 7:14 AM
▸
I’m trying to get a match on a log file
string but seem to be struggling.
In my analysis.cfg I have the following, LOG
/xymon/server/etc/test.log "%Thread
\"WebContainer.{1,75} and may be hung*"
COLOR=yellow
On the msgs column on the relevant server I
get,
No
entries in /xymon/server/etc/test.log
No
entries in /tmp/xymontest/ATPReceiptDiag.log
Full log
/xymon/server/etc/test.logThread
▸
"WebContainer : 23" (0000006f) has been active for
686236 milliseconds and may be hung.
Full log
/tmp/xymontest/ATPReceiptDiag.log
I’ve tested my string in my usual
regular expression tester and it seems it should work
ok.
Is there something obvious that I’ve
missed?
-----Inline Attachment Follows-----
list Neil Simmonds
The clientlocal.cfg entry was already in place as this is a standard test log that we use for testing new log monitors. All my other tests which all work have double quotes around them as they all contain spaces and I've found they only work with the double quotes.
▸
-----Original Message-----
From: usa ims [mailto:user-42bb6445007b@xymon.invalid]
Sent: 11 September 2014 13:04
To: xymon at xymon.com; Neil Simmonds
Subject: Re: [Xymon] msgs not matching
On my xymon 4.3.7 I also modified the client-local.cfg.
The client-local.cfg file contains settings that are used by each Xymon client when it runs on a monitored host. It provides a convenient way of configuring clients from a central location without having to setup special configuration maintenance tools on all clients.
The client-local.cfg file is currently used to configure what logfiles the client should fetch data from, to be used as the basis for the "msgs" status column; and to configure which files and directories are being monitored in the "files" status column.
Note that there is a dependency between the client-local.cfg file and the anaysis.cfg(5) file. When monitoring e.g. a logfile, you must first enter it into the client-local.cfg file, to trigger the Xymon client into reporting any data about the logfile. Next, you must configure analysis.cfg so the Xymon server knows what to look for in the file data sent by the client. So: client-local.cfg defines what raw data is collected by the client, and analysis.cfg defines how to analyze them.
On Thu, 9/11/14, Neil Simmonds <user-feff97fabd3d@xymon.invalid> wrote:
Subject: [Xymon] msgs not matching
To: xymon at xymon.com
Date: Thursday, September 11, 2014, 7:14 AM
I’m trying to get a match on a log file string but seem to be struggling.
In my analysis.cfg I have the following, LOG /xymon/server/etc/test.log "%Thread \"WebContainer.{1,75} and may be hung*"
COLOR=yellow
On the msgs column on the relevant server I get,
No
entries in /xymon/server/etc/test.log
No
entries in /tmp/xymontest/ATPReceiptDiag.log
Full log
/xymon/server/etc/test.logThread
"WebContainer : 23" (0000006f) has been active for
686236 milliseconds and may be hung.
Full log
/tmp/xymontest/ATPReceiptDiag.log
I’ve tested my string in my usual
regular expression tester and it seems it should work ok.
Is there something obvious that I’ve
missed?
-----Inline Attachment Follows-----
list Neil Simmonds
Not sure why the last reply was truncated. What I intended to say was that all my other tests have double quotes around them as they all contain spaces. I don't think it's the quotes that's the issue although it may be something to do with the escaped double quote just before the word WebContainer -----Original Message----- From: Sent: None To: xymon at xymon.com
▸
Subject: RE: [Xymon] msgs not matching
The clientlocal.cfg entry was already in place as this is a standard test log that we use for testing new log monitors.
All my other tests which all
-----Original Message-----
▸
From: usa ims [mailto:user-42bb6445007b@xymon.invalid]
Sent: 11 September 2014 13:04
To: xymon at xymon.com; Neil Simmonds
Subject: Re: [Xymon] msgs not matching
On my xymon 4.3.7 I also modified the client-local.cfg.
The client-local.cfg file contains settings that are used by each Xymon client when it runs on a monitored host. It provides a convenient way of configuring clients from a central location without having to setup special configuration maintenance tools on all clients.
The client-local.cfg file is currently used to configure what logfiles the client should fetch data from, to be used as the basis for the "msgs" status column; and to configure which files and directories are being monitored in the "files" status column.
Note that there is a dependency between the client-local.cfg file and the
anaysis.cfg(5) file. When monitoring e.g. a logfile, you must first enter it into the client-local.cfg file, to trigger the Xymon client into reporting any data about the logfile. Next, you must configure analysis.cfg so the Xymon server knows what to look for in the file data sent by the client. So:
client-local.cfg defines what raw data is collected by the client, and analysis.cfg defines how to analyze them.
On Thu, 9/11/14, Neil Simmonds <user-feff97fabd3d@xymon.invalid> wrote:
Subject: [Xymon] msgs not matching
To: xymon at xymon.com
Date: Thursday, September 11, 2014, 7:14 AM
I’m trying to get a match on a log file string but seem to be struggling.
In my analysis.cfg I have the following, LOG /xymon/server/etc/test.log "%Thread \"WebContainer.{1,75} and may be hung*"
COLOR=yellow
On the msgs column on the relevant server I get,
No
entries in /xymon/server/etc/test.log
No
entries in /tmp/xymontest/ATPReceiptDiag.log
Full log
/xymon/server/etc/test.logThread
"WebContainer : 23" (0000006f) has been active for
686236 milliseconds and may be hung.
Full log
/tmp/xymontest/ATPReceiptDiag.log
I’ve tested my string in my usual
regular expression tester and it seems it should work ok.
Is there something obvious that I’ve
missed?
-----Inline Attachment Follows-----
list Jeremy Laidman
On 11 September 2014 22:31, Neil Simmonds <user-feff97fabd3d@xymon.invalid>
▸
wrote:
Not sure why the last reply was truncated. What I intended to say was that all my other tests have double quotes around them as they all contain spaces. I don't think it's the quotes that's the issue although it may be something to do with the escaped double quote just before the word WebContainer
Yes, the token matching code looks for tabs or spaces as separators, or for
double-quotes as book-end terminators for the tokens. It doesn't know
about escaped double-quotes, and so you cannot use them in your regular
expressions. Instead you can could match with a dot, or an equivalent to a
quote, such as:
LOG /xymon/server/etc/test.log "%Thread \x22WebContainer.{1,75} and may be
hung*" COLOR=yellow
The "\x22" adds the ASCII character for hex 22, which is the double quote.
J
list Betsy Schwartz
FWIW, on things like that I usually make my life easier and just put something like LOG /yadda/yadda %.*Thread.*may.be.hung.* there's always a remote chance of matching something else, but I can live with that.
list Jeremy Laidman
Good tip that. Also I'm pretty sure the leading and trailing ".*" are not required. J
▸
On 14/09/2014 11:27 AM, "Betsy Schwartz" <user-c61747246f66@xymon.invalid> wrote:
FWIW, on things like that I usually make my life easier and just put something like LOG /yadda/yadda %.*Thread.*may.be.hung.* there's always a remote chance of matching something else, but I can live with that.