Forum Discussion

rvanvuuren's avatar
rvanvuuren
Icon for Neophyte rankNeophyte
5 days ago

LogicMonitor Python API | Gather Stats

Hi All,

I am looking into gathering stats from various devices (CPU usage, Memory usage, interface specific stats etc) programatically with Python. I am specifically using the LogicMonitor SDK for Python and have been wondering if anyone has had any luck gathering those types of stats from the API?

Documentation I am following: LM API SDK

 

What I have been doing:

  1. get_device_list. From this I am able to get the necessary deviceIDs
  2. get_device_datasource_list. Here I can see the data sources and their IDs.

However, when I try to get_device_datasource_data_by_id with the IDs gathered in step 2, I get this error

HTTP response body: {"errorMessage":"DeviceDataSource<13084642> is not found","errorCode":1404,"errorDetail":null}

Is there an easier way to get these stats that I am not seeing?

 

  • If I had to guess you are not feeding the proper DeviceID and DeviceDatasourceID into the the call.

    Can you give us an example of the output of call 1 and then call 2 and how you are feeding them into call 3?