ContributionsMost RecentMost LikesSolutionsRe: API call - Postman - select specific systemProperties - ?fields= Based on this discussion I'm looking at this example in the API documentation: https://www.logicmonitor.com/support/rest-api-developers-guide/v1/devices/get-devices#Example-Request-5--GET-all-devices-that-have-a-spe And wondering about this example filter: filter=customProperties.name:snmp.version,customProperties.value:v2c It seems like what it should be doing is filtering on devices that have a customProperty named snmp.version with a value of "v2c". But what it may actually be doing is filtering on devices that have a customProperty with name snmp.version and/or (question?) a customProperty with a value of "v2c". Since all devices probably have the first condition it is probably moot, and also since no other property probably has a value of v2c it may actually work. But that's a bit of a stretch for any name:value pairs on real devices. Am I misunderstanding this? I'm wanting to make a filter on system.collector equals true, but if the above is true, then all devices would match having a property with that name and matching a value of false is also equally useless. Any ideas how to return a list of devices via API that are collectors? Re: Ping between all collectors? 36 minutes ago, Stuart Weenig said: Oh right, sorry. There would be two major parts to this. The first would be to write a property source. Apply that property source to anything using 'hasCategory("collector")' as the AppliesTo. Write a script to set the IP addresses you want that collector to ping as a property (collectorpeers.ips for example). You could use the LM API to get the IP addresses of the collectors, although that could be version 1.1. Then you need to work on the pingMulti datasource. Even if you're not using this for something else already, clone it and make the changes to the clone. Apply it to any device that has the property you set in the property source. Then enable active discovery and use a script like this to create the instances: try{ hostProps.get("collectorpeers.ips").tokenize(",").each{ target = it.tokenize("|") println(target[0] + "##" + target[1]) } return 0 } catch (Exception e){return 1} This assumes that the value of the property set by your property source is: ip1|name1,ip2|name2,ip3|name3,etc. Discovery will get the instances created, which will be the list of all IPs of all collectors. Ok thanks again - I have this working with a propertysource script and manually entered string of collector IPs and names. I created a cloned datasource "PingMulti_WAN-" and AppliesTo: "auto.collectorpeers.ips". Is it possible in the propertysource to programmatically get the collector ips or does that just have to be done externally? One downside of the static list (besides that it is static) is it adds the local collector to the list and pinging itself isn't necessary of course. Thanks again, Jason Re: Ping between all collectors? On 5/25/2021 at 2:39 PM, Stuart Weenig said: No time right now to go into details, but write a propertysource that sets the IP addresses of all collectors (or all collectors in the same group) as a property on the collector. Then use active discovery on pingMulti to create the individual instances. Will provide more detail later. Thank you this is great - any chance you have a little more detail on how to do this or maybe an example that would point me in the right direction? Thanks, Jason Ping between all collectors? Has anyone done any kind of data source which would basically do a full mesh ping between collectors? We have 20 or so collectors spread across different sites and WAN links and it would be extremely useful to monitor reachability between them all. It seems like this wouldn't be too hard as LM knows about all the collectors and could have some sort of wildcard ping between them. But adding them all individually through multi-ping is a royal pain. Any ideas on that? Thanks, Jason Create an alert based on sum of two datasources? I'd like to create an alert when the sum of a datasource from two different instances goes above a certain value. Is there any way to do this? I have it displayed this way in a widget already, but no option for using that to trigger an alert. Any other suggestions? Thanks, Jason
Top ContributionsRe: Ping between all collectors?Re: Ping between all collectors?Ping between all collectors?Create an alert based on sum of two datasources?Re: API call - Postman - select specific systemProperties - ?fields=