Tomcat logging with alerts
Posted: Wed May 06, 2020 11:58 am
Hello,
New to Nagios Log Server as we have had a recent demo and believe this product could work for our environments we really like the ability to run to one log management tool vs scrolling through logs on each individual server.
We heavily use Apache Tomcat for our applications and I was able to follow the instructions to begin importing the logs into the server, I see some logs come in but how would I set up alerts? For example we like to be notified if the following threads (below) begin to pile up and since this could happen multiple times a day we only want to be notified for any new stuck threads.
Lets say I want a warning email for the below for 1 stuck thread but then a critical error alert if it jumped to lets say 5? How would I accomplish something like this?
WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8083-exec-132] (id=[18646020]) has been active for [123,134] milliseconds () to serve the same request for [] and may be stuck (configured threshold for this StuckThreadDetectionValve is [120] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck.
New to Nagios Log Server as we have had a recent demo and believe this product could work for our environments we really like the ability to run to one log management tool vs scrolling through logs on each individual server.
We heavily use Apache Tomcat for our applications and I was able to follow the instructions to begin importing the logs into the server, I see some logs come in but how would I set up alerts? For example we like to be notified if the following threads (below) begin to pile up and since this could happen multiple times a day we only want to be notified for any new stuck threads.
Lets say I want a warning email for the below for 1 stuck thread but then a critical error alert if it jumped to lets say 5? How would I accomplish something like this?
WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8083-exec-132] (id=[18646020]) has been active for [123,134] milliseconds () to serve the same request for [] and may be stuck (configured threshold for this StuckThreadDetectionValve is [120] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck.