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.
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).
@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.
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.
cesarsaravia, thank for you sharing the workflow, would you be kind to share some more info on the details of each box in your workflow, some screenshots is much appreciated.
@cesarsaravia That sounds a good idea! Do you have the sample DQL that get the list of hosts and the scripts / commands to disable OneAgent? Is it feasible on Kubernetes one as well?