Welcome to Questions - Ask OpenNMS, where you can ask questions and receive answers from other members of the community.

How to exclude ip addresses in category rules?

0 votes
987 views
I need a filter that shows availability from my internet addresses only (icmp). I have to deny all 172.27.* addresses from category fw-at.
 
 
Node definition:
 
   <node foreign-id="fw-at-graz" node-label="fw-at-graz">
        <interface ip-addr="172.27.61.1" snmp-primary="P">
            <monitored-service service-name="ICMP"/>
            <monitored-service service-name="SNMP"/>
        </interface>
        <interface ip-addr="88.117.168.123" snmp-primary="S">
            <monitored-service service-name="ICMP"/>
        </interface>
<category name="fw-at"/>
    </node>
 
 
I build rules like this:
 
<rule><![CDATA[catincfw-at&(IsSnmpPrimary == 'S')]]></rule>
<rule><![CDATA[(!(IPADDR IPLIKE 172.27.*.*) & (categoryname == 'fw-at'))]]></rule>
But they didn't work. I always get both interfaces listed.
 
The problem is the negation from 172.27.*, because this didn't work, too.
<rule><![CDATA[(!(IPADDR IPLIKE 172.27.1-254.1-254))]]></rule>
<rule><![CDATA[(IPADDR != 172.27.1-254.1-254)]]></rule>
 
But notification filters like this one work fine:
(!(IPADDR IPLIKE 172.27.*.*) & categoryname == 'fw-at')
 
 
Thanks for help
OpenNMS version
1.12.5
asked Mar 27, 2014 by mfuhrmann (7,350 points)
retagged Mar 28, 2014 by mfuhrmann

1 Answer

0 votes

Does the

<rule><![CDATA[!(IPADDR IPLIKE 172.27.*.*)]></rule>

work as expected?

answered Jun 20, 2014 by indigo (11,480 points)
No. It doesn't work. But I have to combine it with "&(catincfw-at)". Otherwise I' getting too much hits.
...