Forum Discussion
20 Replies
- Cole_McDonald
Professor
Yeah, I'm using the ID of each bit exclusively. I figured we need the instance IDs as they apply to the specific resource rather than the id of the DS itself... which would be the same for every instance of that DS as applied to any resource. I've built quite a few Relational DB driven apps
I've spent my time chasing IDs... and then banging my head against my desk once the "obvious" problem was unconvered.
The instance shows the deviceID, the deviceDataSourceID, and the instanceIDs as their own properties in the returned JSON (here parsed into a PSObject). that dds ID should be the specific ID of the DS as applied to that device. Everything seems to be correct on the walk up to the "/data" I'm a little surprised we can't just get "/instance/#####/data" from it as a direct access to the endpoint of the walk since it's a unique ID for the instance itself. Overly complicated data access method that is prone to error and misinterpretation.
- Anonymous
Yes, a Resource Metric Trend report would do this for you.
- usnishguha
Neophyte
Thanks @Stuart Weenig, I have earlier checked the option, but what I was looking for is the detailed data with a custom interval (greater than the polling interval of the datasource). Can you please help with that?
- Anonymous
Ok, so you want to aggregate data over the selected timeframe to get an average, sum, or percentile for each device?
- Anonymous
Like this (but obviously CSV)?
- usnishguha
Neophyte
Hi @Stuart Weenig, not really this. I was looking to know if there's anyway we can export the raw data from the data source but with custom interval (different from the polling interval of the datasource). Can this be done via API?
- Anonymous
Like if you're polling at 1 minute but you want to pull the data with a resolution of every 5 minutes? Closest thing might be the graph data api endpoints.
- usnishguha
Neophyte
yes @Stuart Weenig, exactly like that. Can you please help me to find any sample API scripts in which can referred for this purpose? Thanks in advance.
- usnishguha
Neophyte
@Stuart Weenig, thanks a lot for your detailed answer. I am struggling to some extent with Python SDK ( I am new to this). I have tried to download the tar.gz and extracted it. Then I tried running a sample from here: https://www.logicmonitor.com/support/rest-api-developers-guide/logicmonitor-sdks. But it's giving me this error,
ModuleNotFoundError: No module named 'certifi'
I am probably doing it wrong. Is there any url which helps in starting with the SDKs?
Thanks in advance.
- usnishguha
Neophyte
Hi @Stuart Weenig, I was able to get past the "certifi" module error after installing it. But can you please let me know about this problem,
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'lm' is not defined
>>>
*seems it doesn't find lm module.
Related Content
- 27 days ago