14 Mar 2023 03:13 AM - last edited on 20 Jun 2023 01:41 PM by Karolina_Linda
Hello Team,
Customer is using DT hourly license. Where we wanted to stop Dynatrace agent monitoring during non-business hour as the nature of the application don't have customer landing during non-business hours (between 7pm to 8am)
Customer is expecting this feature to be included within Dynatrace as it is providing the flexi with hourly license consumption.
Just wanted to know what the other options are to handle this request.
Cheers!
R
Solved! Go to Solution.
14 Mar 2023 07:30 AM
The easiest way is to utilize the Settings API with the schema builtin:host.monitoring to enable and disable the hosts as required. You need to disable them individually (one call per host). However you will need to keep in mind if some processes have been restarted on the hosts while OneAgent was disabled, then they need to be restarted again after monitoring was enabled back to get the code modules injected.
We've developed an automation tool to handle such situations for our customers (managing agents per hostgroup or tag, getting license utilization and getting the list of processes to be restarted).
14 Mar 2023 07:54 AM
Hi @Julius_Loman ,
Nice tool...
Best regads,
Mizső
14 Mar 2023 09:53 AM
@Mizső thanks - the power comes when combined with automatic disabling of new OneAgent installations. Then you can safely roll out OneAgents across the environment and enable them afterwards where required.
It saves a huge amount of manual work in the UI.
15 Mar 2023 03:26 AM
Thank you @Julius_Loman. Can this tool be available in Dynatrace Hub/gitHub someday.
21 Mar 2024 05:15 AM
This is already there in our Official GitHub repository.
https://github.com/Dynatrace/auto-update-manager
This will help you in configuring settings 2.0 APIs.
21 Mar 2024 02:25 PM
Hi @RazTN7
Another option or workaround is creating a workflow with the desired rules, and you can execute on-demand or on a fixed timeframe.
Example:
And remember what @Julius_Loman mentions, if a process has been restarted on those non-business hours, you should restart the processes after the OneAgent it's initiated. In that case you should add a task on your workflow and connect with an automation tool like ansible or terraform to make the restart of the processes.
Regards,