25 Apr 2019 01:15 PM - last edited on 30 May 2023 11:22 AM by Karolina_Linda
Hi to everybody.
I want to automate process of enabling and disabling monitoring of OneAgents.
In my case i have more hosts and host units than it licensed. i have 4 servers with installed agents there and i have 2 server in prod mode and 2 in stand by. So when i switching one server to prod and in same time to stand-by-mode another one i want to turn off Dynatrace monitoring on first one and turn on on second one.
Yes, i can by the hands in Dynatrace to do it but any chance to automate this process?
any idea how can i do it?
Solved! Go to Solution.
25 Apr 2019 01:49 PM
First of all, simple switching between those hosts will not work. You will also require restart of application process after enabling monitoring on those 2 hosts.
Unfortunately there is no option or API in DT to switch monitoring mode on hosts so far. But what can I suggest is set all hosts as enabled and cut traffic between dynatrace server and those hosts. After starting fallback you can automate network rule to open traffic to fallbacks and close to basic ones.
Regards,
Sebastian
25 Apr 2019 02:21 PM
Hello, Sebastian!
Yes, this is good idea to cover my needs. Thank you for answer
Regards,
Dmitry
02 Nov 2020 09:06 PM
It will soon be possible to enable/disable monitoring on a host via the API: https://www.dynatrace.com/news/blog/manage-thousands-of-hosts-with-the-new-oneagent-on-a-host-rest-a...