Querying data within a log message
Posted: Fri Jul 24, 2015 8:58 am
I have recently set up a Nagios LogServer trial and I now have the log server monitoring the log files for a particular application across mutilple nodes. This appears to be working well. As an example I have got the log server querying a particular log file on 2 server and returning all instance of "Successful load". I have then setup an alert so that when this appears an alert will be sent to Nagios XI. This is all working well.
The problem I have is that what I am particularly interested in is the data that is in that specific log message. If I take the above example the query will return entries in the log such as:
2015-07-24 09:30:28,746 INFO SystemEvents Successful load for feed ********* took 11094 ms, records read [63724] (duplicates removed before processing [0]), loaded records [63724] (new [0], updated [0], unchanged [63724])
What I am really looking to do is alert when the logs show "Successful load" and then, within Nagios XI (In the status information) return records read [63724], loaded records [63724]. In short I want to identify that a successful load has taken place, this will trigger and alert and pass across some of the data stored within that log message.
I can't see a way of doing this with Nagios Logserver. Is this possible?
The problem I have is that what I am particularly interested in is the data that is in that specific log message. If I take the above example the query will return entries in the log such as:
2015-07-24 09:30:28,746 INFO SystemEvents Successful load for feed ********* took 11094 ms, records read [63724] (duplicates removed before processing [0]), loaded records [63724] (new [0], updated [0], unchanged [63724])
What I am really looking to do is alert when the logs show "Successful load" and then, within Nagios XI (In the status information) return records read [63724], loaded records [63724]. In short I want to identify that a successful load has taken place, this will trigger and alert and pass across some of the data stored within that log message.
I can't see a way of doing this with Nagios Logserver. Is this possible?