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.

Datadog Agent Commands with Examples

Below is a Datadog Agent command cheat sheet in table format. I’m focusing only on Agent CLI / Agent service commands, with practical examples and explanations. The main official command family is datadog-agent <subcommand> on hosts, while Docker/Kubernetes often use agent <subcommand> inside the Agent container. Datadog’s command reference lists status, configcheck, diagnose, flare, health, hostname, jmx, stream-logs, version, and related service commands as core Agent commands. (Datadog)

1. Command Format by Runtime

RuntimeCommand PatternExampleExplanation
Linux hostsudo datadog-agent <command>sudo datadog-agent statusStandard command style when Agent is installed directly on Linux.
Docker Agent containerdocker exec -it <container> agent <command>docker exec -it datadog-agent agent statusInside the Datadog container, the binary is usually called agent.
Kubernetes Agent podkubectl exec -it <pod> -- agent <command>kubectl exec -it datadog-agent-abc12 -n datadog -- agent statusUsed when Datadog Agent runs as a DaemonSet pod.
macOSdatadog-agent <command>datadog-agent statusUsed on macOS host installations.
Windowsagent.exe <command>& "$env:ProgramFiles\Datadog\Datadog Agent\bin\agent.exe" statusUsed from elevated PowerShell or Command Prompt.
Cluster Agentdatadog-cluster-agent <command>kubectl exec -n datadog deploy/datadog-cluster-agent -- datadog-cluster-agent statusUsed specifically for Kubernetes Cluster Agent, not node Agent.

2. Main datadog-agent Commands

CommandLinux ExampleKubernetes / Docker ExampleWhat It DoesWhen to Use
statussudo datadog-agent statuskubectl exec -it <pod> -n datadog -- agent statusShows full Agent status, enabled checks, running integrations, logs Agent, APM Agent, process Agent, DogStatsD, hostname, API key status, and recent errors.First command to run when troubleshooting almost anything.
healthsudo datadog-agent healthkubectl exec -it <pod> -n datadog -- agent healthPrints Agent component health.Use when Agent is running but may be partially unhealthy.
diagnosesudo datadog-agent diagnosekubectl exec -it <pod> -n datadog -- agent diagnoseRuns connectivity and configuration diagnostics.Use for network, API key, site, proxy, or intake issues.
configchecksudo datadog-agent configcheckkubectl exec -it <pod> -n datadog -- agent configcheckShows all loaded and resolved integration configurations.Use when an integration, autodiscovery config, or YAML config is not being picked up.
check <check_name>sudo datadog-agent check postgreskubectl exec -it <pod> -n datadog -- agent check redisdbRuns one specific integration check manually and prints result/errors.Use when PostgreSQL, Redis, NGINX, Kafka, MySQL, etc. metrics are missing.
hostnamesudo datadog-agent hostnamekubectl exec -it <pod> -n datadog -- agent hostnamePrints the hostname used by the Agent.Use when host is missing, duplicate hosts appear, or hostname is unexpected.
flaresudo datadog-agent flarekubectl exec -it <pod> -n datadog -- agent flareCollects Agent logs/config/debug data for Datadog Support. Sensitive values are scrubbed.Use when escalating to Datadog Support or collecting deep diagnostics.
stream-logssudo datadog-agent stream-logskubectl exec -it <pod> -n datadog -- agent stream-logsStreams logs being processed by a running Agent.Use when log collection is enabled but logs are missing in Datadog.
versiondatadog-agent versionkubectl exec -it <pod> -n datadog -- agent versionPrints Agent version information.Use before upgrades, support cases, or feature compatibility checks.
helpdatadog-agent --help or datadog-agent check --helpkubectl exec -it <pod> -n datadog -- agent --helpShows available commands or help for a subcommand.Use when checking supported flags/options on your Agent version.
configsudo datadog-agent config get log_levelkubectl exec -it <pod> -n datadog -- agent config get log_levelManages runtime-editable Agent configuration.Use to view or temporarily change supported runtime settings like log level.
importsudo datadog-agent import <old_config_path>Usually not common in KubernetesImports/converts configuration files from older Agent versions.Use during migration from older Datadog Agent versions.
jmxsudo -u dd-agent datadog-agent jmx list collectedkubectl exec -it <pod> -n datadog -- agent jmx list collectedTroubleshoots JMX-based integrations.Use for Kafka, Tomcat, Cassandra, Solr, ActiveMQ, JVM apps.
launch-guidatadog-agent launch-guiNot normally used in KubernetesStarts Datadog Agent GUI where supported.Mostly useful on desktop/server installs with GUI support.
start-serviceWindows onlyNot applicableStarts the Agent service through Windows service manager.Windows host Agent management.
restart-serviceWindows onlyNot applicableRestarts the Agent service through Windows service manager.Windows host Agent management.
stopserviceWindows onlyNot applicableStops the Agent service through Windows service manager.Windows host Agent management.

3. Agent Service Start / Stop / Restart Commands

These are not always datadog-agent <subcommand> commands, but they are important Agent operations. Datadog documents start, stop, restart, service status, and Agent information commands separately by platform. (Datadog)

TaskPlatformExample CommandExplanation
Start AgentLinux with systemdsudo systemctl start datadog-agentStarts the Datadog Agent service.
Stop AgentLinux with systemdsudo systemctl stop datadog-agentStops the Datadog Agent service.
Restart AgentLinux with systemdsudo systemctl restart datadog-agentRestarts Agent after config changes.
Service statusLinux with systemdsudo systemctl status datadog-agentChecks if the Agent service is active, failed, or restarting.
View service logsLinux with systemdsudo journalctl -u datadog-agent.service -rReads Agent service logs in reverse order. Useful when Agent fails to start.
Start AgentLinux service wrappersudo service datadog-agent startOlder/non-systemd style start command.
Stop AgentLinux service wrappersudo service datadog-agent stopOlder/non-systemd style stop command.
Restart AgentLinux service wrappersudo service datadog-agent restartOlder/non-systemd style restart command.
Service statusLinux service wrappersudo service datadog-agent statusChecks Agent status using service wrapper.
Stop Agent containerDockerdocker exec -it datadog-agent agent stopStops the Agent process inside the container.
Restart Agent podKuberneteskubectl delete pod <agent-pod> -n datadogDeletes pod; DaemonSet recreates it automatically.
Start AgentmacOSlaunchctl start com.datadoghq.agentStarts Agent on macOS.
Stop AgentmacOSlaunchctl stop com.datadoghq.agentStops Agent on macOS.
Check servicemacOSlaunchctl list com.datadoghq.agentShows macOS Agent service status.
Start AgentAIXstartsrc -s datadog-agentStarts Agent on AIX.
Stop AgentAIXstopsrc -s datadog-agentStops Agent on AIX.
StatusAIXlssrc -s datadog-agentChecks Agent service status on AIX.

4. Runtime Config Commands

Datadog supports runtime configuration commands for certain settings. One common example is changing the Agent log level temporarily, especially in containers where editing config files is inconvenient. Datadog notes this runtime log-level change is available for Agent v6.19+ / v7.19+, but trace-agent container log level still requires redeployment/config change. (Datadog)

CommandExampleExplanationWhen to Use
config list-runtimesudo datadog-agent config list-runtimeLists runtime-editable settings.Use to see what can be changed without editing datadog.yaml.
config get <setting>sudo datadog-agent config get log_levelShows current runtime value of a setting.Use to confirm current log level.
config set <setting> <value>sudo datadog-agent config set log_level debugSets a runtime-editable value.Use temporarily while debugging.
config set log_level infosudo datadog-agent config set log_level infoChanges log level back to normal.Use after troubleshooting to avoid noisy logs.
Kubernetes runtime configkubectl exec <pod> -n datadog -- agent config set log_level debugSets log level inside running Agent pod.Useful for temporary Kubernetes troubleshooting.
Docker runtime configdocker exec datadog-agent agent config set log_level debugSets log level inside container Agent.Useful for container Agent debugging.

5. Integration Management Commands

The datadog-agent integration command is available for Agent v6.8+ and manages official Datadog integration Python packages. Datadog documents four main subcommands: install, remove, show, and freeze. Starting with Agent 7.69, Datadog says Community, Partner, and Marketplace integrations are automatically retained during upgrades unless an opt-out file is created. (Datadog)

CommandExampleExplanationWhen to Use
integration --helpdatadog-agent integration --helpShows integration command help.Use to check syntax on your Agent version.
integration showsudo -u dd-agent -- datadog-agent integration show datadog-vsphereShows installed version/details of an integration package.Use before upgrading or troubleshooting integration version.
integration installsudo -u dd-agent -- datadog-agent integration install datadog-vsphere==3.6.0Installs or upgrades a specific integration package version if compatible with the Agent.Use when you need a newer integration bugfix/feature before full Agent upgrade.
integration removesudo -u dd-agent -- datadog-agent integration remove datadog-vsphereRemoves an integration package. It does not remove its config folder from conf.d.Use when removing a manually installed integration package.
integration freezesudo -u dd-agent -- datadog-agent integration freezeLists Python packages installed in the Agent Python environment.Use for troubleshooting dependency/version issues.
Windows show& "$env:ProgramFiles\Datadog\Datadog Agent\bin\agent.exe" integration show datadog-vsphereWindows equivalent.Use on Windows Agent.
Windows install& "$env:ProgramFiles\Datadog\Datadog Agent\bin\agent.exe" integration install datadog-vsphere==3.6.0Installs integration on Windows.Run PowerShell as Administrator.
Windows freeze& "$env:ProgramFiles\Datadog\Datadog Agent\bin\agent.exe" integration freezeLists Agent Python packages on Windows.Useful for support/troubleshooting.

Important note: after installing or upgrading an integration with datadog-agent integration install, restart the Agent so the new integration version is used. (Datadog)


6. JMX Troubleshooting Commands

Use these for Java/JMX integrations such as Kafka, Tomcat, Cassandra, Solr, ActiveMQ, JVM apps, and similar. Datadog documents jmx list matching, limited, collected, not-matching, everything, and collect. (Datadog)

CommandExampleExplanationWhen to Use
jmx list collectedsudo -u dd-agent datadog-agent jmx list collectedLists attributes actually collected by the current JMX config.Use when JMX integration works but expected metrics are missing.
jmx list matchingsudo -u dd-agent datadog-agent jmx list matchingLists attributes matching at least one configured JMX instance.Use to confirm your include rules match MBeans.
jmx list not-matchingsudo -u dd-agent datadog-agent jmx list not-matchingLists attributes that do not match any current config.Use when your bean/filter pattern is wrong.
jmx list limitedsudo -u dd-agent datadog-agent jmx list limitedLists attributes that match config but are not collected because of metric limit.Use when JMX metric limit is reached.
jmx list everythingsudo -u dd-agent datadog-agent jmx list everythingLists every available supported JMX attribute.Use for discovery when building a new JMX config.
jmx collectsudo -u dd-agent datadog-agent jmx collectStarts metric collection using current config and prints metrics to console.Use to validate JMX metrics before checking Datadog UI.
Limit to one checksudo -u dd-agent datadog-agent jmx list collected --checks tomcatRuns JMX command only for selected check.Use when many JMX checks exist on the same Agent.
Debug JMX outputsudo -u dd-agent datadog-agent jmx list everything -l debug --flareWrites debug JMX output under Agent logs so it can be included in a flare.Use for deep Datadog Support troubleshooting.

7. Log Troubleshooting Commands

CommandExampleExplanationWhen to Use
stream-logssudo datadog-agent stream-logsStreams logs currently being processed by the Agent.Use when logs exist locally but are not visible in Datadog.
Kubernetes stream logskubectl exec -it <agent-pod> -n datadog -- agent stream-logsStreams logs from Kubernetes Agent pod.Use for container log collection troubleshooting.
Agent status for logssudo datadog-agent statusShows Logs Agent section and log sources.Use to confirm log collection is enabled and sources are active.
Config check for logssudo datadog-agent configcheckShows loaded log collection configs from conf.d.Use when custom file logs are not picked up.

8. Integration Check Commands

CommandExampleExplanationWhen to Use
check postgressudo datadog-agent check postgresRuns PostgreSQL integration once and prints result.PostgreSQL metrics missing or DB auth issue.
check mysqlsudo datadog-agent check mysqlRuns MySQL integration once.MySQL integration troubleshooting.
check redisdbsudo datadog-agent check redisdbRuns Redis integration once.Redis metrics missing.
check nginxsudo datadog-agent check nginxRuns NGINX integration once.NGINX status endpoint/auth/path issue.
check http_checksudo datadog-agent check http_checkRuns HTTP check manually.Endpoint check is not reporting.
check kubeletkubectl exec -it <agent-pod> -n datadog -- agent check kubeletRuns kubelet check from Kubernetes Agent pod.Kubernetes node/container metrics missing.
check dockerdocker exec -it datadog-agent agent check dockerRuns Docker check inside Agent container.Docker/container metrics issue.

9. Cluster Agent Commands

These are technically datadog-cluster-agent commands, not datadog-agent, but they are important in Kubernetes Datadog troubleshooting.

CommandExampleExplanationWhen to Use
Cluster Agent statuskubectl exec -n datadog deploy/datadog-cluster-agent -- datadog-cluster-agent statusShows Cluster Agent status.Use when Kubernetes metadata, cluster checks, external metrics, or orchestrator data are missing.
Cluster Agent logskubectl logs -n datadog deploy/datadog-cluster-agentReads Cluster Agent logs.Use for RBAC, API server, cluster check, and metadata issues.
Check deploymentkubectl get deploy -n datadogConfirms Cluster Agent deployment exists.Use to confirm Cluster Agent is installed.
Describe podkubectl describe pod <cluster-agent-pod> -n datadogShows events, env vars, mounted secrets, and failures.Use for CrashLoopBackOff, RBAC, token, or config issues.

Best Practical Order During Troubleshooting

StepCommandPurpose
1sudo datadog-agent statusCheck overall Agent health and enabled components.
2sudo datadog-agent healthConfirm Agent internal components are healthy.
3sudo datadog-agent diagnoseCheck connectivity/config/API/site problems.
4sudo datadog-agent configcheckConfirm loaded configuration.
5sudo datadog-agent check <integration>Debug one integration directly.
6sudo datadog-agent hostnameVerify hostname/tagging identity.
7sudo datadog-agent stream-logsDebug log collection.
8sudo -u dd-agent datadog-agent jmx list collectedDebug JMX metrics.
9sudo datadog-agent flareCollect support bundle if issue is still unresolved.

This is the command set I’d expect a strong DevOps/SRE candidate to know for Datadog Agent troubleshooting.

Find Trusted Cardiac Hospitals

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

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Datadog Assignment & Project Master Plan

Target Audience This lab is suitable for: DevOps engineers, SREs, cloud engineers, platform engineers, application engineers, monitoring engineers, and students learning Datadog from practical implementation. Final Outcome…

Read More

Datadog Cloud SIEM: Complete End-to-End Master Guide

Current as of June 2026. Datadog Cloud SIEM is Datadog’s security information and event management product for collecting security telemetry, analyzing logs and events with detection rules,…

Read More

Datadog Troubleshooting Master Guide

It covers: Datadog Agent, Kubernetes Agent, Cluster Agent, integrations, logs, APM/traces, custom metrics, DogStatsD, OpenTelemetry, API keys, Terraform, monitors, SLOs, RUM, Synthetics, cloud integrations, cost, permissions, and…

Read More

Datadog FAQ / Interview Questions and Answers — 50 Questions

Below is a Datadog theoretical / approach / capability FAQ set — not MCQ style. These are the kinds of questions that usually come in interviews, internal…

Read More

Datadog Interview Questions and Answer

1. What is Datadog primarily used for? A. Source code version controlB. Infrastructure, application, log, and security observabilityC. Database schema migration onlyD. Static website hosting Correct Answer:…

Read More

Datadog Agent CLI — datadog-agent and Windows agent.exe with examples

This guide covers the Datadog Agent command-line interface for: The Datadog Agent CLI is subcommand-based. Datadog’s current Agent command documentation says the general syntax is: and recommends…

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Jason Mitchell
Jason Mitchell
17 days ago

The article provides a reference list of datadog-agent commands, but it would be even more useful to discuss how these commands fit into day-to-day operations. In production environments, commands such as configcheck, diagnose, health, and flare are often integrated into troubleshooting runbooks and automated health checks to reduce MTTR. Another worthwhile addition would be guidance on validating agent configurations during CI/CD deployments, managing version upgrades across large fleets, and detecting configuration drift to ensure consistent observability coverage as infrastructure evolves. 

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