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.
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.
Can you give me more details on what I can use from here:
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?
This API is what you are looking for I guess:
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?
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.
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:
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.