🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

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
Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x