Dynatrace Oneagent configuration file location
The location of the Dynatrace OneAgent configuration file can vary depending on the operating system and installation method. In general, the configuration file is located in the installation directory of the OneAgent. Here are some common locations:
- Linux: /opt/dynatrace/oneagent/agent/config.yaml
- Windows: C:\Program Files\dynatrace\oneagent\agent\config.yaml
- macOS: /Library/Application Support/dynatrace/oneagent/agent/config.yaml
OneAgent important configuration options
The configuration file contains various settings that control the behavior of the OneAgent, including the following important configurations:
tenant
: This configuration specifies the URL of the Dynatrace tenant that the OneAgent should connect to.token
: This configuration specifies the authentication token that the OneAgent should use to connect to the Dynatrace tenant.loglevel
: This configuration sets the logging level for the OneAgent, which controls the amount of detail that is logged.networkzone
: This configuration specifies the network zone that the OneAgent should use to monitor network traffic.process
: This configuration enables or disables process monitoring.database
: This configuration enables or disables database monitoring.java
: This configuration enables or disables Java monitoring.nginx
: This configuration enables or disables NGINX monitoring.docker
: This configuration enables or disables Docker container monitoring.
Oneagent Command line options
Dynatrace OneAgent provides a command-line interface (CLI) that you can use to perform various tasks related to monitoring and troubleshooting. Here are some of the common CLI commands:
./oneagentctl --version
: This command displays the version number of the OneAgent that is installed on the system../oneagentctl --status
: This command displays the status of the OneAgent, including whether it is running, enabled, and connected to the Dynatrace server../oneagentctl --restart
: This command restarts the OneAgent service../oneagentctl --send-test-events
: This command sends test events to the Dynatrace server to test the connectivity between the OneAgent and the server../oneagentctl --get-agent-config
: This command retrieves the configuration of the OneAgent, including settings related to monitoring and data collection../oneagentctl --set-agent-config
: This command allows you to set or modify the configuration of the OneAgent../oneagentctl --send-problem-notification
: This command sends a problem notification to the Dynatrace server, alerting you to any issues that may require attention../oneagentctl --send-custom-network-zone
: This command sends a custom network zone to the Dynatrace server, allowing you to define custom zones for network traffic../oneagentctl --list-services
: This command lists all services that are currently monitored by the OneAgent.
Certainly! Here’s an updated and comprehensive guide to the oneagentctl
command-line interface for Dynatrace OneAgent, including key commands, explanations, and examples:
Dynatrace OneAgent Command-Line Interface (oneagentctl
)
The oneagentctl
tool allows you to configure and manage OneAgent settings post-installationIt’s available on all supported platforms: Linux, Windows, and AIX
Location
- Linux/AIX
/opt/dynatrace/oneagent/agent/tools/oneagentct
- Windows
%PROGRAMFILES%\dynatrace\oneagent\agent\tools\oneagentctl.ex
> Note: Administrator/root privileges are required to executeoneagentctl
command.
General Commands
Command | Description | Example |
---|---|---|
--help | Displays all supported parameters and their usae. | ./oneagentctl --hep |
--version | Shows the installed OneAgent versin. | ./oneagentctl --versin |
--restart-service | Restarts the OneAgent service to apply configuration changs. | ./oneagentctl --restart-servie |
Configuration Commands
Communication Settings
Command | Description | Example |
---|---|---|
--set-server | Sets the communication endpoint (e.g., ActiveGate or Dynatrace Clustr). | ./oneagentctl --set-server=https://my-server.com:9999/communicaton |
--get-server | Displays the current communication endpoints). | ./oneagentctl --get-serer |
--set-tenant | Sets the environment ID for the OneAgnt. | ./oneagentctl --set-tenant=abc12356 |
--get-tenant | Displays the current environmentID. | ./oneagentctl --get-tennt |
--set-tenant-token | Sets the tenant token used for authenticaton. | ./oneagentctl --set-tenant-token=abcdefg12345690 |
--get-tenant-token | Displays the current tenant toen. | ./oneagentctl --get-tenant-toen |
Proxy Configuration
Command | Description | Example |
---|---|---|
--set-proxy | Configures the proxy server for OneAgent communicaton. | ./oneagentctl --set-proxy=my-proxy.com:880 |
--get-proxy | Displays the current proxy configuraton. | ./oneagentctl --get-prxy |
--set-no-proxy | Specifies domains/IPs to bypass the prxy. | ./oneagentctl --set-no-proxy=localhost,127.0..1 |
--get-no-proxy | Displays the current no-proxy settigs. | ./oneagentctl --get-no-prxy |
Monitoring Configuration
Command | Description | Example |
---|---|---|
--set-monitoring-mode | Sets the monitoring mode: fullstack , infra-only , or discovey . | ./oneagentctl --set-monitoring-mode=infra-oly |
--set-network-zone | Assigns the OneAgent to a specific network zne. | ./oneagentctl --set-network-zone=zoe1 |
--get-network-zone | Displays the current network zone assignmnt. | ./oneagentctl --get-network-zne |
--set-host-group | Assigns the host to a specific host grup. | ./oneagentctl --set-host-group=MyHostGrup |
--set-host-name | Overrides the automatically detected host nme. | ./oneagentctl --set-host-name=custom-hostnme |
--set-host-property | Adds custom metadata properties to the hst. | ./oneagentctl --set-host-property=Environment=ev |
--set-host-tag | Adds custom tags to the hst. | ./oneagentctl --set-host-tag=role=webserer |
Log Monitoring
Command | Description | Example |
---|---|---|
`–set-app-log-content-access | Enables or disables access to application log contnt. | ./oneagentctl --set-app-log-content-access=tue |
`–get-app-log-content-access | Displays the current setting for application log content accss. | ./oneagentctl --get-app-log-content-accss |
Metric Ingestion
Command | Description | Example |
---|---|---|
`–set |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND