ReST API query for alarm

ReST API to know the alarm which is newer than 22-Sept-2020 09:10:00, and the severity is greater than MINOR, and the alarm is not acknowledged?

Executing the following api but getting the error.
localhost:8980/opennms/rest/alarms?query=lastEventTime%20%3E%20’2020-09-22T09%3A10%3A00.000-07%3A00’%20AND%20severity%20%3E%20MINOR%20AND%20alarmAckUser%20IS%20NULL

That doesn’t quite look like the right format from the documentation. https://docs.opennms.org/opennms/releases/26.2.1/guide-development/guide-development.html#_alarms

But I found the query in the OpenNMS ReST Document.

  • I want one more clarification, Suppose A, B, and C are three interconnected NODES (A-B, A-C, and B-C), Assume the link between A and B goes bad then the OpenNMS will trigger the events for both the node. Since the link is same for both so I want only one event, like “operational service is down between nodes A and B.”, Can I configure like this?

That is a very old article on the ReST interface. The link in my previous post is the most current documentation.

1 Like

I want one more clarification, Suppose A, B, and C are three interconnected NODES (A-B, A-C, and B-C), Assume the link between A and B goes bad then the OpenNMS will trigger the events for both the node. Since the link is same for both so I want only one event, like “operational service is down between nodes A and B.”, Can I configure like this?
Any idea about this?

I believe you can do that with event correlation/situations, however that is not a feature I am using, so I can’t speak to that. This question would be better as a separate topic post.

1 Like