5 years ago
Doubts
Hi All
i have cleared logicmonitor certification but i am not sure for the below answers. please correct me if i am wrong
LogicMonitor’s Version2 API cannot be used for which of the fol...
On 9/3/2020 at 4:59 AM, Vitor Santos said:
About the API capabilities, just to add my thoughts to Stuart reply (which you should adopt in first place).I was requested to develop a few scripts that make use of LM. There's some features that aren't documented but, you can make use of your browser programmer tools in order to actually see the different API requests (on the GUI). That helped me a lot & I was able to code some calls that weren't documented (even making use of API v3).
Bear in mind those aren't supported by LM but, they might help you if you've urgent needs (like they helped me).
Thank you!
I have done the same often, with marking those as v3 in our API library module.
As far as some of the original discussion, what might help is building out consistent dynamic groups within each customer, which is how we have approached this problem. Then it is always something like Customers/XXX/Automatic Groups/Linux Servers, etc. The input to the script is an array formatted like:
{
group => 'Windows Servers',
appliesTo => 'isClient%s() && isWindows()',
},
The key in this is to setup an Applies To function that allows you to identify the client, then we can create the dynamic groups for each client via this script. We currently run it manually for each specific client, but it would not be that much harder to automatically run it for all clients in a loop. We use the preferred collector naming scheme (which has triggered problems because apparently some things are not recalculated when changes happen like a collector replacement, but we are basically hosed if that does not work since you can't use properties). The meat of each of those functions (*) is "system.prefcollectordesc =~ "\\.domain$" and we organize clients into specific domain structures for the collector descriptions.
Note: we use Perl for most of our API automation and I have been shunned a few times in these forums for it, but I don't care :). The one time I got mad was when someone in dev claimed my API result was not going to be looked at because Perl not supported. Really.
(*) I have a hard time calling something a function that does not support parameters. In this case, we could have one actual function with the client name as a parameter and life would be even simpler.