gwengrafana

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About gwengrafana

  • Rank
    Community Member
  1. Just found this to try. https://www.logicmonitor.com/support/rest-api-developers-guide/v1/services/get-all-alerts-for-a-service/
  2. Thanks! There was another page that suggested you could do that. https://www.logicmonitor.com/support/rest-api-developers-guide/v1/collector-groups/get-collector-groups/ You can use the '.' character to filter values within an object But, yes it doesn't mention that on the alert page. I tried the above and just get data that doesn't match, I can write somethingthatdefowontexist and it still return the same data I have now found that I can go the other way round $resourcePath = '/device/groups/2846/alerts' This works will for the devices but I am then going to miss websites that alert.
  3. Ah okay so my companies naming convention has fooled me into thinking that the filter was called location, when I clear the filter it calls the box Group. When I look in the alert json data I can see monitorObjectGroups is that the same thing? If so I was trying below with no luck $resourcePath = '/alert/alerts' $filters = '?filter=severity>:4&filter=monitorObjectGroups.id:4773'
  4. In the logic monitor website I can filter alerts by location, I don't see that entry in the json file returned by the API. How do I get alerts per location please?
  5. Ak okay, so data rather than instances. Thank you, this gives with some data back although seems to have no values but I guess that may be a different issue. { "dataSourceName": "PingMulti", "dataPoints": [ "avgrtt", "maxrtt", "minrtt", "PingLossPercent", "recvdpkts", "sentpkts" ], "instances": { } }
  6. Thanks, $resourcePath = '/device/devices/465103/devicedatasources' gives me "id": 8252658, "deviceId": 465103, "dataSourceId": 376, $resourcePath = '/device/devices/465103/devicedatasources' $fields = '?filter=dataSourceId:376' Gives me a slimdowned version of the results. But I am failing to understand deviceDataSourceId as $resourcePath = '/device/devices/465103/devicedatasources/376/instances OR $resourcePath = '/device/devices/465103/devicedatasources/8252658/instances returns nothing.
  7. I can see from $resourcePath = '/setting/datasources' $fields = '?filter=displayName:Ping' That the dataSourceId I am interested in is id = 21 "id": 21, "description": "", "group": "", "appliesTo": "isDevice()", "technology": "", "tags": "ping,network", "name": "Ping", "displayName": "Ping", "version": 1515163055, "auditVersion": 0, "hasMultiInstances": false, "collectInterval": 60, "collectMethod": "ping", But when I look at the machine I am interested in, I do not find that id attached, yet in the UI the Ping graph is being filled in.
  8. Hey I'm wanting to access the ping data of a device. I've not found an example in the v1 API document that shows how to do this. I've tried the below but haven't found what I expect, i.e. a long list of ping + time + result. $resourcePath = '/device/devices/465103/devicedatasources/376/data' $epochseconds = Get-Date (Get-Date).ToUniversalTime() -UFormat %s $fields = '?start=' + $epochseconds $url = 'https://' + $company + '.logicmonitor.com/santaba/rest' + $resourcePath + $fields Thanks