Antony Hawkins 0 Report post Posted October 13, 2017 (edited) Q: What does it do? A: Calls the LogicMonitor API and finds, for each applicable device, a list of DataSource Names that exist on the Device, i.e. have at least one instance. This also includes ConfigSources active on the Device. These are put together as a semicolon-seperated list in the property auto.activedatasources: Q: Why? I can just look at the Device in the Device tree. A: You can, but... This PropertySource means you can create Dynamic Groups and Device Inventory Reports based on the presence or absence of *any* combination of DataSources on Devices. Q: Can you give me a real-world example of this being useful? A: Yes. On a Microsoft SQL server, LogicMonitor will find the SQL Services via WMI, but the actual SQL Server metrics are found via Perfmon or JDBC methods. If we can't access Perfmon or JDBC for any reason (required services not running, lack of credentials, etc) we'll be missing the SQL stats but quite probably getting all the other Windows metrics (via WMI). This can be very difficult to spot if you have one affected SQL server out of 1,000. With this PropertySource running, you could create a Dynamic Group with a custom query of: auto.ActiveDataSources =~ "WinSQLServices-" && auto.ActiveDataSources !~ "WinSQLServer-" && auto.ActiveDataSources !~ "WinSQLServer_JDBC-" This will list all the devices on which we've found SQL Services but have failed to find any SQL metrics. Similarly Exchange Services are discovered via WMI, whilst most Exchange metrics come from Perfmon. Or, maybe you want to create a Group to contain all your Linux servers that are running Apache web server and MySQL: isLinux() && auto.ActiveDataSources =~ "Apache-" && auto.ActiveDataSources =~ "Mysql-" You will need: A REST API Access ID and Access Key for a user with permissions to at least view all Devices within the account (or all Devices in whichever Groups you wish to consider). These should be set as properties 'apiaccessid.key' and 'apiaccesskey.key' within the Devices tree (generally the root level, or a Group level if appropriate). The PropertySource will use these to find the list of DataSources present on the Device, and create the auto.activedatasources property for all devices. auto.activedatasources will have one of two error messages if the required API details are not present or do not give sufficient access to query the Device; this could of course also be used to create Dynamic Groups and in Device Inventory Reports. Note that DataSources are listed by their (unique) 'Name' rather than their (not necessarily unique) 'Displayed As' string seen in the Device tree. v1.0.0: ZLTDWM Current limitations: The auto.property fields are limited to 2,000 characters, so if the list of DataSource Names exceeds this size, the data will be truncated. This is likely to be an edge case only seen on test Devices with multiple custom DataSources applied. Auto Properties are updated daily or when Active Discovery is run for a Device, so there may (will!) be a time lag between DataSources being applied to a Device and those DataSources appearing in this auto.activedatasources property list. Edited October 13, 2017 by Antony Hawkins Quote Share this post Link to post Share on other sites
Tom Lasswell 21 Report post Posted October 26, 2017 This wasn't working for us, I think we ran into a bug somewhere where uppercase property sources weren't working, i set them to lowercase in this one and it started working. not sure why that was an issue though, i've got other datasources that i believe i have uppercase letters in. just an fyi. this is great though, will use this in our dynamic grouping applies to functions. Quote Share this post Link to post Share on other sites
Antony Hawkins 0 Report post Posted October 26, 2017 Thanks Tom, good to know it's already being useful! Did you modify the output with '.toLowerCase()' or similar, or was there more to it? Cheers Antony Quote Share this post Link to post Share on other sites
Tom Lasswell 21 Report post Posted October 30, 2017 @Antony Hawkins i just modified the pair values to be lowercase. the upper case response was fine, it was just the "auto.propertyname" that couldn't be "auto.PropertyName", very odd behavior, but that caused issues for some reason. Quote Share this post Link to post Share on other sites
Antony Hawkins 0 Report post Posted October 30, 2017 OK, thanks Tom. Quote Share this post Link to post Share on other sites
Antony Hawkins 0 Report post Posted February 26, 2018 v1.1.0 with only cosmetic code changes: YH9ZXM Quote Share this post Link to post Share on other sites
pperreault 4 Report post Posted November 19, 2018 It seems YH9ZXM is unavailable due to security review. Is there a stats on this? Quote Share this post Link to post Share on other sites
Michael Rodrigues 100 Report post Posted November 27, 2018 @pperreault it should be out of security review now. Quote Share this post Link to post Share on other sites