Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Dynatrace Tutorials: Oneagent Command line & Configuration

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:

  1. tenant: This configuration specifies the URL of the Dynatrace tenant that the OneAgent should connect to.
  2. token: This configuration specifies the authentication token that the OneAgent should use to connect to the Dynatrace tenant.
  3. loglevel: This configuration sets the logging level for the OneAgent, which controls the amount of detail that is logged.
  4. networkzone: This configuration specifies the network zone that the OneAgent should use to monitor network traffic.
  5. process: This configuration enables or disables process monitoring.
  6. database: This configuration enables or disables database monitoring.
  7. java: This configuration enables or disables Java monitoring.
  8. nginx: This configuration enables or disables NGINX monitoring.
  9. 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:

  1. ./oneagentctl --version: This command displays the version number of the OneAgent that is installed on the system.
  2. ./oneagentctl --status: This command displays the status of the OneAgent, including whether it is running, enabled, and connected to the Dynatrace server.
  3. ./oneagentctl --restart: This command restarts the OneAgent service.
  4. ./oneagentctl --send-test-events: This command sends test events to the Dynatrace server to test the connectivity between the OneAgent and the server.
  5. ./oneagentctl --get-agent-config: This command retrieves the configuration of the OneAgent, including settings related to monitoring and data collection.
  6. ./oneagentctl --set-agent-config: This command allows you to set or modify the configuration of the OneAgent.
  7. ./oneagentctl --send-problem-notification: This command sends a problem notification to the Dynatrace server, alerting you to any issues that may require attention.
  8. ./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.
  9. ./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 execute oneagentctl command.

📋 General Commands

CommandDescriptionExample
--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

CommandDescriptionExample
--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

CommandDescriptionExample
--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

CommandDescriptionExample
--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

CommandDescriptionExample
`–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

CommandDescriptionExample
`–set

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Team Foundation Server 2015 Installation Guide (SQL Express + Update 3)

Install Team Foundation Server 2015 using the original Microsoft download paths, with clear guidance for online, offline, and ISO-based setup. This revised guide also includes an installation workflow, command example, and practical pitfalls to avoid.

Read More

How to Access a Running Docker Container Shell: docker exec vs docker attach

Need a shell inside a running container that is already in detached mode? This updated guide shows the correct workflow, compares docker exec and docker attach, and explains when SSH does and does not make sense.

Read More

Host Your Own NuGet Feed: Local Source vs NuGet.Server vs NuGetGallery

Learn how to host a private NuGet feed using three practical approaches: a local folder source, NuGet.Server, and NuGetGallery. This revised guide includes setup steps, command examples, and a workflow diagram to help you choose the right model.

Read More

Publish NuGet Packages to NuGet.org: CLI Steps, Workflow, and CI Example

Learn how to publish a NuGet package to NuGet.org using either nuget.exe or the dotnet CLI. This revised guide includes a workflow diagram, command comparison, and a CI-friendly example.

Read More

How to Create NuGet Packages with nuget.exe (Assembly, .nuspec, and .csproj Methods)

Learn three practical ways to build NuGet packages using nuget.exe: from an existing assembly, from a convention-based folder layout, or directly from a Visual Studio project. This guide includes commands, folder conventions, token behavior, and common pitfalls.

Read More

Virtualization in DevOps: Using Vagrant, Docker, and Cloud Platforms Together

This guide explains how VM-based workflows, containers, and cloud platforms complement each other in DevOps. It includes a practical workflow, trade-off table, and command examples for day-to-day use.

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x