Re: Notification Issues

Jonathan Heard <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <[email protected]>
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
> _______________________________________________
> 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

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.