Monitoring JAVA logs

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Monitoring JAVA logs

Post by vmesquita »

hello,

We are trying to integrate a Java log into Log Server. We found some documentation on how to set up a filter for log stash, but we didn't manage to adapt it with Nagios Log Server. The information can be found here:

https://gist.github.com/smougenot/3182192

Essentially we would like to be able to parse multiline Java logs. How can we do this?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Monitoring JAVA logs

Post by sreinhardt »

I think we have a fairly good idea of how this filter is or should be working, and can see where it would break apart the top line from the rest of the lines. Could you provide an example or two from your system so that we can make sure it matches correctly when we are done?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: Monitoring JAVA logs

Post by vmesquita »

Sure, here you are.
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Monitoring JAVA logs

Post by sreinhardt »

Thanks! I'll test out my thoughts on it and hopefully have an updated filter for you soon!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
globalgiving
Posts: 25
Joined: Thu Aug 28, 2014 9:57 am
Location: Washington, DC
Contact:

Re: Monitoring JAVA logs

Post by globalgiving »

Has there been an update on this? I am also interested in properly capturing multiline Java logs
Justin Rupp
Senior Systems Ninja
GlobalGiving Foundation
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Monitoring JAVA logs

Post by cmerchant »

I found this link referring to multi-line java log entries from a rsyslog mail list:

http://lists.adiscon.net/pipermail/rsys ... 028813.htm

You want to use the following in your rsyslog.conf for the java logs:
the setting is $InputFileReadMode

0 = default, line based

1 = indented

2 = paragraph

this will append the indented lines following the first java log entry with an octal character on the first log entry.

You need to handle the multiine input at the sender side by inserting this into your rsyslog.conf (or tomcat.conf):

Code: Select all

$InputFileReadMode 1
and restarting rsyslogd
Locked