# Is it possible to turn off monitoring on JMX beans for hosts that have the same tag?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798>\
**Category:** Open Q&A\
**Tags:** technologies, tagging, hosts-classic\
**Created:** [March 16, 2021, 7:24am UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798 "2021-03-16T07:24:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reneta](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@Reneta](https://community.dynatrace.com/u/Reneta)\
**Post date:** [March 16, 2021, 7:24am UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/1 "2021-03-16T07:24:31Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [March 16, 2021, 7:38am UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/2 "2021-03-16T07:38:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Reneta](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@Reneta](https://community.dynatrace.com/u/Reneta)\
**Post date:** [March 16, 2021, 8:19am UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/3 "2021-03-16T08:19:49Z")

</div>

Can you give me more details on what I can use from here:

> **[Configuration API](https://docs.dynatrace.com/docs/dynatrace-api/configuration-api)**
>
> Find out what you need to use the configuration section of the Dynatrace 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!

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [March 16, 2021, 8:43am UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/4 "2021-03-16T08:43:04Z")

</div>

This API is what you are looking for I guess:

> **[OneAgent on a host API - Technology monitoring configuration](https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/oneagent-configuration/oneagent-on-host/oneagent-technology-monitoring)**
>
> View the technology monitoring configuration of a OneAgent instance via the Dynatrace API.

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?

---

<div class="post-metadata">

**Author:** ![Reneta](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@Reneta](https://community.dynatrace.com/u/Reneta)\
**Post date:** [March 16, 2021, 9:04am UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/5 "2021-03-16T09:04:06Z")

</div>

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. [[Extensions API - POST an extension .zip file — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/extensions-api/post-an-extension/) → 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):&nbsp;&nbsp;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.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [March 16, 2021, 10:14am UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/6 "2021-03-16T10:14:58Z")

</div>

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:

> **[Extensions API](https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/extensions-api)**
>
> Learn what the Dynatrace Extension API offers.

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.

---

<div class="post-metadata">

**Author:** ![Reneta](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@Reneta](https://community.dynatrace.com/u/Reneta)\
**Post date:** [March 16, 2021, 12:05pm UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/7 "2021-03-16T12:05:22Z")

</div>

Yes, you can update it but for a single host using:&nbsp;[Extensions API - PUT an extension's instance — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/extensions-api/put-instance/)&nbsp; as I can see.

But not for multiple hosts?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [March 16, 2021, 12:59pm UTC](https://community.dynatrace.com/t/is-it-possible-to-turn-off-monitoring-on-jmx-beans-for-hosts-that-have-the-same-tag/30798/8 "2021-03-16T12:59:01Z")

</div>

No, you have to issue an API call for each host. Just as you would need to do it in the UI.
