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-installationξξItβ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.
Do you want to learn Quantum Computing?
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