Do we have a way to schedule the on-demand enabling/disabling monitoring of the host?
I read the below news, there are many API options, but I could not find the schedule option.
I dont think you can schedule it within the API, but you could use an application like Jenkins or Postman to create a playlist where at a scheduled time, the application of choice would trigger an api call thus enabling or disabling a Dynatrace Oneagent on a host or set of hosts.
Hello @Chad T.
Thank you for sharing the alternatives. In the lighter node, I would like to share my experience with the customers, that mostly they do not like to ask them for other tools to fulfill the basic requirements, which can be provided by the main vendor very easily. Especially when they do not have the requested tools already in their environment.
Yes, we also do it in some cases, as Chad has noted, especially with HU/hours.
The relevant API call we use, along simple crontab configurations, is the Configuration API, "OneAgent on a host", as seen below:
Hello @Antonio S.
Yes. I had gone through with these configurations API, but what I am looking to provide the scheduled time e.g. host monitoring will be turned off from 1:00 AM to 4:00 AM etc.
If you do not mind, please share the crontab configurations. Also, how to use the crontab configurations?
On my side, I do it this way:
I have this running in the context of controlling the consumption of HU/hours. Please beware that some additional features might be required. I have not had those issues, but one improvement I'll be doing in the near future is confirming if effectively the change was implemented.
Hello @Antonio S.
Thank you for the details.
Point # 1:
00 * * * 1-5 nnnnnnnnnn cd /home/nnnnnnnnnn/APIdyna && ./startHosts.sh
58 * * * 1-5 nnnnnnnnnn cd /home/nnnnnnnnnn/APIdyna && ./stopHosts.sh
Point # 2:
Regarding Point #1,
Regarding Point #2, it seems clear to me now that I didn't express myself like I should. The curl command has to be put inside the shell script as stated in the two points above. The curl that starts has to be in the script that starts, and the one that stops, in the stopping script. Hope it's clearer now 😉
Thanks for sharing this idea,
In some cases (some Technologies) processes need to be restarted after OFF/ON of the monitoring, what you are doing for the same?
With this case, you will save HU consumption? or which kind of license you keep?
When we stop, the servers are stopped. When they start, we haven't had problems with starting the process, as it already comes instrumented. We are using this because we are really stopping the servers.
If this is used for controlling licensing with hosts that keep on running, you probably need to consider restarting those processes. But am not absolutely sure about it.
After disable\enable do the processes need restarting? If so wouldn't an entry in the hosts file to send that traffic to 127.0.0.1? So that it cannot communicate to SAAS.? There is scripting to rem\unrem a comment in the hosts file and manage that by a batch file and use the windows scheduler. Similar with Linux using different processes.