REST API - "No Data"
Anyone know how to pull a list of ALL devices (1000s) with instances reporting "No Data" via the REST API?
Thanks as always!
Todd_Theoret
Posted 9 years ago·Last reply 9 years ago
7 comments
Anyone know how to pull a list of ALL devices (1000s) with instances reporting "No Data" via the REST API?
Thanks as always!
Tom_Lasswell
·9 years agothat's a great idea too, Good find. you can then create a new group for it too. Also was looking into using instance properties for alerts (for something different), store the property source as a number (or do a match w/ groovy) and a complex groovy datapoint and you could create an alert on it as well.
https://www.logicmonitor.com/support/datasources/creating-managing-datasources/creating-complex-datapoints-with-groovy/
scroll to the bottom of that post.
Todd_Theoret
OP9 years agoThank you Tom (as always)
Also, just fyi....I came across another post [Using PropertySources for Reporting] by Billy Yuliadi, which presented an additional option. I just shared the PropertySource M44C23. Thank you Billy!
Sarah_Terry
·9 years agoThanks for sharing, Tom! Hopefully we can make it a bit easier to get this information in app / via API moving forwards :)/emoticons/smile@2x.png 2x" title=":)" width="20">
Tom_Lasswell
·9 years agoThere are ways to set this via an alert. We use a complex formula to determine if a device stopped reporting data:
if(un(CPUUsage),if(un(CPUUsage1),if(un(MemoryActive),if(un(DataRateRx),1,0),0),0),0)
Using this will give us the ability to create an alert, this would then give you the ability to pull alerts from the API and tell you what devices are no longer reporting data properly (or an alert report via the reports section). We just set this as a warn for visibility.
Todd_Theoret
OP9 years agoExactly what we are trying to accomplish...we are dealing with close to 5K devices and need to know quickly if devices which were working are now reporting "No Data"
Thank you!
jesse_jones
·9 years agoIs there a way to run a report for anything reporting "no data"?
Sarah_Terry
·9 years agoHi Todd,
There isn't an easy way to pull devices with instances reporting "No Data" (in the UI or via API) - you can do it based on alerts if alerting is set up for No Data, or the long way by iterating through current data for instances, but there's no great solution right now. It has come up before, so we are exploring what a better solution would look like. Are you just looking to flag devices that aren't reporting data for possible misconfigurations (on LM or device side)? Any additional context you can provide will help us come up with the best possible solution.
Thanks,
Sarah