Forum Discussion

Horace_Cheung's avatar
8 years ago

Multi-lines event log file monitoring via Regex

Hi, 

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://10.101.84.12:8080/barco-webservice/rest/NetworkWall/proxy-source/dvi1-1-mna-2530007307/thumbnails/snapshot 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 = 10.101.84.12Production: 

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

    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:992)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
    at com.arthrex.synergy.routing.nexxis.RoutingControllerServiceImpl.attemptToTelnetRoutingController(RoutingControllerServiceImpl.java:66)
    at com.arthrex.synergy.routing.nexxis.RoutingControllerServiceImpl.tenetToNmsService(RoutingControllerServiceImpl.java:46)

 

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