Network Change & Configuration Management

Reply

NetMRI API call to find the last time a device communicated

JMetzenthin
Techie
Posts: 13
2345     0

I am trying to build an API call to find the last time NETMRI communicated with a device.  I have found a lot of timestamps in different data structures, but spot checking has shown that I haven't found the timestamp shown in the device window.  Any suggestions?

 

If I can get a reliable timestamp then a external monitor website could be built.

Re: NetMRI API call to find the last time a device communicated

Adviser
Posts: 357
2345     0
I don’t see an API call to get that. We don’t store that directly with the device because we don’t want to update it so frequently for performance reasons. It is actually calculated based on a dozen or so other tables at the time you request the data in the UI. We could add an API call to calculate that, though.

In the meantime if you really want this you can make an HTTP call to:

https://netmri/netmri/results/DeviceViewer/HeaderNew.tdf?DeviceID=xyz

and parse the HTML.

BUT - be aware that this has none of the backward-compatibility guarantees of the real API, so it could change at any time (though it hasn’t for several years).

John
Highlighted

Re: NetMRI API call to find the last time a device communicated

JMetzenthin
Techie
Posts: 13
2345     0

An API call seems like it would be helpful.  If nothing else to not confuse people looking for one going to some of those tables and trying to figure what that timestamp means.

 

Your idea works for getting a result, but isn't very scalable by itself.  Trying to do a monitor dashboard I need to get back lots of results per call, otherwise its going to be a lot of interaction with the server.

 

At some point it appears NetMRI flags a device as unreachable.  If that existed (and reachable by an API call) I could look at the and get an up/down.  Then do the webcall for down device(s) to get a timestamp for determining length of outage when needed.

 

Any suggestions?

Showing results for 
Search instead for 
Do you mean 

Recommended for You