• 0

LogicMonitor API Datasource Not Showing


Will Holland
 Share

Question

Since my previous issue here, I have been given access to the "/setting/datasources" resource and have been digging around inside API V2. 

I am able to grab all datasources and subsequently their devices, and I see the device I want to grab data from. This device is shown in both responses by using "/setting/datasources/{id}/devices" and "/device/devices/{device_id}". The device that is listed in both have the same id as well.

There are oddities within the datasources I'm able to access (it's not a permission issue). I know this device is using the WinCPU datasource and I can see it is using it by calling the "/setting/datasource/{id}/devices" for the WinCPU id, but when using the "/device/devices/{device_id}/devicedatasources" resource, the WinCPU datasource does not show up and I cannot make the "/device/devices/{device_id}/devicedatasources/{id}/data" resource fetch the data that is clearly shown in the dashboard view in the browser. 

Why would this device act weird like this? I can see that it is using the WinCPU datasource under the resources tab in the browser, but I can't fetch any data from it. Is there any reason why WinCPU wouldn't be listed when using the "/device/devices/{device_id}/devicedatasources" resource through the API?

Thanks

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
26 minutes ago, Will Holland said:

Since my previous issue here, I have been given access to the "/setting/datasources" resource and have been digging around inside API V2. 

I am able to grab all datasources and subsequently their devices, and I see the device I want to grab data from. This device is shown in both responses by using "/setting/datasources/{id}/devices" and "/device/devices/{device_id}". The device that is listed in both have the same id as well.

There are oddities within the datasources I'm able to access (it's not a permission issue). I know this device is using the WinCPU datasource and I can see it is using it by calling the "/setting/datasource/{id}/devices" for the WinCPU id, but when using the "/device/devices/{device_id}/devicedatasources" resource, the WinCPU datasource does not show up and I cannot make the "/device/devices/{device_id}/devicedatasources/{id}/data" resource fetch the data that is clearly shown in the dashboard view in the browser. 

Why would this device act weird like this? I can see that it is using the WinCPU datasource under the resources tab in the browser, but I can't fetch any data from it. Is there any reason why WinCPU wouldn't be listed when using the "/device/devices/{device_id}/devicedatasources" resource through the API?

Thanks

 

I just ran a debug call on one of our portals and definitely see the CPU datasource.  They did replace it with a new one (below), so perhaps yours also has the new one?

   62  HASH(0x56202b1e0638)
      'dataSourceName' => 'Microsoft_Windows_CPU'
      'id' => 779406
      'instanceNumber' => 1

Mark

Link to comment
Share on other sites

  • 0
22 hours ago, mnagel said:

  62  HASH(0x56202b1e0638)
      'dataSourceName' => 'Microsoft_Windows_CPU'
      'id' => 779406
      'instanceNumber' => 1

Looking at the "/setting/datasources", I don't have the same datasource listed at id = 62 and Microsoft_Windows_CPU is not listed in the datasources section of logicmodules. Is this Microsoft_Windows_CPU a drop-in replacement that will build on top of existing WinCPU data?

Link to comment
Share on other sites

  • 0
1 hour ago, Will Holland said:

Looking at the "/setting/datasources", I don't have the same datasource listed at id = 62 and Microsoft_Windows_CPU is not listed in the datasources section of logicmodules. Is this Microsoft_Windows_CPU a drop-in replacement that will build on top of existing WinCPU data?

Well sure, mine was from one of our devices -- IDs will not match.  Main point was I dumped the results of /device/devices/$device->{id}/devicedatasources for a Windows server and it did include the CPU datasource info.  It could be the old WinCPU or this new one, but either way both datasources with and without multiple instances should be included in the result.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share