ContributionsMost RecentMost LikesSolutionsRe: API - Alerts - Filter by location Just found this to try. https://www.logicmonitor.com/support/rest-api-developers-guide/v1/services/get-all-alerts-for-a-service/ Re: API - Alerts - Filter by location 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 thesame 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. Re: API - Alerts - Filter by location 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 seemonitorObjectGroups 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' Re: API - Alerts - Filter by location API - Alerts - Filter by location 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? Re: Access Raw Data via API Ak okay, so data rather than instances. Thankyou, 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": { } } Re: Access Raw Data via API 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. Re: Access Raw Data via API 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. Access Raw Data via API 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 Solved
Top ContributionsRe: API - Alerts - Filter by locationRe: API - Alerts - Filter by locationRe: API - Alerts - Filter by locationRe: API - Alerts - Filter by locationAPI - Alerts - Filter by locationRe: Access Raw Data via APIRe: Access Raw Data via APIRe: Access Raw Data via APIAccess Raw Data via APISolved