16 Mar 2021 07:24 AM - last edited on 28 Sep 2022 10:31 AM by MaciejNeumann
I have defined a rule for tagging. Based on the hosts that it filters I would like to stop the monitoring of the JMX beans for these hosts. I am aware that I can stop the monitoring of the JMX bean on each host individually, but in my case, I have a lot of hosts to filter that way. I would appreciate it if you give me some suggestions. Thank you in advance!
Solved! Go to Solution.
16 Mar 2021 07:38 AM
No, you cannot do that, but you can automate that using API and use the Configuration API for disabling the hosts and the Monitred Entities v2 API (Environment API) to fetch the HOST IDs where this needs to be enabled or disabled.
16 Mar 2021 08:19 AM
Can you give me more details on what I can use from here:
https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/
As I understood, I should use the Configuration API for disabling the hosts(which ids I already have)? Is there a way to make a bulk update with the collected ids?
Thank you!
16 Mar 2021 08:43 AM
This API is what you are looking for I guess:
https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/oneagent-configuration/oneage...
Right now there is no option to do it in a bulk for multiple oneagents. thus you would need to issue a call for each host to disable a technology.
Do you have your own JMX extension or a built-in one?
16 Mar 2021 09:04 AM
I am looking for a way to update it for multiple hosts. 😞
Yes, I have my own JMX custom extension, which I upload as a JSON file. [https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/extensions-api/post-an-extens... -> which is the same as the to do it through the UI]
In my research, I see a way to enable/disable certain metrics or a list of metrics using the UI (so, no matter if I register the metrics one by one, or using the JSON file - it is the same): Select a host -> open it -> go to its settings -> find the metric or the group of metrics you want to enable/disable -> click on the button On/Off -> that is all. And that is possible using the API, too. But unfortunately, I cannot see a way to disable the JMX bean for certain hosts. I was thinking about groups/tagging, but for now, I cannot find a way to do it automated, with some settings or a single call.
16 Mar 2021 10:14 AM - edited 16 Mar 2021 11:29 AM
Unfortunately, I was not correct. You cannot/enable disable individual JMX extensions on the host using this API, but you can use the extension API for that:
https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/extensions-api/
If you want to just disable a part of the extension, then you should consider splitting the extension into two separate extensions and use them only where you want to.
16 Mar 2021 12:05 PM
Yes, you can update it but for a single host using: https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/extensions-api/put-instance/ as I can see.
But not for multiple hosts?
16 Mar 2021 12:59 PM
No, you have to issue an API call for each host. Just as you would need to do it in the UI.