Re: Notification Issues
"Madden, Joe" <[email protected]>
| Newsgroups | gmane.network.opennms.general |
|---|---|
| Message-ID | <LO1P123MB00517DC67F91268260D9D6E091C70@LO1P123MB0051.GBRP123.PROD.OUTLOOK.COM> |
Hi Jonathan, Perfect – Thank you. I have this working now. The Notification builder still doesn’t validate correctly but I am getting notifications as I expect now. Cheers Joe. From: Jonathan Heard [mailto:[email protected]] Sent: 28 February 2018 09:31 To: [email protected] Subject: Re: [opennms-discuss] Notification Issues Hi Joe, You can't use the shorthand syntaxes of 'is<service>' or 'catinc<category>' for anything containing spaces - it had to be done longhand. You've already got an example of this in your filter (bold): "(((IPADDR IPLIKE *.*.*.*) & (isSEUTMC Database - Server Checks | isNECA Database Service Checks Status | isNorfolk DB |isAberdeen - Database Server Checks )) & (nodeId == 152) & (ipAddr == '185.216.76.155') & (serviceName == 'NECA Web Client Login Page Ext Check'))" So in order for this to work you need to change the other elements e.g. serviceName == 'SEUTMC Database - Server Checks' | serviceName == '...' Hope this helps Jonathan On 28/02/18 08:54, Madden, Joe wrote: Hi all, I am trying to setup some notifications for services which have spaces in their name which is causing the parse to fail: 2018-02-27 10:56:16,286 ERROR [Notifd:BroadcastEventProcessor-Thread] o.o.n.c.NotificationManager: Invalid filter rule for notification DBA notification for Server Check Issues: (IPADDR IPLIKE *.*.*.*) & (isSEUTMC Database - Server Checks | isNECA Database Service Checks Status | isNorfolk DB |isAberdeen - Database Server Checks ) org.opennms.netmgt.filter.api.FilterParseException: Filter Parse Exception occurred testing rule "(((IPADDR IPLIKE *.*.*.*) & (isSEUTMC Database - Server Checks | isNECA Database Service Checks Status | isNorfolk DB |isAberdeen - Database Server Checks )) & (nodeId == 152) & (ipAddr == '185.216.76.155') & (serviceName == 'NECA Web Client Login Page Ext Check'))" for matching results: Could not find the column 'Database' in filter rule at org.opennms.netmgt.filter.JdbcFilterDao.isRuleMatching(JdbcFilterDao.java:374) ~[opennms-config-20.0.2.jar:?] at sun.reflect.GeneratedMethodAccessor914.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[org.apache.servicemix.bundles.spring-tx-4.1.6.RELEASE_1.jar:?] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[org.apache.servicemix.bundles.spring-tx-4.1.6.RELEASE_1.jar:?] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[org.apache.servicemix.bundles.spring-tx-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at com.sun.proxy.$Proxy119.isRuleMatching(Unknown Source) ~[?:?] at org.opennms.netmgt.config.NotificationManager.isRuleMatchingFilter(NotificationManager.java:391) [opennms-config-20.0.2.jar:?] at org.opennms.netmgt.config.NotificationManager.nodeInterfaceServiceValid(NotificationManager.java:386) [opennms-config-20.0.2.jar:?] at org.opennms.netmgt.config.NotificationManager.getNotifForEvent(NotificationManager.java:300) [opennms-config-20.0.2.jar:?] at org.opennms.netmgt.notifd.BroadcastEventProcessor.scheduleNoticesForEvent(BroadcastEventProcessor.java:511) [opennms-services-20.0.2.jar:?] at org.opennms.netmgt.notifd.BroadcastEventProcessor.onEvent(BroadcastEventProcessor.java:208) [opennms-services-20.0.2.jar:?] at org.opennms.netmgt.eventd.EventIpcManagerDefaultImpl$EventListenerExecutor$2.run(EventIpcManagerDefaultImpl.java:183) [org.opennms.features.events.daemon-20.0.2.jar:?] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618) [?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45] at org.opennms.core.concurrent.LogPreservingThreadFactory$2.run(LogPreservingThreadFactory.java:106) [opennms-util-20.0.2.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45] 2018-02-27 10:56:16,288 ERROR [Notifd:BroadcastEventProcessor-Thread] o.o.n.n.BroadcastEventProcessor: Couldn't get notification mapping for event uei.opennms.org/nodes/nodeLostService, not scheduling notice. org.opennms.netmgt.filter.api.FilterParseException: Filter Parse Exception occurred testing rule "(((IPADDR IPLIKE *.*.*.*) & (isSEUTMC Database - Server Checks | isNECA Database Service Checks Status | isNorfolk DB |isAberdeen - Database Server Checks )) & (nodeId == 152) & (ipAddr == '185.216.76.155') & (serviceName == 'NECA Web Client Login Page Ext Check'))" for matching results: Could not find the column 'Database' in filter rule at org.opennms.netmgt.filter.JdbcFilterDao.isRuleMatching(JdbcFilterDao.java:374) ~[opennms-config-20.0.2.jar:?] at sun.reflect.GeneratedMethodAccessor914.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[org.apache.servicemix.bundles.spring-tx-4.1.6.RELEASE_1.jar:?] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[org.apache.servicemix.bundles.spring-tx-4.1.6.RELEASE_1.jar:?] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[org.apache.servicemix.bundles.spring-tx-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[org.apache.servicemix.bundles.spring-aop-4.1.6.RELEASE_1.jar:?] at com.sun.proxy.$Proxy119.isRuleMatching(Unknown Source) ~[?:?] at org.opennms.netmgt.config.NotificationManager.isRuleMatchingFilter(NotificationManager.java:391) ~[opennms-config-20.0.2.jar:?] at org.opennms.netmgt.config.NotificationManager.nodeInterfaceServiceValid(NotificationManager.java:386) ~[opennms-config-20.0.2.jar:?] at org.opennms.netmgt.config.NotificationManager.getNotifForEvent(NotificationManager.java:300) ~[opennms-config-20.0.2.jar:?] at org.opennms.netmgt.notifd.BroadcastEventProcessor.scheduleNoticesForEvent(BroadcastEventProcessor.java:511) [opennms-services-20.0.2.jar:?] at org.opennms.netmgt.notifd.BroadcastEventProcessor.onEvent(BroadcastEventProcessor.java:208) [opennms-services-20.0.2.jar:?] at org.opennms.netmgt.eventd.EventIpcManagerDefaultImpl$EventListenerExecutor$2.run(EventIpcManagerDefaultImpl.java:183) [org.opennms.features.events.daemon-20.0.2.jar:?] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618) [?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45] at org.opennms.core.concurrent.LogPreservingThreadFactory$2.run(LogPreservingThreadFactory.java:106) [opennms-util-20.0.2.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45] Anyone got any ideas how I can get around this? Hopefully without renaming all my services. I guess it’s the spaces that are causing the issues? I had to configure this manually in the XML as the notification tool was complaining that the service names didn't meet the filter requirements Joe. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=01%7C01%7Cjoe.madden%40mottmac.com%7Ccc3169336cb74c882a9f08d57e8e20a8%7Ca2bed0c459574f73b0c2a811407590fb%7C0&sdata=u3QbWE5wtK%2Bqt5xyce6SaZPXghXBgr8A5%2FPUeeRJwyc%3D&reserved=0> _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.opennms.org%2Findex.php%2FMailing_List_FAQ&data=01%7C01%7Cjoe.madden%40mottmac.com%7Ccc3169336cb74c882a9f08d57e8e20a8%7Ca2bed0c459574f73b0c2a811407590fb%7C0&sdata=q5sFqoXg6g6y5mBX%2Bf2tLcWUK5IFTfWAQYCSlydjc0U%3D&reserved=0> opennms-discuss mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-discuss<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopennms-discuss&data=01%7C01%7Cjoe.madden%40mottmac.com%7Ccc3169336cb74c882a9f08d57e8e20a8%7Ca2bed0c459574f73b0c2a811407590fb%7C0&sdata=IPFUPnmdAmDVL689QoLl%2FyML55aPl%2Fh8pCIGgsPB1cs%3D&reserved=0> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-discuss mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-discuss