cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OneAgent Start/stop

SachinJindal
Helper

i have scenario where Oneagent will be installed on both the Prod and DR sites. Our goal is to monitor only one site at a time based on our requirements to reduce the cost & Instead of performing the installation as needed, we would prefer to simply switch the monitoring on or off as required. i think by default Oneagent automatically comes up as soon as we do server reboot as well.

Could you please confirm best way to have this flexibility &  would this necessitate stopping and starting the applications each time we switch between sites?

 

6 REPLIES 6

p_devulapalli
Leader

@SachinJindal You turn off the monitoring for host from Host settings instead, this way monitoring is disabled until its manually re-enabled even though OneAgent service continues to run 

https://docs.dynatrace.com/docs/shortlink/host-level-settings#host-monitoring

 

Phani Devulapalli

Since i have got more than 40-50- servers it will be difficult to disable for each host manually and this activity would be on a monthly basis

MuhammadGamal
Helper

You can disable the host monitoring per host. 
navigate  settings > Monitoring > Monitoring overview > Hosts  ,

and choose the host you need, click Edit,  and disable the monitoring 

lubrman
Helper

Hi @SachinJindal 

You can use an Ansible role to control the activation of OneAgent, where you can declare the argument oneagent_platform_install_args: [--set-monitoring-mode=infra-only]. For example, this ensures that OneAgent will run in infrastructure-only mode. Alternatively, you can completely disable the agent, which can then be further automated as part of a CI/CD pipeline.
https://galaxy.ansible.com/ui/repo/published/dynatrace/oneagent/content/role/oneagent/
https://docs.dynatrace.com/docs/ingest-from/dynatrace-oneagent/deployment-orchestration/ansible

Aymeric_M
Participant

You can also use Workflows to switch on/off monitoring on a set of hosts.
For example you could create 2 manually triggered workflows (one for switching from Prod to DR and the other to switch from DR to Prod).
Each workflow would work something like this :

  1. a task to provide or generate (via DQL) the 2 lists of hosts
  2. a task to generate the lists of json settings objects for enabling monitoring on one list of hosts and disabling monitoring on the other list of hosts
  3. a task to send the  list of settings objects using the Dynatrace JS SDK
I read the documentation ^^

This looks to be quite good approach .. let me see if this can be done in short timescale...

Featured Posts