8 years ago
What is my Instance ID?
Hi all,
I am new to Logic Monitor and I am working on my Python script to gather datapoints but I don't know what the Instance ID is of the data I want. How do I find this out?
Thank yo...
8 minutes ago, Matthew Dunham said:Hi Thomas -
I'd suggest having a look at https://www.logicmonitor.com/support/devices/device-datasources-instances/device-datasources-instances-overview/ to solidify the concept of "singleton" vs "multi-instance" datasources. Note that a singleton won't have an instance id, since there's only a single instance to monitor in that type of datasource.
Once you have that under your belt, have a look at https://www.logicmonitor.com/support/datasources/data-collection-methods/scripted-data-collection-overview/ to understand scripted datasource modes of operation.
Then follow with https://www.logicmonitor.com/support/terminology-syntax/scripting-support/external-scripting/ which provides a simple example of putting together a scripted datasource.
Hope this helps.
-m
Hi Matthew,
Thank you for your prompt reply. If it makes a difference, I should mention that I am trying to do this using a REST API call with a Python Script. Is there a way I can find out the specific instance ID through the API?
Specifically this call:
https://companyname.logicmonitor.com/santaba/rest/device/devices/1234/devicedatasources/123456/instances/????/data?start=1510921472&end=1510950272&datapoints=PercentUsed
How can I find out what I need to put in place of ???? to make this work?
Thanks again.