In case you don't want to use OneAgent inside a particular Java (or other) process, you can easily disable Dynatrace monitoring for individual hosts, process groups, or applications:
When you use the set
parameters, you need to restart OneAgent service to apply changes. You can use the --restart-service
parameter with the command that triggers the restart automatically. In some cases you'll also need to restart monitored applications. You can also use the restart parameter on its own, without other parameters. See an example command below.
.\oneagentctl.exe --set-proxy=my-proxy.com --restart-service
For more information, see OneAgent configuration via command-line interface.
If you use configuration management tools like Puppet or Ansible, you can stop the OneAgent service using the net stop "Dynatrace OneAgent"
command, where Dynatrace OneAgent
is the service name for OneAgent.
You can't stop the OneAgent service using the command line if that service is a part of another process, such as Java bytecode instrumentation. If you stop OneAgent service, monitoring will be disabled until the service is restarted.
To start OneAgent again, use the following command:
net start "Dynatrace OneAgent"
, where Dynatrace OneAgent
is the service name for OneAgent.
Learn more about how Dynatrace interacts with your OS.