惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
T
The Exploit Database - CXSecurity.com
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
F
Fortinet All Blogs
博客园_首页
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
The Cloudflare Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Heimdal Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Security Affairs
The Register - Security
The Register - Security
S
Security @ Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
Schneier on Security
Schneier on Security
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
T
Tailwind CSS Blog
Hacker News: Ask HN
Hacker News: Ask HN
W
WeLiveSecurity
D
Docker
L
LangChain Blog
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
TaoSecurity Blog
TaoSecurity Blog
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
宝玉的分享
宝玉的分享
I
Intezer
云风的 BLOG
云风的 BLOG
V2EX - 技术
V2EX - 技术
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
How to automate Ansible reporting + deployment of the Datadog Agent
Boyan Syarov · 2018-01-22 · via Datadog | The Monitor blog

Ansible is an infrastructure automation solution that enables users to provision, deploy, and manage their infrastructure and applications. Ansible roles, which are similar to Puppet modules and Chef cookbooks, are shippable modules that users can download from the open source Ansible Galaxy in order to quickly accomplish important tasks, such as installing a database and configuring its service.

Datadog’s Ansible role and integration enable you to go a step beyond infrastructure as code to implementing monitoring as code. The Datadog Ansible role allows you to deploy the Datadog Agent and enable other Datadog integrations, while the callback plugin provides Ansible reporting and visibility into key metrics and events, including failed tasks, in an out-of-the-box dashboard like the one shown below.

Datadog Ansible default dashboard

In this guide, we will show you how to use this Ansible role and callback plugin to quickly deploy the Datadog Agent on a node, and track Ansible performance metrics and events in Datadog. To follow along, you’ll need a Datadog account. (If you’re not yet a Datadog user, sign up for a free trial here.)

Installing Ansible

Unlike many other configuration management solutions, Ansible follows the push method, so you only need to install Ansible on a control machine (the system you’re going to push from)—you won’t need to install it on any of the nodes that you intend to manage. Installing Ansible is as easy as running:

You also have the option to install it via your distribution’s package manager. Next, you’ll need to clone the example repository on your control machine:

git clone https://github.com/DataDog/dd_ansible_example.git

Then navigate into the repo and install its dependencies:

pip install -r requirements.txt

Typically, you would install an Ansible role with the ansible-galaxy command, but in this case, we can skip that step because the dd_ansible_example repository already includes a copy of the Datadog role. This repository also includes a callback plugin that will send Ansible events to Datadog. (Normally, you would install that on your server by following the steps outlined here.)

Note: In this guide, all file paths and commands will be listed relative to the location of the local dd_ansible_example repository on your control machine.

Using the Datadog Ansible role + integration

  1. In order to start using Datadog’s Ansible role and integration, we’ll need to source the setenv file to tell Ansible a few things about our environment (where the hosts file lives, where to access the Ansible configuration file, etc.).

  1. Next, we need to tell Ansible the fully qualified domain names (FQDNs) or IPs of the nodes we want to manage. In this example, we are managing a single node (an Ubuntu 14 instance), so we only need to add that Ubuntu instance’s FQDN to the ./hosts file:

echo "yourinstance.fqdn.name" >> ./hosts

  1. Add a valid API key (accessible in your Datadog account here) to the playbook (./playbooks/dd_agent.yml). You’ll also need to add it to the callback plugin, (./playbooks/callback_plugins/datadog_callback.yml) where indicated. This will allow the plugin to report the results of playbook runs to the Datadog event stream. Alternatively, you can also choose to set your Datadog API key in the callback by using an environment variable or hostvars, as explained in the callback documentation.

  2. Ansible uses SSH to push changes from the control machine (wherever you installed Ansible and the example repository) to the remote system it needs to manage. Before you can execute your first Ansible command, you’ll need to set up SSH access, as outlined in the Ansible documentation. Once you’ve set up SSH access between your control machine and your remote node, go ahead and test it out by running:

ansible -m ping -i hosts mynodes

You should see something similar to the following output:

yourinstance.fqdn.name | SUCCESS => {

"changed": false,

"ping": "pong"

}

This indicates that Ansible was able to successfully contact your remote node.

  1. Now we’re ready to actually run our Ansible playbook, which will call the Datadog role and install the Datadog Agent on your node. Switch into the playbooks directory and run the playbook:

ansible-playbook dd_agent.yml

The output of this command will give you details of the individual tasks being performed. It will also generate two events and send them to Datadog: one that marks the start of a playbook run, and another that marks its completion. If any errors occur during the run of the playbook, they will also be displayed in the event description. Navigate to your Datadog event stream to see the results of your Ansible playbook run, which should look something like this:

Datadog Ansible

This tells us that Ansible successfully deployed the Datadog Agent on the node listed in our hosts file.

Breaking down the rules of the playbook

Let’s take a closer look behind the scenes to understand how Ansible followed our playbook (./playbooks/dd_agent.yml) to execute the Agent push.

- hosts: mynodes

remote_user: ubuntu

become: yes

roles:

- role: Datadog.datadog

vars:

datadog_api_key: <YOUR API KEY>

datadog_agent_version: 1:5.20.2-1

The hosts section defines the group of hosts we’re pushing to—in this case, the group name mynodes that was predefined in our hosts file. In a previous step, we used echo to add the FQDN of our server to the mynodes group of the hosts file.

remote_user: ubuntu refers to the SSH username that Ansible should use in order to execute this push on the remote host, and become: yes allows the specified user to elevate to sudo privileges if necessary (required for package installs and service reboots).

Over the next few lines, we call the Datadog role and pass two variables to it: our API key and the version of the Agent we want to push. Specifying a version number is optional, but highly recommended. For example, to deploy version 5.20.2 of the Agent, you would specify 1:5.20.2-1 on apt-based distributions, or 5.20.2-1 on yum-based distributions.

In less than 10 lines, we set up Ansible to deploy the Datadog Agent on a remote server. We easily could have pushed the Agent to many more systems simply by adding them to the mynodes section of our Ansible hosts file.

Real-time Ansible reporting in Datadog

One key benefit of using Datadog’s Ansible integration is that you’ll automatically get access to an out-of-the-box dashboard that provides a high-level overview of Ansible performance and activity. You’ll also be able to view dashboards for any of the integrations that you enable using the Datadog Ansible role.

You can use this dashboard to track key information about Ansible performance, including the average time it takes to execute playbooks and the percentage of changes resulting from those pushes. You can also clone and modify this dashboard to get deeper insights into changes as they are deployed across your infrastructure and applications.

Correlate Ansible events with metrics

Because Datadog’s callback plugin provides real-time Ansible reporting, you can overlay playbook executions and failures over any timeseries graph to help troubleshoot and investigate issues across your infrastructure and applications. Below, we searched for Ansible events and overlaid them on a dashboard that tracks the performance of one of our applications.

Track Ansible events in Datadog event stream

Each vertical red band represents an Ansible push event. In this case, we are hovering over two events (shown in purple on each timeseries graph), which are highlighted in the stream on the left, to investigate if a rise in application latency is correlated with the execution of an Ansible playbook. This functionality greatly reduces time to resolution when investigating an incident.

Configuring Ansible playbooks

The playbook in our example repo is just a starting point—you can also create an Ansible playbook that not only installs the Agent but also enables specific Datadog integrations for the applications running on those nodes. Our example repository includes a sample playbook (./playbooks/dd_agent_nginx.yml) that you can modify to enable Datadog’s NGINX integration. To set it up, edit the playbook to match your /nginx_status configuration. (Consult our NGINX documentation for more details.) Then you’re all set to execute the playbook:

ansible-playbook dd_agent_nginx.yml

This will install and configure the Datadog Agent to collect and report NGINX metrics so that you can monitor them in Datadog.

Note that you can call multiple roles from a single Ansible playbook: for example, one role that installs and configures a database on a set of servers, and another that deploys the Datadog Agent on those nodes. You can even create a playbook that uses Datadog’s Ansible role to enable more than one Datadog integration at a time (including for that database you just deployed) by updating the datadog_checks variable with the configuration for each Agent check you want to set up. To see an example, here’s a playbook that sets up three Datadog Agent checks. As with any other infrastructure-wide change, make sure to test each playbook extensively before deploying it in a production environment.

Track Ansible performance + more with Datadog

In this guide, we walked through a basic example of using the Datadog Ansible role and callback plugin to deploy the Datadog Agent on a node and to get Ansible reporting in Datadog. The example repo is only designed to demonstrate how Datadog’s Ansible role and callback plugin work in a testing capacity. In order to run it on a larger scale, we recommend installing the Datadog role from the Ansible Galaxy and reading through the documentation. To collect Ansible performance metrics and events, and send them to Datadog, you will also need to install the callback plugin as described here.

If you’re already using Datadog and Ansible, check out our Ansible role and our callback plugin documentation to learn how you can use Ansible and Datadog together to automate your configuration management and your monitoring. If you’re new to Datadog, get started with a 14-day free trial.