Forum Discussion

Horace_Cheung's avatar
8 years ago

Multi-lines event log file monitoring via Regex


Recently I had a chance to chat with LogicMonitor support team & they recommend a new feature request to be submitted to LogicMonitor DEV team. In short,  there are times when a specific exception is thrown & logged into the Tomcat log file, we would like to monitor not just that line that throw the exception but also multiple lines before and afterwards. Right now LogicMonitor can display that "exception" line only. It will be really helpful in both production and QA environment if LogicMonitor can display multiple lines before and after that exception line being monitored via Regex. Here are 2 examples: 


1. Production - (Pattern to match: "HTTP/1.1failed with response Service Unavailable")

2016-08-04 10:13:49,372 ERROR [NmsThumbnailProvider] GET HTTP/1.1failed with response Service Unavailable
2016-08-04 10:13:50,733 DEBUG [NmsEventMonitor] longPollNmsEvent response [{"id":1273,"properties":{"attribute":"MODE","object":["OFFLINE"],"type":"Device","name":"NETVIZDONGLE"},"value":["OFFLINE"],"values":["OFFLINE"],"affectedAttributes":["MODE"],"uuid":"d9b13d40-0870-1c02-e000-0004a5281cd0","elementID":"d9b13d40-0870-1c02-e000-0004a5281cd0","source":null,"device":true}] code 200
2016-08-04 10:13:50,733 INFO  [RoutingEventServiceImpl] got NMS event: [{"id":1273,"properties":{"attribute":"MODE","object":["OFFLINE"],"type":"Device","name":"NETVIZDONGLE"},"value":["OFFLINE"],"values":["OFFLINE"],"affectedAttributes":["MODE"],"uuid":"d9b13d40-0870-1c02-e000-0004a5281cd0","elementID":"d9b13d40-0870-1c02-e000-0004a5281cd0","source":null,"device":true}]
2016-08-04 10:13:50,733 INFO  [RoutingServiceImpl] onDeviceChanged: controller = 

2. QA testing - (Pattern to match: "Caused by: java.lang.NullPointerException")

    at org.springframework.jms.listener.DefaultMessageListenerContainer$
Caused by: java.lang.NullPointerException
    at com.arthrex.synergy.routing.nexxis.RoutingControllerServiceImpl.attemptToTelnetRoutingController(
    at com.arthrex.synergy.routing.nexxis.RoutingControllerServiceImpl.tenetToNmsService(


Please let me know whether this can be turn into a feature for future release. It will help reducing amount of troubleshooting time. 

Thanks & Best Regards,

Horace Cheung