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

How can I add IP addresses from provisioned nodes in notifications?

0 votes

I want to show IP addresses from a node in notifications. %interface% doesn't work in this case.



    <notification name="DSLdown" status="on" writeable="yes">


        <rule>(IPADDR IPLIKE *.*.*.*</rule>
prov. config:
   <node building="" foreign-id="1000" node-label="node1">
        <interface descr="" ip-addr="" snmp-primary="P"/>
        <interface descr="" ip-addr="" snmp-primary="N"/>
OpenNMS version
asked Oct 17, 2013 by mfuhrmann (7,350 points)

1 Answer

0 votes
Best answer
Ok, I explain why %interface% didn't work, cause the reason for a nodeDown is the whole node with all of its IP interfaces is not available. In contrast a nodeLostService or an interfaceDown event are related to an IP address so you will have an %interface% in the notification. The nodeDown on the other hand means simply all IP addresses on the whole node are not reachable, which is the reason there is no %interface% variable evaluated.
answered Oct 17, 2013 by indigo (11,140 points)
selected Oct 22, 2013 by mfuhrmann
Ok, now I understand why OpenNMS behaves like that. But this isn't the best solution, isn't it?
It is possible to show asset or event information about a node. But it is not possible to show ip addresses (in this case)? If it's worth, I will create an issue at issues.opennms.org. Thanks for feedback.
I think it seems reasonable to have an additional parameter like %nodeIpAddresses% which evaluates the list of IP addresses. It should be considered in IPv4 + IPv6 environments and on devices with a lot of IP addresses this could become really fast unusable. Imagine a normal IPv6 device can have a lot of addresses. I've worked on routers with 170.000 virtual interfaces and each had an IP address assigned. So it really depends on the use case you want to address with the enhancement. I can imagine there is one, this could be something for a opennms-discuss mailing list.