diff --git a/.builders/images/linux-aarch64/Dockerfile b/.builders/images/linux-aarch64/Dockerfile index c9e82cedf077f..97ae944f8d03c 100644 --- a/.builders/images/linux-aarch64/Dockerfile +++ b/.builders/images/linux-aarch64/Dockerfile @@ -16,7 +16,7 @@ ENV CXXFLAGS="${CFLAGS}" ENV LDFLAGS="-Wl,-rpath,'\$\$ORIGIN' -Wl,--strip-debug" # openssl -RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \ +RUN yum install -y perl-IPC-Cmd perl-CPANPLUS perl-core && \ cpanp -i List::Util 1.66 && \ DOWNLOAD_URL="https://www.openssl.org/source/openssl-{{version}}.tar.gz" \ VERSION="3.5.2" \ diff --git a/.builders/images/linux-x86_64/Dockerfile b/.builders/images/linux-x86_64/Dockerfile index eb58a0d4210fc..550864cb610ce 100644 --- a/.builders/images/linux-x86_64/Dockerfile +++ b/.builders/images/linux-x86_64/Dockerfile @@ -16,7 +16,7 @@ ENV CXXFLAGS="${CFLAGS}" ENV LDFLAGS="-Wl,-rpath,'\$\$ORIGIN' -Wl,--strip-debug" # openssl -RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \ +RUN yum install -y perl-IPC-Cmd perl-CPANPLUS perl-core && \ cpanp -i List::Util 1.66 && \ DOWNLOAD_URL="https://www.openssl.org/source/openssl-{{version}}.tar.gz" \ VERSION="3.5.2" \ diff --git a/.github/workflows/testing-run-on-wf-run.yml b/.github/workflows/testing-run-on-wf-run.yml deleted file mode 100644 index 1236d2fdaddd9..0000000000000 --- a/.github/workflows/testing-run-on-wf-run.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Run on PR Check - -on: - workflow_run: - workflows: ['Resolve Dependencies and Build Wheels'] - types: - - completed - -jobs: - run-on-pr-check: - runs-on: ubuntu-22.04 - steps: - - name: Checkout code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - - name: Define SHA - id: define_sha - run: | - echo "sha=${{ github.event.workflow_run.head_sha }}" >> $GITHUB_OUTPUT - echo "event=${{ github.event.workflow_run.event }}" >> $GITHUB_OUTPUT - echo "ref_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT - echo "branch=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT - echo "pr_number=${{ github.event.workflow_run.pull_requests.number }}" >> $GITHUB_OUTPUT - - - name: Get run ID - run: | - echo "run_id_variable=${{ github.event.workflow_run.id }}" - run_id=$(gh run list --workflow ".github/workflows/resolve-build-deps.yaml" -c ${{ steps.define_sha.outputs.sha }} --json databaseId --jq '.[-1].databaseId') - echo "run_id_list=$run_id" - if [ ${#DD_API_KEY} -gt 2 ]; then echo "accessible!"; else echo "not accessible"; fi - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DD_API_KEY: ${{ secrets.DD_API_KEY }} \ No newline at end of file diff --git a/active_directory/README.md b/active_directory/README.md index 6a65563b48975..1f560d6f17802 100644 --- a/active_directory/README.md +++ b/active_directory/README.md @@ -4,6 +4,8 @@ Get metrics from Microsoft Active Directory to visualize and monitor its performances. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/activemq/README.md b/activemq/README.md index 8acd2be37724b..df59a46607918 100644 --- a/activemq/README.md +++ b/activemq/README.md @@ -8,6 +8,8 @@ The ActiveMQ check collects metrics for brokers, queues, producers, consumers, a **Note**: If you are running an ActiveMQ version older than 5.8.0, see the [Agent 5.10.x released sample files][2]. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/activemq_xml/README.md b/activemq_xml/README.md index c92a402cdaaa1..54bdadc3a1950 100644 --- a/activemq_xml/README.md +++ b/activemq_xml/README.md @@ -7,6 +7,8 @@ Get metrics from ActiveMQ XML in real time to: - Visualize and monitor ActiveMQ XML states. - Be notified about ActiveMQ XML failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/adyen/README.md b/adyen/README.md index 286d6a6c9c698..ca3285a332390 100644 --- a/adyen/README.md +++ b/adyen/README.md @@ -6,6 +6,8 @@ The Adyen integration collects transaction, dispute, and payout data using Adyen's webhook capability and ingests it into Datadog for comprehensive analysis. +**Minimum Agent version:** 7.58.0 + ## Setup Follow the instructions below to configure this integration for your Adyen account. diff --git a/aerospike/README.md b/aerospike/README.md index bee7c8a2b0abc..97cd6d1c3c9fb 100644 --- a/aerospike/README.md +++ b/aerospike/README.md @@ -7,6 +7,8 @@ Get metrics from Aerospike Database in real time to: - Visualize and monitor Aerospike states. - Be notified about Aerospike failovers and events. +**Minimum Agent version:** 6.10.0 + ## Setup NOTE: The current aerospike integration is only compatible with Aerospike server v4.9 or above, see Aerospike's [Python Client Library Release Notes][1] for more info. diff --git a/airbyte/README.md b/airbyte/README.md index 76d0977f73b83..67ea24ba5ecce 100644 --- a/airbyte/README.md +++ b/airbyte/README.md @@ -4,6 +4,8 @@ This check monitors [Airbyte][1]. Metrics are sent to Datadog through [DogStatsD][2]. +**Minimum Agent version:** 7.47.0 + ## Setup ### Installation diff --git a/airflow/README.md b/airflow/README.md index 908c08910d07a..60e9e7fd88bdb 100644 --- a/airflow/README.md +++ b/airflow/README.md @@ -18,6 +18,8 @@ Metrics are collected through the [Airflow StatsD][1] plugin and sent to Datadog In addition to metrics, the Datadog Agent also sends service checks related to Airflow's health. +**Minimum Agent version:** 7.17.0 + ## Setup ### Installation diff --git a/amazon_app_mesh/README.md b/amazon_app_mesh/README.md index f8a0f08fe244e..b70929abab2a2 100644 --- a/amazon_app_mesh/README.md +++ b/amazon_app_mesh/README.md @@ -3,6 +3,8 @@ [AWS App Mesh][1] is a service mesh that provides application-level networking to your micro services running on Amazon ECS Fargate or Amazon EKS clusters. +**Minimum Agent version:** 6.15.0 + ## Setup diff --git a/amazon_msk/README.md b/amazon_msk/README.md index b587d3ce15792..a26fb9ce5d801 100644 --- a/amazon_msk/README.md +++ b/amazon_msk/README.md @@ -8,6 +8,8 @@ You can collect metrics from this integration in two ways-with the [Datadog Agen Consider [Data Streams Monitoring][20] to enhance your MSK integration. This solution enables pipeline visualization and lag tracking, helping you identify and resolve bottlenecks. +**Minimum Agent version:** 7.16.1 + ## Setup The Agent check monitors Amazon Managed Streaming for Apache Kafka ([Amazon MSK][1]) through the Datadog Agent. diff --git a/ambari/README.md b/ambari/README.md index def1ff723cb71..10bdf4a304909 100644 --- a/ambari/README.md +++ b/ambari/README.md @@ -4,6 +4,8 @@ This check monitors [Ambari][1] through the Datadog Agent. +**Minimum Agent version:** 6.12.0 + ## Setup ### Installation diff --git a/anthropic/README.md b/anthropic/README.md index f610bc1aac817..2b9454d546f26 100644 --- a/anthropic/README.md +++ b/anthropic/README.md @@ -9,6 +9,8 @@ monitor operational performance, and evaluate the quality, privacy, and safety o See the [LLM Observability tracing view video](https://imgix.datadoghq.com/video/products/llm-observability/expedite-troubleshooting.mp4?fm=webm&fit=max) for an example of how you can investigate a trace. +**Minimum Agent version:** 7.59.1 + ## Setup # Configuring Anthropic LLM Evaluations for Datadog @@ -22,6 +24,8 @@ Datadog's LLM Observability enables end-to-end monitoring of your LLM applicatio - An **Anthropic account** with access to model deployments. - A **valid Anthropic API key** with **write permissions** for model capabilities. +**Minimum Agent version:** 7.59.1 + ## Setup ### 1. Generate an Anthropic API key diff --git a/anthropic_usage_and_costs/README.md b/anthropic_usage_and_costs/README.md index 82ccde179a320..0b8a57878c0e7 100644 --- a/anthropic_usage_and_costs/README.md +++ b/anthropic_usage_and_costs/README.md @@ -13,6 +13,8 @@ This integration is especially valuable for teams using Anthropic at scale who w You can also see your Anthropic costs in Datadog [Cloud Cost Management][6], allowing you to answer key questions: Which models or workspaces are generating the most cost? Are workloads using the right service tier (Standard, Batch, or Priority)? Are teams effectively using caching or ephemeral sessions? What's the cost breakdown between Claude Opus and Claude Sonnet? +**Minimum Agent version:** 7.69.0 + ## Setup To get started with the Anthropic Admin API integration in Datadog, follow the steps below: diff --git a/anyscale/README.md b/anyscale/README.md index aa17cb96bbb08..6d81c8012c35a 100644 --- a/anyscale/README.md +++ b/anyscale/README.md @@ -4,6 +4,8 @@ This check monitors [Anyscale][1]. Anyscale is a compute platform that hosts [Ray][5] clusters. +**Minimum Agent version:** 7.57.2 + ## Setup To install and configure the Datadog Agent with the Ray integration on Anyscale, see the [official Anyscale documentation][6]. diff --git a/apache/README.md b/apache/README.md index 6f161b0b641ba..1e3be73afa53f 100644 --- a/apache/README.md +++ b/apache/README.md @@ -6,6 +6,8 @@ The Apache check tracks requests per second, bytes served, number of worker threads, service uptime, and more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/appgate_sdp/README.md b/appgate_sdp/README.md index 99bf6df214b98..8d46c20b38522 100644 --- a/appgate_sdp/README.md +++ b/appgate_sdp/README.md @@ -8,6 +8,8 @@ This check monitors [Appgate SDP][1] through the Datadog Agent. - Provides visibility into resource utilization, active connections, session counts, and license usage to help ensure secure and efficient access management. - Enables proactive alerting and troubleshooting by tracking critical indicators such as CPU, memory, disk usage, and system events across distributed environments. +**Minimum Agent version:** 7.59.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/arangodb/README.md b/arangodb/README.md index b79da83fcc87b..c65e8ec030ddc 100644 --- a/arangodb/README.md +++ b/arangodb/README.md @@ -10,6 +10,8 @@ Enable the Datadog-ArangoDB integration to: - Understand the impact of a long request and troubleshoot latency issues. - Monitor underlying RocksDB memory, disk, and cache limits. +**Minimum Agent version:** 7.36.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] to apply these instructions. diff --git a/argo_rollouts/README.md b/argo_rollouts/README.md index 8fc2068f5786e..c00acd6995d6b 100644 --- a/argo_rollouts/README.md +++ b/argo_rollouts/README.md @@ -4,6 +4,8 @@ This check monitors [Argo Rollouts][1] through the Datadog Agent. +**Minimum Agent version:** 7.53.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running in your Kubernetes environment. For more information about configuration in containerized environments, see the [Autodiscovery Integration Templates][3] for guidance. diff --git a/argo_workflows/README.md b/argo_workflows/README.md index a89c2170edef2..222ceb62f8fa5 100644 --- a/argo_workflows/README.md +++ b/argo_workflows/README.md @@ -4,6 +4,8 @@ This check monitors [Argo Workflows][1] through the Datadog Agent. +**Minimum Agent version:** 7.53.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running in your Kubernetes environment. For more information about configuration in containerized environments, see the [Autodiscovery Integration Templates][3] for guidance. diff --git a/argocd/README.md b/argocd/README.md index d1e7670c5cc1b..30e7965d16d93 100644 --- a/argocd/README.md +++ b/argocd/README.md @@ -4,6 +4,8 @@ This check monitors [Argo CD][1] through the Datadog Agent. +**Minimum Agent version:** 7.41.0 + ## Setup ### Installation diff --git a/asana/README.md b/asana/README.md index 464ac0b98a46d..23ab8360fe325 100644 --- a/asana/README.md +++ b/asana/README.md @@ -10,6 +10,8 @@ This integration gathers audit logs and forwards them to Datadog for seamless an **Disclaimer**: By enabling this integration, you consent to the integration accessing your content and data from Asana. Asana is not responsible for the privacy, security, or integrity of any of your data outside the Asana services. +**Minimum Agent version:** 7.59.0 + ## Setup ### Generate API Credentials in Asana diff --git a/aspdotnet/README.md b/aspdotnet/README.md index 55406504e51dc..3484788c299b6 100644 --- a/aspdotnet/README.md +++ b/aspdotnet/README.md @@ -7,6 +7,8 @@ Get metrics from ASP.NET in real time to: - Visualize and monitor ASP.NET states. - Be notified about ASP.NET failovers and events. +**Minimum Agent version:** 6.6.0 + ## Setup ### Installation diff --git a/authorize_net/README.md b/authorize_net/README.md index 1c26c02daa216..7535f99cda98e 100644 --- a/authorize_net/README.md +++ b/authorize_net/README.md @@ -5,6 +5,8 @@ The Authorize.Net integration collects settled transaction logs and unsettled transaction metrics, and forwards them to Datadog for comprehensive analysis. +**Minimum Agent version:** 7.60.0 + ## Setup ### Generate Login ID and Transaction Key in Authorize.Net diff --git a/avast/README.md b/avast/README.md index 8d40fd2fdd006..daf8143f32207 100644 --- a/avast/README.md +++ b/avast/README.md @@ -13,6 +13,8 @@ The Avast integration collects the following types of logs: This integration collects logs from the sources listed above and sends them to Datadog for analysis by [Log Explorer][2] and [Cloud SIEM][3]. +**Minimum Agent version:** 7.58.0 + ## Setup ### Generate API credentials in Avast diff --git a/avi_vantage/README.md b/avi_vantage/README.md index e1af5e7c1c97a..cf2eb5ecdb3df 100644 --- a/avi_vantage/README.md +++ b/avi_vantage/README.md @@ -4,6 +4,8 @@ This check monitors [Avi Vantage][1] through the Datadog Agent. +**Minimum Agent version:** 7.30.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/aws_neuron/README.md b/aws_neuron/README.md index 1b6c548a17c75..a7e74cfe12119 100644 --- a/aws_neuron/README.md +++ b/aws_neuron/README.md @@ -4,6 +4,8 @@ This check monitors [AWS Neuron][1] through the Datadog Agent. It enables monitoring of the Inferentia and Trainium devices and delivers insights into your machine learning model's performance. +**Minimum Agent version:** 7.57.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on an EC2 instance. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/azure_iot_edge/README.md b/azure_iot_edge/README.md index 4ba12762084c5..ceda331414d02 100644 --- a/azure_iot_edge/README.md +++ b/azure_iot_edge/README.md @@ -8,6 +8,8 @@ Use the Datadog-Azure IoT Edge integration to collect metrics and health status **Note**: This integration requires IoT Edge runtime version 1.0.10 or above. +**Minimum Agent version:** 7.24.0 + ## Setup Follow the instructions below to install and configure this check for an IoT Edge device running on a device host. diff --git a/bentoml/README.md b/bentoml/README.md index 723dd7e68bdba..b2804644b7a68 100644 --- a/bentoml/README.md +++ b/bentoml/README.md @@ -9,6 +9,8 @@ Include a high level overview of what this integration does: - What value will customers get from this integration, and why is it valuable to them? - What specific data will your integration monitor, and what's the value of that data? +**Minimum Agent version:** 7.70.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/beyondtrust_identity_security_insights/README.md b/beyondtrust_identity_security_insights/README.md index 715fa421bba8c..d17aac975ea79 100644 --- a/beyondtrust_identity_security_insights/README.md +++ b/beyondtrust_identity_security_insights/README.md @@ -8,6 +8,8 @@ Integrate BeyondTrust Identity Security Insights with Datadog's pre-built dashbo This integration also includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. These Cloud SIEM rules can be used with [Datadog Workflow Automation][5] to orchestrate and automate your end-to-end processes with OOTB Workflow Blueprints. +**Minimum Agent version:** 7.67.1 + ## Setup ### Configuration diff --git a/beyondtrust_password_safe/README.md b/beyondtrust_password_safe/README.md index 5a838e470524f..d28daea9971ab 100644 --- a/beyondtrust_password_safe/README.md +++ b/beyondtrust_password_safe/README.md @@ -12,6 +12,8 @@ This integration parses and ingest the following types of logs: Visualize detailed insights into these logs through out-of-the-box dashboards. Cloud SIEM also provides detection rules to help you monitor and respond to potential security threats effectively. +**Minimum Agent version:** 7.70.0 + ## Setup ### Log Collection Overview diff --git a/bitdefender/README.md b/bitdefender/README.md index 8ed9bf8d297a5..f84a8a746ecfa 100644 --- a/bitdefender/README.md +++ b/bitdefender/README.md @@ -22,6 +22,8 @@ The Bitdefender integration uses a webhook to ingest Bitdefender EDR logs. The i | Ransomware activity detection | Endpoint agent blocks ransomware attack | | New Incident | New Root Cause Analysis (RCA) is displayed under the Incidents section of Control Center. The event contains a list of relevant items extracted from the RCA JSON | +**Minimum Agent version:** 7.59.1 + ## Setup ### Retrieve the Datadog Webhook URL diff --git a/bitwarden/README.md b/bitwarden/README.md index bdc3e1b4a1748..c27314eb2055e 100644 --- a/bitwarden/README.md +++ b/bitwarden/README.md @@ -10,6 +10,8 @@ This integration ingests the following logs: This integration seamlessly collects event logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into event logs through out-of-the-box dashboards and includes ready-to-use Cloud SIEM detection rules for improved monitoring and security. +**Minimum Agent version:** 7.66.1 + ## Setup ### Generate API Credentials in Bitwarden diff --git a/blazemeter/README.md b/blazemeter/README.md index b04b3ca14d94e..0b045bf6f699e 100644 --- a/blazemeter/README.md +++ b/blazemeter/README.md @@ -6,6 +6,8 @@ Integrate BlazeMeter with Datadog to gain insights into performance and functional test results metrics data. +**Minimum Agent version:** 7.68.2 + ## Setup ### Generate API Key Id and API Key Secret in BlazeMeter diff --git a/boundary/README.md b/boundary/README.md index d5e118012af7d..f639d0d5f441c 100644 --- a/boundary/README.md +++ b/boundary/README.md @@ -4,6 +4,8 @@ This check monitors [Boundary][1] through the Datadog Agent. The minimum supported version of Boundary is `0.8.0`. +**Minimum Agent version:** 7.38.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/box/README.md b/box/README.md index b1262536eaa38..38035dff8e50b 100644 --- a/box/README.md +++ b/box/README.md @@ -8,6 +8,8 @@ This integration ingests **Enterprise Events** detailed logs, which includes use This integration gathers enterprise events and forwards them to Datadog for seamless analysis. Datadog leverages its built-in log pipelines to parse and enrich these logs, facilitating easy search and detailed insights. With preconfigured dashboards, the integration offers clear visibility into activities within the Box platform. Additionally, it includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.65.0 + ## Setup ### Prerequisites diff --git a/brevo/README.md b/brevo/README.md index 098f88f3efe9e..2bd46ff6487dc 100644 --- a/brevo/README.md +++ b/brevo/README.md @@ -6,6 +6,8 @@ Integrate Brevo with Datadog to gain insights into Brevo marketing campaign emails and track Brevo performance based on events and other transactional events using [webhooks][2]. +**Minimum Agent version:** 7.56.1 + ## Setup Follow the instructions below to configure this integration for Brevo Marketing and Transactional events through a Webhook. diff --git a/btrfs/README.md b/btrfs/README.md index fe6f66ec48364..fbace196595ae 100644 --- a/btrfs/README.md +++ b/btrfs/README.md @@ -8,6 +8,8 @@ Get metrics from Btrfs in real time to: - Visualize and monitor Btrfs states. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/cacti/README.md b/cacti/README.md index 336f6099f0a04..32de085416e29 100644 --- a/cacti/README.md +++ b/cacti/README.md @@ -7,6 +7,8 @@ Get metrics from Cacti in real time to: - Visualize and monitor Cacti states. - Be notified about Cacti failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/calico/README.md b/calico/README.md index 1b6ae45bc0c2a..d2c8963ce67b7 100644 --- a/calico/README.md +++ b/calico/README.md @@ -6,6 +6,8 @@ This check monitors [Calico][1] through the Datadog Agent. The Calico check sends metrics concerning network and security in a Kubernetes cluster set up with Calico. +**Minimum Agent version:** 7.36.0 + ## Setup ### Installation diff --git a/carbon_black_cloud/README.md b/carbon_black_cloud/README.md index 4abf54e3565c2..075617d90c59e 100644 --- a/carbon_black_cloud/README.md +++ b/carbon_black_cloud/README.md @@ -5,6 +5,8 @@ Integrate Carbon Black Cloud with Datadog to gain insights into Alerts, Audit Logs, Auth Events, Endpoint Events and Watchlist Hits using pre-built dashboard visualizations. Additionally, integration includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.67.1 + ## Setup ### Configure AWS S3 Bucket diff --git a/cassandra/README.md b/cassandra/README.md index bac1f2b4b259b..50f575e63d6c2 100644 --- a/cassandra/README.md +++ b/cassandra/README.md @@ -9,6 +9,8 @@ Get metrics from Cassandra in real time to: - Visualize and monitor Cassandra states. - Be notified about Cassandra failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/cassandra_nodetool/README.md b/cassandra_nodetool/README.md index c74a35492ee74..d95c96dac04d9 100644 --- a/cassandra_nodetool/README.md +++ b/cassandra_nodetool/README.md @@ -6,6 +6,8 @@ This check collects metrics for your Cassandra cluster that are not available through [jmx integration][2]. It uses the `nodetool` utility to collect them. +**Minimum Agent version:** 6.6.0 + ## Setup ### Installation diff --git a/celery/README.md b/celery/README.md index cbe442a9da169..a9af3264959e0 100644 --- a/celery/README.md +++ b/celery/README.md @@ -10,6 +10,8 @@ The Celery integration provides valuable insights into your task queue system by - Providing visibility into worker performance and task distribution - Helping identify bottlenecks and optimize task processing efficiency +**Minimum Agent version:** 7.66.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/ceph/README.md b/ceph/README.md index 8d3732bc349c5..ce4a5f84670df 100644 --- a/ceph/README.md +++ b/ceph/README.md @@ -10,6 +10,8 @@ Enable the Datadog-Ceph integration to: - Receive service checks in case of issues - Monitor I/O performance metrics +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/cert_manager/README.md b/cert_manager/README.md index 8c838eab29040..a6bac3278415f 100644 --- a/cert_manager/README.md +++ b/cert_manager/README.md @@ -6,6 +6,8 @@ This check collects metrics from [cert-manager][1]. ![Cert-Manager Overview Dashboard][2] +**Minimum Agent version:** 7.22.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/checkpoint_harmony_email_and_collaboration/README.md b/checkpoint_harmony_email_and_collaboration/README.md index a07f88b9fd0ac..18c11b2930fe2 100644 --- a/checkpoint_harmony_email_and_collaboration/README.md +++ b/checkpoint_harmony_email_and_collaboration/README.md @@ -8,6 +8,8 @@ This integration provides enrichment and visualization for Phishing, Malware, Ma Get detailed visibility into these events with out-of-the-box dashboards, and strengthen security with pre-built Cloud SIEM detection rules for proactive threat monitoring and response. +**Minimum Agent version:** 7.64.2 + ## Setup Follow the instructions below to configure this integration for your Check Point Harmony Email & Collaboration account. diff --git a/checkpoint_quantum_firewall/README.md b/checkpoint_quantum_firewall/README.md index d78f6e51cf21f..a65165cd81902 100644 --- a/checkpoint_quantum_firewall/README.md +++ b/checkpoint_quantum_firewall/README.md @@ -4,6 +4,8 @@ This integration ingests URL Filtering logs, Anti Bot logs, Application Control, Firewall, Identity Awareness, IPS, Threat Emulation, and miscellaneous event types with the integration log pipeline to enrich the logs and normalizes data to Datadog standard attributes. This integration offers dashboard visualizations with detailed insights into allowed or blocked URLs, bot details, insights into accessed application data, events generated by firewall, mapping between computer identities and machine IP address, and more. +**Minimum Agent version:** 7.53.0 + ## Setup ### Installation diff --git a/cilium/README.md b/cilium/README.md index 8546bb69a0ab8..9ce8a26f73938 100644 --- a/cilium/README.md +++ b/cilium/README.md @@ -4,6 +4,8 @@ This check monitors [Cilium][1] through the Datadog Agent. The integration can either collect metrics from the `cilium-agent` or `cilium-operator`. +**Minimum Agent version:** 6.15.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/cisco_aci/README.md b/cisco_aci/README.md index e91de7d78e467..e9c92f98dbec2 100644 --- a/cisco_aci/README.md +++ b/cisco_aci/README.md @@ -9,6 +9,8 @@ The Cisco ACI Integration lets you: - Monitor the switches and controllers themselves - The ability to monitor devices via [Network Devices Monitoring][11] +**Minimum Agent version:** 6.3.2 + ## Setup ### Installation diff --git a/cisco_duo/README.md b/cisco_duo/README.md index 1fb437c00952f..7f5383314f680 100644 --- a/cisco_duo/README.md +++ b/cisco_duo/README.md @@ -11,6 +11,8 @@ This integration ingests the following logs: The Cisco Duo integration seamlessly collects multi-factor authentication (MFA) and secure access logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into fraud authentication events, authentication activity timeline, locations of accessed, authentication devices, and many more through the out-of-the-box dashboards. +**Minimum Agent version:** 7.51.0 + ## Setup ### Configuration diff --git a/cisco_secure_email_threat_defense/README.md b/cisco_secure_email_threat_defense/README.md index cc7f44f76749c..195700fa3996f 100644 --- a/cisco_secure_email_threat_defense/README.md +++ b/cisco_secure_email_threat_defense/README.md @@ -9,6 +9,8 @@ The Cisco Secure Email Threat Defense integration provides out-of-the-box dashbo **Disclaimer**: Your use of this integration, which may collect data that includes personal information, is subject to your agreements with Datadog. Cisco is not responsible for the privacy, security or integrity of any end-user information, including personal data, transmitted through your use of the integration. +**Minimum Agent version:** 7.55.3 + ## Setup ### Generate API credentials in Cisco Secure Email Threat Defense diff --git a/cisco_secure_endpoint/README.md b/cisco_secure_endpoint/README.md index b2dbc4f60f3bb..483368d5d2518 100644 --- a/cisco_secure_endpoint/README.md +++ b/cisco_secure_endpoint/README.md @@ -10,6 +10,8 @@ The Cisco Secure Endpoint integration provides out-of-the-box dashboards so you **Disclaimer**: Your use of this integration, which may collect data that includes personal information, is subject to your agreements with Datadog. Cisco is not responsible for the privacy, security or integrity of any end-user information, including personal data, transmitted through your use of the integration. +**Minimum Agent version:** 7.54.1 + ## Setup ### Generate API credentials in Cisco Secure Endpoint diff --git a/cisco_secure_firewall/README.md b/cisco_secure_firewall/README.md index e84703feb4f10..1042c89e3f3ba 100644 --- a/cisco_secure_firewall/README.md +++ b/cisco_secure_firewall/README.md @@ -23,6 +23,8 @@ This integration enrich and ingests the following logs from Cisco Secure FTD usi Visualize detailed insights into SNMP requests, identity-based firewall logs, real time threat analysis, security detection and observation, and compliance monitoring with the out-of-the-box dashboards. +**Minimum Agent version:** 7.53.0 + ## Setup ### Installation diff --git a/cisco_secure_web_appliance/README.md b/cisco_secure_web_appliance/README.md index 0b87b8f700c45..f2fd2f6899569 100644 --- a/cisco_secure_web_appliance/README.md +++ b/cisco_secure_web_appliance/README.md @@ -11,6 +11,8 @@ Out-of-the-box (OOTB) dashboards help you to visualize detailed insights into We **Disclaimer**: Use of this integration might collect data that includes personal information, is subject to your agreements with Datadog. Cisco is not responsible for the privacy, security, or integrity of any end-user information, including personal data, transmitted through your use of the integration. +**Minimum Agent version:** 7.65.0 + ## Setup ### Installation diff --git a/cisco_umbrella_dns/README.md b/cisco_umbrella_dns/README.md index e51510101777e..f6adca92f8fc6 100644 --- a/cisco_umbrella_dns/README.md +++ b/cisco_umbrella_dns/README.md @@ -6,6 +6,8 @@ The Cisco Umbrella DNS integration collects DNS and Proxy logs and sends them to Datadog. Using the out-of-the-box logs pipeline, the logs are parsed and enriched for easy searching and analysis. This integration includes several dashboards visualizing total DNS requests, allowed/blocked domains, top blocked categories, proxied traffic over time, and more. If you have Datadog Cloud SIEM, Umbrella DNS logs will be analyzed by threat intelligence for matches against common attacker destinations. DNS logs are also useful for threat hunting and during investigations to compliment logs from other sources. +**Minimum Agent version:** 7.50.2 + ## Setup ### Configuration diff --git a/citrix_hypervisor/README.md b/citrix_hypervisor/README.md index 9b2e5eda4563a..bb5b1345d03fa 100644 --- a/citrix_hypervisor/README.md +++ b/citrix_hypervisor/README.md @@ -4,6 +4,8 @@ This check monitors [Citrix Hypervisor][1] through the Datadog Agent. +**Minimum Agent version:** 7.32.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/clickhouse/README.md b/clickhouse/README.md index 11a93e2d2b289..d5904502c12f8 100644 --- a/clickhouse/README.md +++ b/clickhouse/README.md @@ -4,6 +4,8 @@ This check monitors [ClickHouse][1] through the Datadog Agent. +**Minimum Agent version:** 7.16.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/cloud_foundry_api/README.md b/cloud_foundry_api/README.md index e329712bdeb9c..b108a9d31a390 100644 --- a/cloud_foundry_api/README.md +++ b/cloud_foundry_api/README.md @@ -4,6 +4,8 @@ This check queries the [Cloud Foundry API][1] to collect audit events and send them to Datadog through the Agent. +**Minimum Agent version:** 7.23.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/cloudera/README.md b/cloudera/README.md index 1196ff75e4aab..9684f24ec1cc7 100644 --- a/cloudera/README.md +++ b/cloudera/README.md @@ -4,6 +4,8 @@ This integration monitors your [Cloudera Data Platform][1] through the Datadog Agent, allowing you to submit metrics and service checks on the health of your Cloudera Data Hub clusters, hosts, and roles. +**Minimum Agent version:** 7.42.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/cockroachdb/README.md b/cockroachdb/README.md index 07973ce03da6e..63aa759d81636 100644 --- a/cockroachdb/README.md +++ b/cockroachdb/README.md @@ -4,6 +4,8 @@ The CockroachDB check monitors the overall health and performance of a [CockroachDB][1] cluster. +**Minimum Agent version:** 6.6.0 + ## Setup ### Installation diff --git a/confluent_platform/README.md b/confluent_platform/README.md index d6c4c160c12a6..c457bf6058da7 100644 --- a/confluent_platform/README.md +++ b/confluent_platform/README.md @@ -16,6 +16,8 @@ This integration collects JMX metrics for the following components: Consider [Data Streams Monitoring][11] to enhance your Confluent Platform integration. This solution enables pipeline visualization and lag tracking, helping you identify and resolve bottlenecks. +**Minimum Agent version:** 7.19.0 + ## Setup diff --git a/consul/README.md b/consul/README.md index 32b3f83f11b5a..0ade74b3e63ac 100644 --- a/consul/README.md +++ b/consul/README.md @@ -21,6 +21,8 @@ And many more. Finally, in addition to metrics, the Datadog Agent also sends a service check for each of Consul's health checks, and an event after each new leader election. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/consul/changelog.d/21468.added b/consul/changelog.d/21468.added new file mode 100644 index 0000000000000..d2ad17a22e71b --- /dev/null +++ b/consul/changelog.d/21468.added @@ -0,0 +1 @@ +Adds `agent_hostname` when nodenames are used as host tag for `consul.net.node.latency.*` metrics. diff --git a/consul/datadog_checks/consul/consul.py b/consul/datadog_checks/consul/consul.py index 57c0a8e6d5e1c..eb33aa991a396 100644 --- a/consul/datadog_checks/consul/consul.py +++ b/consul/datadog_checks/consul/consul.py @@ -643,6 +643,7 @@ def check_network_latency(self, agent_dc, main_tags): # Use the node name as the hostname if configured if self.use_node_name_as_hostname: node_name = node['Node'] + tags += ['agent_hostname:{}'.format(self.hostname)] else: node_name = '' diff --git a/consul/tests/test_unit.py b/consul/tests/test_unit.py index bb06b8e7f8941..2b844e3601da8 100644 --- a/consul/tests/test_unit.py +++ b/consul/tests/test_unit.py @@ -561,13 +561,15 @@ def test_network_latency_checks(aggregator): @pytest.mark.parametrize( - 'use_node_name_as_hostname, expected_hostname, expected_tags', + 'use_node_name_as_hostname, expected_hostname, expected_tags, expected_agent_hostname', [ - ('false', [''], ['host-1', 'host-2']), - ('true', ['host-1'], ['host-1']), + ('false', [''], ['host-1', 'host-2'], []), + ('true', ['host-1'], ['host-1'], ['agent_hostname:stubbed.hostname']), ], ) -def test_network_latency_node_name(aggregator, use_node_name_as_hostname, expected_hostname, expected_tags): +def test_network_latency_node_name( + aggregator, use_node_name_as_hostname, expected_hostname, expected_tags, expected_agent_hostname +): consul_mocks.MOCK_CONFIG_NETWORK_LATENCY_CHECKS['use_node_name_as_hostname'] = use_node_name_as_hostname consul_check = ConsulCheck(common.CHECK_NAME, {}, [consul_mocks.MOCK_CONFIG_NETWORK_LATENCY_CHECKS]) @@ -592,7 +594,7 @@ def test_network_latency_node_name(aggregator, use_node_name_as_hostname, expect for m in metrics: for host in expected_hostname: for tag in expected_tags: - tags = ['consul_datacenter:dc1', 'consul_node_name:{}'.format(tag)] + tags = ['consul_datacenter:dc1', 'consul_node_name:{}'.format(tag)] + expected_agent_hostname aggregator.assert_metric(m, hostname=host, tags=tags) diff --git a/contentful/README.md b/contentful/README.md index ea42435c53eea..1ff1562693085 100644 --- a/contentful/README.md +++ b/contentful/README.md @@ -6,6 +6,8 @@ Integrate with Datadog to gain insights into Contentful activities related to content and other actions as part of your Contentful spaces and environments. +**Minimum Agent version:** 7.55.2 + ## Setup Follow the instructions below to configure this integration for your Contentful space. diff --git a/coredns/README.md b/coredns/README.md index 12320a4225f25..6cdd61a46d5ad 100644 --- a/coredns/README.md +++ b/coredns/README.md @@ -4,6 +4,8 @@ Get metrics from CoreDNS in real time to visualize and monitor DNS failures and cache hits or misses. +**Minimum Agent version:** 6.6.0 + ## Setup diff --git a/couch/README.md b/couch/README.md index 1839d789b3a80..864b4939de5d9 100644 --- a/couch/README.md +++ b/couch/README.md @@ -11,6 +11,8 @@ Capture CouchDB data in Datadog to: For performance reasons, the CouchDB version you're using is cached, so you cannot monitor CouchDB instances with different versions with the same agent instance. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/couchbase/README.md b/couchbase/README.md index 8f2e2f3e23309..0befa4fa213f4 100644 --- a/couchbase/README.md +++ b/couchbase/README.md @@ -14,6 +14,8 @@ Identify busy buckets, track cache miss ratios, and more. This Agent check colle And many more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/crewai/README.md b/crewai/README.md index 6c1e95f246402..dd0710272d549 100644 --- a/crewai/README.md +++ b/crewai/README.md @@ -5,6 +5,8 @@ Use the CrewAI integration to monitor, troubleshoot, and evaluate your applicati **Note**: Requires Python. +**Minimum Agent version:** 7.64.3 + ## Setup #### Installation diff --git a/crio/README.md b/crio/README.md index 965b257e788fb..56e919f15bf1a 100644 --- a/crio/README.md +++ b/crio/README.md @@ -4,6 +4,8 @@ This check monitors [CRI-O][1]. +**Minimum Agent version:** 6.6.0 + ## Setup ### Installation diff --git a/datadog_cluster_agent/README.md b/datadog_cluster_agent/README.md index f444fbdfd8d6e..4fb2e341feb2a 100644 --- a/datadog_cluster_agent/README.md +++ b/datadog_cluster_agent/README.md @@ -4,6 +4,8 @@ This check monitors the [Datadog Cluster Agent][1] through the Datadog Agent. +**Minimum Agent version:** 7.30.2 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/datadog_csi_driver/README.md b/datadog_csi_driver/README.md index 9de872e122e50..c594919f6f6df 100644 --- a/datadog_csi_driver/README.md +++ b/datadog_csi_driver/README.md @@ -12,6 +12,8 @@ The Datadog CSI node server is responsible for managing Datadog CSI volume lifec The Datadog CSI Driver integration collects and monitors metrics from your Datadog CSI Driver, providing visibility into publish/unpublish requests and pod health for improved troubleshooting and performance monitoring. +**Minimum Agent version:** 7.70.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/datadog_operator/README.md b/datadog_operator/README.md index 9c5ef99662dcc..1384206cba8ca 100644 --- a/datadog_operator/README.md +++ b/datadog_operator/README.md @@ -4,6 +4,8 @@ This check monitors the [Datadog Operator][1] through the Datadog Agent. +**Minimum Agent version:** 7.43.2 + ## Setup ### Installation diff --git a/dcgm/README.md b/dcgm/README.md index 2b7e822ea822c..6cb56a0edb303 100644 --- a/dcgm/README.md +++ b/dcgm/README.md @@ -4,6 +4,8 @@ This check submits metrics exposed by the [NVIDIA DCGM Exporter][16] in Datadog Agent format. For more information on NVIDIA Data Center GPU Manager (DCGM), see [NVIDIA DCGM][15]. +**Minimum Agent version:** 7.47.0 + ## Setup ### Installation diff --git a/ddev/changelog.d/21486.fixed b/ddev/changelog.d/21486.fixed new file mode 100644 index 0000000000000..529403556b231 --- /dev/null +++ b/ddev/changelog.d/21486.fixed @@ -0,0 +1 @@ +Removed the requirement for all files to be committed before sending size metrics to Datadog. \ No newline at end of file diff --git a/ddev/src/ddev/cli/size/utils/common_funcs.py b/ddev/src/ddev/cli/size/utils/common_funcs.py index 3f20d5faf2cc6..2bccd62226d47 100644 --- a/ddev/src/ddev/cli/size/utils/common_funcs.py +++ b/ddev/src/ddev/cli/size/utils/common_funcs.py @@ -846,8 +846,7 @@ def send_metrics_to_dd( size_type = "compressed" if compressed else "uncompressed" config_file_info = app.config.orgs.get(org, {}) if org else {'api_key': key, 'site': 'datadoghq.com'} - if not is_everything_committed(): - raise RuntimeError("All files have to be committed in order to send the metrics to Datadog") + if "api_key" not in config_file_info: raise RuntimeError("No API key found in config file") if "site" not in config_file_info: @@ -934,11 +933,6 @@ def send_metrics_to_dd( api.Metric.send(metrics=n_dependencies_metrics) -def is_everything_committed() -> bool: - result = subprocess.run(["git", "status", "--porcelain"], capture_output=True, text=True) - return result.stdout.strip() == "" - - def get_last_commit_timestamp() -> int: result = subprocess.run(["git", "log", "-1", "--format=%ct"], capture_output=True, text=True, check=True) return int(result.stdout.strip()) diff --git a/delinea_privilege_manager/README.md b/delinea_privilege_manager/README.md index 1856853a0e5a3..f1afbfeba766c 100644 --- a/delinea_privilege_manager/README.md +++ b/delinea_privilege_manager/README.md @@ -14,6 +14,8 @@ This integration supports the following types of logs: View detailed insights into these logs using the out-of-the-box dashboards. The integration also includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.64.0 + ## Setup ### Installation diff --git a/delinea_secret_server/README.md b/delinea_secret_server/README.md index 8722e1e7ec122..c62a31658f931 100644 --- a/delinea_secret_server/README.md +++ b/delinea_secret_server/README.md @@ -8,6 +8,8 @@ This integration enriches and ingests the following logs: After it collects the logs, Delinea Secret Server channels them into Datadog for analysis. Using the built-in logs pipeline, these logs are parsed and enriched, allowing for effortless search and analysis. The integration provides insights into secret server logs through out-of-the-box dashboards and includes ready-to-use Cloud SIEM detection rules for improved monitoring and security. +**Minimum Agent version:** 7.67.0 + ## Setup ### Installation diff --git a/directory/README.md b/directory/README.md index c95bcc23aa14a..ed44ba7b04706 100644 --- a/directory/README.md +++ b/directory/README.md @@ -9,6 +9,8 @@ Capture metrics from directories and files of your choosing. The Agent collects: - Age of the last modification - Age of the creation +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/disk/README.md b/disk/README.md index 8c76585aab2ba..24feba2bb223d 100644 --- a/disk/README.md +++ b/disk/README.md @@ -4,6 +4,8 @@ Collect metrics related to disk usage and IO. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/dns_check/README.md b/dns_check/README.md index fec01cef6494f..f8320bbb3c404 100644 --- a/dns_check/README.md +++ b/dns_check/README.md @@ -4,6 +4,8 @@ Monitor the resolvability of and lookup times for any DNS records using nameservers of your choosing. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/dnsfilter/README.md b/dnsfilter/README.md index 90b1fddc9d8f1..11c495d9fcc06 100644 --- a/dnsfilter/README.md +++ b/dnsfilter/README.md @@ -10,6 +10,8 @@ This integration ingests the following logs: This integration collects DNS Traffic Logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling search and analysis. The integration provides insight into DNS traffic logs through out-of-the-box dashboards and includes ready-to-use Cloud SIEM detection rules for improved monitoring and security. +**Minimum Agent version:** 7.66.0 + ## Setup ### Generate API credentials in DNSFilter diff --git a/docker_daemon/README.md b/docker_daemon/README.md index 660d5d1f22992..54b5e99cad857 100644 --- a/docker_daemon/README.md +++ b/docker_daemon/README.md @@ -15,6 +15,8 @@ Configure this Agent check to get metrics from the Docker_daemon service in real * Visualize and monitor Docker_daemon states. * Be notified about Docker_daemon failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/docusign/README.md b/docusign/README.md index 82ca06b295fb2..97d2426d7460a 100644 --- a/docusign/README.md +++ b/docusign/README.md @@ -6,6 +6,8 @@ Docusign integration provides real-time insights into Docusign activities, such as envelope usage, template management, account events, and alerts generated by users. +**Minimum Agent version:** 7.56.0 + ## Setup diff --git a/dotnetclr/README.md b/dotnetclr/README.md index 0be36c3f56ad6..bb09af9fb6760 100644 --- a/dotnetclr/README.md +++ b/dotnetclr/README.md @@ -7,6 +7,8 @@ Get metrics from the .NET CLR service in real time to: - Visualize and monitor .NET CLR states. - Be notified about .NET CLR failovers and events. +**Minimum Agent version:** 6.2.0 + ## Setup ### Installation diff --git a/druid/README.md b/druid/README.md index 240eff4deecf3..450980e90bf0f 100644 --- a/druid/README.md +++ b/druid/README.md @@ -8,6 +8,8 @@ The Datadog Agent collects metrics from Druid using [DogStatsD][2]. DogStatsD co In addition to collecting metrics, the Agent also sends a Service Check related to Druid's health. +**Minimum Agent version:** 6.15.0 + ## Setup ### Prerequisite diff --git a/duckdb/README.md b/duckdb/README.md index 8ebd61a429c44..76fb17c636b7e 100644 --- a/duckdb/README.md +++ b/duckdb/README.md @@ -8,6 +8,8 @@ For more information on using DuckDB, refer to the [DuckDB documentation][9]. This check monitors [DuckDB][1] through the Datadog Agent. +**Minimum Agent version:** 7.63.0 + ## Setup DuckDB has two configurable options for concurrency: diff --git a/eks_fargate/README.md b/eks_fargate/README.md index f700bc3d3d9b9..6d0a2e15602ba 100644 --- a/eks_fargate/README.md +++ b/eks_fargate/README.md @@ -21,6 +21,8 @@ If you have a mixed cluster of traditional EKS nodes and Fargate pods, you can m **Note**: Cloud Network Monitoring (CNM) is not supported for EKS Fargate. +**Minimum Agent version:** 7.18.0 + ## Setup ### Prerequisites diff --git a/elastic/README.md b/elastic/README.md index 62a0b391f3d47..1f677d07f574a 100644 --- a/elastic/README.md +++ b/elastic/README.md @@ -8,6 +8,8 @@ Stay up-to-date on the health of your Elasticsearch cluster, from its overall st The Datadog Agent's Elasticsearch check collects metrics for search and indexing performance, memory usage and garbage collection, node availability, shard statistics, disk space and performance, pending tasks, and many more. The Agent also sends events and service checks for the overall status of your cluster. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/envoy/README.md b/envoy/README.md index 8849c4adc7a00..e83399cb99b5b 100644 --- a/envoy/README.md +++ b/envoy/README.md @@ -17,6 +17,8 @@ Key Benefits: - **Real-time insights** into application-layer attacks with traces and logs in one unified view - **Edge enforcement** against OWASP API threats, credential stuffing, injection attacks, and more +**Minimum Agent version:** 6.1.0 + ## Setup ### Installation (Metrics) diff --git a/eset_protect/README.md b/eset_protect/README.md index ca70f1b0b5e72..d521d8b3ae86e 100644 --- a/eset_protect/README.md +++ b/eset_protect/README.md @@ -11,6 +11,8 @@ This integration enriches and ingests the following logs: After it collects the logs, ESET Protect channels them into Datadog for analysis. Using the built-in logs pipeline, these logs are parsed and enriched, allowing for effortless search and analysis. The integration provides insights into ESET Protect logs through out-of-the-box dashboards and includes ready-to-use Cloud SIEM detection rules for improved monitoring and security. +**Minimum Agent version:** 7.68.0 + ## Setup ### Installation diff --git a/esxi/README.md b/esxi/README.md index 50326210a2d86..7aca9507048ec 100644 --- a/esxi/README.md +++ b/esxi/README.md @@ -4,6 +4,8 @@ This check monitors your vSphere [ESXi][1] hosts and the virtual machines running on them in a distributed manner. To monitor your entire vSphere deployment in a centralized way through your vCenter, see the [vSphere integration][11]. +**Minimum Agent version:** 7.54.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/etcd/README.md b/etcd/README.md index aff1473301cce..7237f1b99634d 100644 --- a/etcd/README.md +++ b/etcd/README.md @@ -10,6 +10,8 @@ Collect Etcd metrics to: - Know when host configurations may be out of sync. - Correlate the performance of Etcd with the rest of your applications. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/exchange_server/README.md b/exchange_server/README.md index cb033b43dcf78..ce108fc14a162 100644 --- a/exchange_server/README.md +++ b/exchange_server/README.md @@ -6,6 +6,8 @@ Get metrics from Microsoft Exchange Server - Visualize and monitor Exchange server performance +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/external_dns/README.md b/external_dns/README.md index cee1faec609d0..9775f4c37969c 100644 --- a/external_dns/README.md +++ b/external_dns/README.md @@ -6,6 +6,8 @@ Get metrics from the external DNS service in real time to visualize and monitor For more information about external DNS, see the [Github repo][1]. +**Minimum Agent version:** 7.17.0 + ## Setup ### Installation diff --git a/extrahop/README.md b/extrahop/README.md index 1dcb0c4620bb4..e52aecc2ac151 100644 --- a/extrahop/README.md +++ b/extrahop/README.md @@ -11,6 +11,8 @@ This integration ingests the following logs: This integration seamlessly collects all the above listed logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into detections and investigations through the out-of-the-box dashboards. +**Minimum Agent version:** 7.58.2 + ## Setup ### Generate API credentials in ExtraHop diff --git a/falco/README.md b/falco/README.md index f1d798e3feff0..5e3124db1026d 100644 --- a/falco/README.md +++ b/falco/README.md @@ -9,6 +9,8 @@ This integration ingests the following logs: The Falco integration seamlessly ingests the data of Falco logs using the webhook. Before ingestion of the data, it normalizes and enriches the logs, ensuring a consistent data format and enhancing information content for downstream processing and analysis. The integration provides insights into alert logs through the out-of-the-box dashboards. +**Minimum Agent version:** 7.59.1 + ## Setup ### Configuration diff --git a/flink/README.md b/flink/README.md index fc6f40753e1df..6e9bca3300799 100644 --- a/flink/README.md +++ b/flink/README.md @@ -5,6 +5,8 @@ This check monitors [Flink][1]. Datadog collects Flink metrics through Flink's [Datadog HTTP Reporter][2], which uses [Datadog's HTTP API][3]. +**Minimum Agent version:** 7.17.2 + ## Setup ### Installation diff --git a/fluentd/README.md b/fluentd/README.md index eee838a907c62..b268b49c1234d 100644 --- a/fluentd/README.md +++ b/fluentd/README.md @@ -9,6 +9,8 @@ Get metrics from Fluentd to: - Visualize Fluentd performance. - Correlate the performance of Fluentd with the rest of your applications. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/fluxcd/README.md b/fluxcd/README.md index 45ffc41fda78b..bf579f34d69b7 100644 --- a/fluxcd/README.md +++ b/fluxcd/README.md @@ -4,6 +4,8 @@ This check monitors [Flux][1] through the Datadog Agent. Flux is a set of continuous and progressive delivery solutions for Kubernetes that is open and extensible. +**Minimum Agent version:** 7.49.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/fly_io/README.md b/fly_io/README.md index a4fae814e573a..23cfd6852f70b 100644 --- a/fly_io/README.md +++ b/fly_io/README.md @@ -8,6 +8,8 @@ This integration is in public beta. Use caution if enabling it on production wor This check monitors [Fly.io][1] metrics through the Datadog Agent. +**Minimum Agent version:** 7.57.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a Fly application. diff --git a/forcepoint_secure_web_gateway/README.md b/forcepoint_secure_web_gateway/README.md index f9f79d5336683..0114540b12d37 100644 --- a/forcepoint_secure_web_gateway/README.md +++ b/forcepoint_secure_web_gateway/README.md @@ -13,6 +13,8 @@ This integration ingests the following logs: The Forcepoint Secure Web Gateway integration gathers these logs and forwards them to Datadog for seamless analysis. Datadog leverages its built-in log pipelines to parse and enrich these logs, facilitating advanced search and detailed insights. With preconfigured out-of-the-box dashboards, the integration offers visibility into web activities. Additionally, it includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.61.0 + ## Setup ### Generate an OAuth token for Forcepoint Secure Web Gateway diff --git a/forcepoint_security_service_edge/README.md b/forcepoint_security_service_edge/README.md index 36744a3155d5f..ca3e3ebc703f2 100644 --- a/forcepoint_security_service_edge/README.md +++ b/forcepoint_security_service_edge/README.md @@ -14,6 +14,8 @@ This integration ingests the following logs: Forcepoint Security Service Edge integration gathers these logs and forwards them to Datadog for seamless analysis. Datadog leverages its built-in log pipelines to parse and enrich these logs, facilitating easy search and detailed insights. With preconfigured out-of-the-box dashboards, the integration offers clear visibility into activities within the Forcepoint Security Service Edge platform. Additionally, it includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.61.0 + ## Setup ### Generate OAuth Token in Forcepoint Security Service Edge: diff --git a/foundationdb/README.md b/foundationdb/README.md index 9ab00c5a003e9..3435d1e3013cb 100644 --- a/foundationdb/README.md +++ b/foundationdb/README.md @@ -6,6 +6,8 @@ This check monitors [FoundationDB][1] through the Datadog Agent. Aside from checking that the FoundationDB cluster is healthy, it also collects numerous metrics and, optionally, FoundationDB transaction logs. +**Minimum Agent version:** 7.35.0 + ## Setup Both the check and metrics apply to the FoundationDB cluster as a whole, diff --git a/freshservice/README.md b/freshservice/README.md index 54c6b8780aeac..b1f8f077174e1 100644 --- a/freshservice/README.md +++ b/freshservice/README.md @@ -4,6 +4,8 @@ This check monitors [freshservice][1]. +**Minimum Agent version:** 7.57.1 + ## Setup ### Installation diff --git a/gearmand/README.md b/gearmand/README.md index 8ccda35032df1..16f1e0dcbfd45 100644 --- a/gearmand/README.md +++ b/gearmand/README.md @@ -8,6 +8,8 @@ Collect Gearman metrics to: - Know how many tasks are queued or running. - Correlate Gearman performance with the rest of your applications. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/genesys/README.md b/genesys/README.md index cd42b8ee7ecf8..a2a619e97ffbe 100644 --- a/genesys/README.md +++ b/genesys/README.md @@ -6,6 +6,8 @@ The Genesys integration collects conversations (Voice, Email, Message, Callback, Chat) analytics metrics and audit logs and ingests them into Datadog for comprehensive analysis. +**Minimum Agent version:** 7.59.1 + ## Setup ### Generate Client ID and Client Secret config parameters in Genesys diff --git a/gitlab/README.md b/gitlab/README.md index 036203b6f91bc..84c120aa3f1b8 100644 --- a/gitlab/README.md +++ b/gitlab/README.md @@ -10,6 +10,8 @@ See [Monitoring GitLab with Prometheus][1] for more information. For more in-depth monitoring of your GitLab pipelines, check out [CI Pipeline Visibility][17]. CI Pipeline Visibility provides granular insights into your user workflow, lets you access detailed Git metadata, and tracks pipeline performance over time. +**Minimum Agent version:** 6.0.0 + ## Setup This OpenMetrics-based integration has a latest mode (enabled by setting `openmetrics_endpoint` to point to the target endpoint) and a legacy mode (enabled by setting `prometheus_url` instead). To get all the most up-to-date features, Datadog recommends enabling the latest mode. For more information, see [Latest and Legacy Versioning For OpenMetrics-based Integrations][18]. diff --git a/gitlab_runner/README.md b/gitlab_runner/README.md index 6ad84722da9d5..b5f5b8306c1bd 100644 --- a/gitlab_runner/README.md +++ b/gitlab_runner/README.md @@ -9,6 +9,8 @@ Integration that allows to: For more information about the GitLab Runner and its integration with Prometheus, see the [GitLab Runner documentation][1]. +**Minimum Agent version:** 6.0.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/glusterfs/README.md b/glusterfs/README.md index 5548098eb3889..af8b983e2ba01 100644 --- a/glusterfs/README.md +++ b/glusterfs/README.md @@ -5,6 +5,8 @@ This check monitors [Red Hat Gluster Storage][1] cluster health, volume, and brick status through the Datadog Agent. This GlusterFS integration is compatible with both Red Hat vendored and open-source versions of GlusterFS. +**Minimum Agent version:** 7.25.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/go-metro/README.md b/go-metro/README.md index 6d20a8a1e4c79..7ce5d841c0abb 100644 --- a/go-metro/README.md +++ b/go-metro/README.md @@ -6,6 +6,8 @@ The TCP RTT check reports on roundtrip times between the host the Agent is runni This check is only shipped in the 64-bit DEB and RPM Datadog Agent v5 packages. The check is _not_ available with Datadog Agent v6. +**Minimum Agent version:** 6.0.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][1] for guidance on applying these instructions. diff --git a/go_expvar/README.md b/go_expvar/README.md index 0da2db4278325..945d5e87c28c8 100644 --- a/go_expvar/README.md +++ b/go_expvar/README.md @@ -8,6 +8,8 @@ Track the memory usage of your Go services and collect metrics instrumented from If you prefer to instrument your Go code using only [dogstats-go][2], you can still use this integration to collect memory-related metrics. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/godaddy/README.md b/godaddy/README.md index eb6783f312378..e240ad446bac4 100644 --- a/godaddy/README.md +++ b/godaddy/README.md @@ -5,6 +5,8 @@ The GoDaddy integration collects metrics from SSL certificates and their domains, directing them into Datadog for analysis. This integration provides data points such as the total number of certificates, issued certificates, expired certificates, revoked certificates, and domains associated with each certificate. It also includes specific metrics for certificates nearing expiration. All these metrics are accessible through out-of-the-box dashboards and monitors. +**Minimum Agent version:** 7.56.0 + ## Setup ### Generate API credentials in GoDaddy diff --git a/greenhouse/README.md b/greenhouse/README.md index 932d5b6e7d681..8f75e78d5b720 100644 --- a/greenhouse/README.md +++ b/greenhouse/README.md @@ -10,6 +10,8 @@ This integration ingests the following logs: The Greenhouse integration collects these logs and sends them to Datadog. These logs are parsed and enriched through the built-in logs pipeline, which enables search and analysis. The integration also provides insight into activities on the Greenhouse platform through the out-of-the-box dashboards. +**Minimum Agent version:** 7.57.2 + ## Setup ### Generate API credentials in Greenhouse diff --git a/gunicorn/README.md b/gunicorn/README.md index dfd0e68e72389..e5eac4e326233 100644 --- a/gunicorn/README.md +++ b/gunicorn/README.md @@ -13,6 +13,8 @@ Gunicorn itself can provide further metrics using DogStatsD, including: - Request duration (average, median, max, 95th percentile, etc.) - Log message rate by log level (critical, error, warning, exception) +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/haproxy/README.md b/haproxy/README.md index a7aaacf515092..5bf9ae3b83ebf 100644 --- a/haproxy/README.md +++ b/haproxy/README.md @@ -10,6 +10,8 @@ Capture HAProxy activity in Datadog to: - Know when a server goes down. - Correlate the performance of HAProxy with the rest of your applications. +**Minimum Agent version:** 6.0.0 + ## Setup This integration can collect metrics from a Prometheus endpoint (recommended) or from a socket-based integration through the stats endpoint (deprecated). Using the Prometheus endpoint requires HAProxy version 2 (enterprise version 1.9rc1) or later. diff --git a/harbor/README.md b/harbor/README.md index 5b1a33074a732..f1f38c4a72baa 100644 --- a/harbor/README.md +++ b/harbor/README.md @@ -4,6 +4,8 @@ This check monitors [Harbor][1] through the Datadog Agent. +**Minimum Agent version:** 6.13.0 + ## Setup ### Installation diff --git a/hazelcast/README.md b/hazelcast/README.md index 75ba2b4675d79..69b8311132404 100644 --- a/hazelcast/README.md +++ b/hazelcast/README.md @@ -4,6 +4,8 @@ This check monitors [Hazelcast][1] v4.0+. +**Minimum Agent version:** 7.19.0 + ## Setup ### Installation diff --git a/hdfs_datanode/README.md b/hdfs_datanode/README.md index 3ac83632e860e..bfa9918a0b4cf 100644 --- a/hdfs_datanode/README.md +++ b/hdfs_datanode/README.md @@ -8,6 +8,8 @@ Track disk utilization and failed volumes on each of your HDFS DataNodes. This A Use this check (hdfs_datanode) and its counterpart check (hdfs_namenode), not the older two-in-one check (hdfs); that check is deprecated. +**Minimum Agent version:** 6.0.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/hdfs_namenode/README.md b/hdfs_namenode/README.md index 9875e8e84c608..79e9401ea1ef9 100644 --- a/hdfs_namenode/README.md +++ b/hdfs_namenode/README.md @@ -8,6 +8,8 @@ Monitor your primary _and_ standby HDFS NameNodes to know when your cluster fall Use this check (hdfs_namenode) and its counterpart check (hdfs_datanode), not the older two-in-one check (hdfs); that check is deprecated. +**Minimum Agent version:** 6.0.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/hive/README.md b/hive/README.md index 878e10a472d25..4969cb266c657 100644 --- a/hive/README.md +++ b/hive/README.md @@ -4,6 +4,8 @@ This check monitors two parts of [Hive][1]: Hive Metastore and HiveServer2. +**Minimum Agent version:** 6.11.3 + ## Setup ### Installation diff --git a/hivemq/README.md b/hivemq/README.md index 2a0bfa502b57b..33041476d9bb9 100644 --- a/hivemq/README.md +++ b/hivemq/README.md @@ -5,6 +5,8 @@ [HiveMQ][1] is a MQTT based messaging platform designed for the fast, efficient and reliable movement of data to and from connected IoT devices. It is a MQTT 3.1, 3.1.1, and 5.0 compliant broker. +**Minimum Agent version:** 7.20.1 + ## Setup ### Installation diff --git a/http_check/README.md b/http_check/README.md index 03896cce32987..3ef4f4369c345 100644 --- a/http_check/README.md +++ b/http_check/README.md @@ -4,6 +4,8 @@ Monitor the up and down status of local or remote HTTP endpoints. The HTTP check can detect bad response codes (such as 404), identify soon-to-expire SSL certificates, search responses for specific text, and much more. The check also submits HTTP response times as a metric. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/hubspot_content_hub/README.md b/hubspot_content_hub/README.md index d65dcd3e86d91..1438b62a04bbf 100644 --- a/hubspot_content_hub/README.md +++ b/hubspot_content_hub/README.md @@ -8,6 +8,8 @@ The HubSpot Content Hub integration collects Activity Logs (audit, login, securi The integration includes dashboards that show and analyze both Activity Logs and Analytics Metrics, making it easier to monitor and understand trends and issues. +**Minimum Agent version:** 7.57.0 + ## Setup To integrate HubSpot with Datadog, Datadog connects to HubSpot using OAuth. The authenticated user must have owner permissions in the organizations that want to be integrated. diff --git a/hudi/README.md b/hudi/README.md index f73d7a693a4c6..43ea911cce89e 100644 --- a/hudi/README.md +++ b/hudi/README.md @@ -5,6 +5,8 @@ This check monitors [Hudi][1]. It is compatible with Hudi [versions][2] `0.10.0` and above. +**Minimum Agent version:** 7.32.0 + ## Setup ### Installation diff --git a/hugging_face_tgi/README.md b/hugging_face_tgi/README.md index 1f48273bea47e..84f7efe773c09 100644 --- a/hugging_face_tgi/README.md +++ b/hugging_face_tgi/README.md @@ -12,6 +12,8 @@ The integration provides comprehensive monitoring of your TGI servers by collect This enables teams to optimize LLM inference performance, track resource utilization, troubleshoot bottlenecks, and ensure reliable model serving at scale. +**Minimum Agent version:** 7.70.1 + ## Setup Follow these instructions to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/hyperv/README.md b/hyperv/README.md index 6489b830a51c9..d8c8f561383a4 100644 --- a/hyperv/README.md +++ b/hyperv/README.md @@ -4,6 +4,8 @@ This check monitors [Hyper-V][1] through the Datadog Agent. +**Minimum Agent version:** 6.9.0 + ## Setup ### Installation diff --git a/ibm_ace/README.md b/ibm_ace/README.md index 4dd6c30e3b91b..0d4612aa335a3 100644 --- a/ibm_ace/README.md +++ b/ibm_ace/README.md @@ -4,6 +4,8 @@ This check monitors [IBM ACE][1] through the Datadog Agent. +**Minimum Agent version:** 7.35.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/ibm_db2/README.md b/ibm_db2/README.md index 5520a267e6363..40ba7c8e4a6ad 100644 --- a/ibm_db2/README.md +++ b/ibm_db2/README.md @@ -6,6 +6,8 @@ This check monitors [IBM Db2][2] through the Datadog Agent. +**Minimum Agent version:** 6.11.0 + ## Setup ### Installation diff --git a/ibm_i/README.md b/ibm_i/README.md index 6b22cfa2cc167..2189dc1f5bf29 100644 --- a/ibm_i/README.md +++ b/ibm_i/README.md @@ -4,6 +4,8 @@ This check monitors [IBM i][1] remotely through the Datadog Agent. +**Minimum Agent version:** 7.31.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/ibm_mq/README.md b/ibm_mq/README.md index a6de6ffdb4839..c80ae603ea3d3 100644 --- a/ibm_mq/README.md +++ b/ibm_mq/README.md @@ -4,6 +4,8 @@ This check monitors [IBM MQ][1] versions 9.1 and above. +**Minimum Agent version:** 6.8.0 + ## Setup ### Installation diff --git a/ibm_was/README.md b/ibm_was/README.md index 3af44dcccd812..984f156beb964 100644 --- a/ibm_was/README.md +++ b/ibm_was/README.md @@ -4,6 +4,8 @@ This check monitors [IBM Websphere Application Server (WAS)][1] through the Datadog Agent. This check supports IBM WAS versions >= 8.5.5. +**Minimum Agent version:** 6.10.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/iboss/README.md b/iboss/README.md index 634cac5c949c7..d6f0903c89885 100644 --- a/iboss/README.md +++ b/iboss/README.md @@ -74,6 +74,8 @@ Here is the list of monitors for metrics: - High proxy error rate detected - High proxy response time detected +**Minimum Agent version:** 7.69.0 + ## Setup **Note**: The following steps are required only for collecting metrics. For log collection, see the `Log collection` section below. diff --git a/ignite/README.md b/ignite/README.md index af80cd5e92d57..d0054c2324dcf 100644 --- a/ignite/README.md +++ b/ignite/README.md @@ -4,6 +4,8 @@ This check monitors [Ignite][1]. +**Minimum Agent version:** 7.20.0 + ## Setup ### Installation diff --git a/iis/README.md b/iis/README.md index 18f8c6c2bafc8..a65f2ddde1cb9 100644 --- a/iis/README.md +++ b/iis/README.md @@ -6,6 +6,8 @@ Collect IIS metrics aggregated across all of your sites, or on a per-site basis. The IIS Agent check collects metrics for active connections, bytes sent and received, request count by HTTP method, and more. It also sends a service check for each site, letting you know whether it's up or down. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/impala/README.md b/impala/README.md index d46770d750233..d595ff4b698e7 100644 --- a/impala/README.md +++ b/impala/README.md @@ -4,6 +4,8 @@ This check monitors [Impala][1] through the Datadog Agent. +**Minimum Agent version:** 7.39.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/incident_io/README.md b/incident_io/README.md index 25710632c5bd2..872b88d34eb58 100644 --- a/incident_io/README.md +++ b/incident_io/README.md @@ -6,6 +6,8 @@ Integrate your incident.io account with Datadog to gain insights into incident-related activities. +**Minimum Agent version:** 7.57.0 + ## Setup Follow the instructions below to configure this integration for incident.io incident events through a Webhook. diff --git a/infiniband/README.md b/infiniband/README.md index 8985e32a78024..2591ebd461af2 100644 --- a/infiniband/README.md +++ b/infiniband/README.md @@ -10,6 +10,8 @@ Get visibility into your high-performance networking infrastructure to help iden Key metrics collected include port counters like bytes/packets transmitted and received, error counts, and RDMA hardware-specific metrics - giving operators the data needed to ensure optimal performance of their high-speed networking infrastructure. +**Minimum Agent version:** 7.65.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. The check collects metrics by reading and submitting counters by default from [`/sys/class/infiniband//ports/*/counters/` and `/sys/class/infiniband//ports/*/hw_counters/`][3] directories. To ensure that this integration works, ensure that the Agent has the appropriate permissions to access and read the counters from these directories. diff --git a/intercom/README.md b/intercom/README.md index 8e3332fee4ea8..5414c18257f1c 100644 --- a/intercom/README.md +++ b/intercom/README.md @@ -6,6 +6,8 @@ The Intercom integration seamlessly collects admin activities, data events, conversations, news items, and ticket data, and ingests them into Datadog for comprehensive analysis using [webhooks][6]. +**Minimum Agent version:** 7.57.1 + ## Setup Follow the instructions below to configure this integration for your Intercom account. diff --git a/istio/README.md b/istio/README.md index c8f818532ae5a..493c5184c4612 100644 --- a/istio/README.md +++ b/istio/README.md @@ -11,6 +11,8 @@ Datadog monitors every aspect of your Istio environment, so you can: To learn more about monitoring your Istio environment with Datadog, [see the Monitor blog post][3]. +**Minimum Agent version:** 6.1.0 + ## Setup For general instructions on configuring integrations in containerized environments, see [Configure integrations with Autodiscovery on Kubernetes][4] or [Configure integrations with Autodiscovery on Docker][26]. diff --git a/ivanti_connect_secure/README.md b/ivanti_connect_secure/README.md index 8e814a19954d6..c9bdb38f7763b 100644 --- a/ivanti_connect_secure/README.md +++ b/ivanti_connect_secure/README.md @@ -13,6 +13,8 @@ This integration parses the following types of logs: Visualize detailed insights into these logs through the out-of-the-box dashboards. Additionally, ready-to-use Cloud SIEM detection rules are available to help you monitor and respond to potential security threats effectively. +**Minimum Agent version:** 7.64.0 + ## Setup ### Installation diff --git a/ivanti_nzta/README.md b/ivanti_nzta/README.md index 3c27516159cff..983ce9366b7db 100644 --- a/ivanti_nzta/README.md +++ b/ivanti_nzta/README.md @@ -15,6 +15,8 @@ This integration collects logs from the sources listed above and sends them to D - [Log Explorer][3] - [Cloud SIEM][4] +**Minimum Agent version:** 7.62.3 + ## Setup ### Generate API credentials in Ivanti nZTA diff --git a/jamf_pro/README.md b/jamf_pro/README.md index a5ee06dc47ee9..c691f34c11630 100644 --- a/jamf_pro/README.md +++ b/jamf_pro/README.md @@ -6,6 +6,8 @@ Integrate Jamf Pro with Datadog to gain insights into [Events][2] using pre-built dashboard visualizations. Datadog uses its built-in log pipelines to parse and enrich these logs, facilitating easy search and detailed insights. Additionally, the integration includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.68.1 + ## Setup ### Configuration diff --git a/jboss_wildfly/README.md b/jboss_wildfly/README.md index 694ae977a806d..650d3f4d951e0 100644 --- a/jboss_wildfly/README.md +++ b/jboss_wildfly/README.md @@ -4,6 +4,8 @@ This check monitors [JBoss][1] and [WildFly][2] applications. +**Minimum Agent version:** 6.11.0 + ## Setup ### Installation diff --git a/journald/README.md b/journald/README.md index 375ec26eff7d3..2999f399b79c3 100644 --- a/journald/README.md +++ b/journald/README.md @@ -5,6 +5,8 @@ Systemd-journald is a system service that collects and stores logging data. It creates and maintains structured, indexed journals based on logging information from a variety of sources. +**Minimum Agent version:** 7.29.0 + ## Setup ### Installation diff --git a/juniper_srx_firewall/README.md b/juniper_srx_firewall/README.md index f8ada08b8294f..39c58a8709f68 100644 --- a/juniper_srx_firewall/README.md +++ b/juniper_srx_firewall/README.md @@ -10,6 +10,8 @@ This integration parses the following log types: Get detailed visibility into these logs with out-of-the-box dashboards, and strengthen security with prebuilt Cloud SIEM detection rules for proactive threat monitoring and response. +**Minimum Agent version:** 7.67.0 + ## Setup ### Installation diff --git a/kafka/README.md b/kafka/README.md index 36c877a740078..b37888bfd6f38 100644 --- a/kafka/README.md +++ b/kafka/README.md @@ -17,6 +17,8 @@ Add [Data Streams Monitoring][24] to your producers and consumers to visualize t To collect Kafka consumer metrics, see the [kafka_consumer check][3]. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/kafka_consumer/README.md b/kafka_consumer/README.md index d32dffbb7005c..8fc671cb2b8fd 100644 --- a/kafka_consumer/README.md +++ b/kafka_consumer/README.md @@ -11,6 +11,8 @@ This Agent integration collects message offset metrics from your Kafka consumers - If you want to collect JMX metrics from your Kafka brokers or Java-based consumers/producers, see the [Kafka Broker integration][19]. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/karpenter/README.md b/karpenter/README.md index 66f7e8228ae5a..17df65a7e9488 100644 --- a/karpenter/README.md +++ b/karpenter/README.md @@ -4,6 +4,8 @@ This check monitors [Karpenter][1] through the Datadog Agent. For more information, see [Karpenter monitoring][10]. +**Minimum Agent version:** 7.50.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running in your Kubernetes environment. For more information about configuration in containerized environments, see the [Autodiscovery Integration Templates][3] for guidance. diff --git a/keda/README.md b/keda/README.md index 96a13bb493ce0..394ece47522c9 100644 --- a/keda/README.md +++ b/keda/README.md @@ -4,6 +4,8 @@ This check monitors [KEDA][1] through the Datadog Agent. For more information, see [KEDA monitoring][10]. +**Minimum Agent version:** 7.62.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/keeper/README.md b/keeper/README.md index 00bff7552860b..7a715d6062b58 100644 --- a/keeper/README.md +++ b/keeper/README.md @@ -4,6 +4,8 @@ Integrate Keeper with Datadog to gain insights into reporting event logs using pre-built dashboard visualizations. Datadog leverages its built-in log pipelines to parse and enrich these logs, facilitating easy search and detailed insights. Additionally, the integration includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.67.0 + ## Setup ### Prerequisites diff --git a/keycloak/README.md b/keycloak/README.md index ffc25078e654e..6b34ed7f901cf 100644 --- a/keycloak/README.md +++ b/keycloak/README.md @@ -11,6 +11,8 @@ This integration parses the following types of logs: Visualize detailed insights into these logs through the out-of-the-box dashboards. Additionally, out-of-the-box detection rules are available to help you monitor and respond to potential security threats effectively. +**Minimum Agent version:** 7.64.0 + ## Setup ### Installation diff --git a/klaviyo/README.md b/klaviyo/README.md index e78810ff977e7..c77b580dc39b6 100644 --- a/klaviyo/README.md +++ b/klaviyo/README.md @@ -6,6 +6,8 @@ Integrate Klaviyo with Datadog to gain insights into marketing campaign communication and track eCommerce performance based on Klaviyo events. +**Minimum Agent version:** 7.68.1 + ## Setup Follow the instructions below to configure this integration for Klaviyo Marketing and eCommerce events. diff --git a/kong/README.md b/kong/README.md index 835aa3fbaad4e..10d08a7e5a33c 100644 --- a/kong/README.md +++ b/kong/README.md @@ -6,6 +6,8 @@ The Agent's Kong check tracks total requests, response codes, client connections You can also use Kong's [Datadog plugin][15] to send API, connection, and database metrics to Datadog through the Datadog Agent using [DogStatsD][16]. Read the [Monitor Kong with the Datadog integration][11] blog post for more information. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/krakend/README.md b/krakend/README.md index 1f262c66b3a4b..4748239baaf8f 100644 --- a/krakend/README.md +++ b/krakend/README.md @@ -9,6 +9,8 @@ Include a high level overview of what this integration does: - What value will customers get from this integration, and why is it valuable to them? - What specific data will your integration monitor, and what's the value of that data? +**Minimum Agent version:** 7.69.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/kube_apiserver_metrics/README.md b/kube_apiserver_metrics/README.md index 9568b1ad9cca5..11c1d79d379ca 100644 --- a/kube_apiserver_metrics/README.md +++ b/kube_apiserver_metrics/README.md @@ -6,6 +6,8 @@ This check monitors [Kube_apiserver_metrics][2]. +**Minimum Agent version:** 6.11.3 + ## Setup ### Installation diff --git a/kube_dns/README.md b/kube_dns/README.md index f6e94c3bf6251..276edba87d3fa 100644 --- a/kube_dns/README.md +++ b/kube_dns/README.md @@ -8,6 +8,8 @@ Get metrics from kube-dns service in real time to: See https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns for more information about kube-dns. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/kube_metrics_server/README.md b/kube_metrics_server/README.md index c6a5659065b75..8a96c0e6ddc23 100644 --- a/kube_metrics_server/README.md +++ b/kube_metrics_server/README.md @@ -4,6 +4,8 @@ This check monitors [Kube_metrics_server][1] v0.3.0+, a component used by the Kubernetes control plane. +**Minimum Agent version:** 6.12.0 + ## Setup ### Installation diff --git a/kube_scheduler/README.md b/kube_scheduler/README.md index 6c09fedc62161..885692ed44fb8 100644 --- a/kube_scheduler/README.md +++ b/kube_scheduler/README.md @@ -8,6 +8,8 @@ This check monitors [Kubernetes Scheduler][2], part of the Kubernetes control pl **Note**: This check does not collect data for Amazon EKS clusters, as those services are not exposed. +**Minimum Agent version:** 6.11.0 + ## Setup ### Installation diff --git a/kubeflow/README.md b/kubeflow/README.md index 8ba09052596e4..c3001b12d1331 100644 --- a/kubeflow/README.md +++ b/kubeflow/README.md @@ -5,6 +5,8 @@ This check monitors [Kubeflow][1] through the Datadog Agent. +**Minimum Agent version:** 7.59.0 + ## Setup
diff --git a/kubelet/README.md b/kubelet/README.md index fedeb831fd045..09f5791c1b247 100644 --- a/kubelet/README.md +++ b/kubelet/README.md @@ -7,6 +7,8 @@ This integration gets container metrics from kubelet - Visualize and monitor kubelet stats - Be notified about kubelet failovers and events. +**Minimum Agent version:** 6.0.2 + ## Setup ### Installation diff --git a/kubernetes/README.md b/kubernetes/README.md index 385e151ad6a35..1b3fbddc2dd36 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -11,6 +11,8 @@ Get metrics from the Kubernetes service in real time to: Note: This check only works with Agent v5. For Agent v6+, see the [kubelet check][2]. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/kubernetes_admission/README.md b/kubernetes_admission/README.md index 39083481d278e..23d3c57ee72f2 100644 --- a/kubernetes_admission/README.md +++ b/kubernetes_admission/README.md @@ -7,6 +7,8 @@ Kubernetes Admission will generate Datadog Events for Kubernetes Admission Reque The Kubernetes Admission for Datadog's Cluster Agent offers an easy-to-deploy solution for tracking and monitoring Kubernetes Admission activity. By sending real-time Datadog Events for every request, it provides comprehensive visibility and enhances security. +**Minimum Agent version:** 7.59.0 + ## Setup ### Installation diff --git a/kubernetes_cluster_autoscaler/README.md b/kubernetes_cluster_autoscaler/README.md index 8fef8f2bb643b..86ff712d7d3c2 100644 --- a/kubernetes_cluster_autoscaler/README.md +++ b/kubernetes_cluster_autoscaler/README.md @@ -4,6 +4,8 @@ This check monitors [Kubernetes Cluster Autoscaler][1] through the Datadog Agent. +**Minimum Agent version:** 7.54.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/kubernetes_state/README.md b/kubernetes_state/README.md index b7249611e87be..fb74723ebe13d 100644 --- a/kubernetes_state/README.md +++ b/kubernetes_state/README.md @@ -7,6 +7,8 @@ Get metrics from kubernetes_state service in real time to: - Visualize and monitor kubernetes_state states - Be notified about kubernetes_state failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/kubevirt_api/README.md b/kubevirt_api/README.md index 2d96705fb5331..d1fb32dc7f67c 100644 --- a/kubevirt_api/README.md +++ b/kubevirt_api/README.md @@ -8,6 +8,8 @@ This integration is in public beta and should be enabled on production workloads This check monitors [KubeVirt API][1] through the Datadog Agent. +**Minimum Agent version:** 7.59.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/kubevirt_controller/README.md b/kubevirt_controller/README.md index 272c1d1ec8ad6..f05af9ffa4906 100644 --- a/kubevirt_controller/README.md +++ b/kubevirt_controller/README.md @@ -8,6 +8,8 @@ This integration is in public beta and should be enabled on production workloads This check monitors [KubeVirt Controller][1] through the Datadog Agent. +**Minimum Agent version:** 7.59.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/kubevirt_handler/README.md b/kubevirt_handler/README.md index 921f6df7980cf..8294fe33ac7c3 100644 --- a/kubevirt_handler/README.md +++ b/kubevirt_handler/README.md @@ -8,6 +8,8 @@ This integration is in public beta and should be enabled on production workloads This check monitors [KubeVirt Handler][1] through the Datadog Agent. +**Minimum Agent version:** 7.59.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/kuma/README.md b/kuma/README.md index 5c7f9a10bc9a1..67cb899ed283d 100644 --- a/kuma/README.md +++ b/kuma/README.md @@ -2,7 +2,7 @@ ## Overview -This check monitors [Kuma][1], a universal open-source control plane for service mesh that supports both Kubernetes and Universal mode (VMs and standalone containers). Kuma is the open-source community version of [Kong Mesh][2], developed by Kong. +This check monitors [Kuma][1], a universal open-source control plane for service mesh that supports both Kubernetes and Universal mode (VMs and standalone containers). [Kong Mesh][2], the enterprise edition of Kuma, is fully supported through this integration. Beyond the installation steps outlined here, no additional configuration is required. With the Datadog Kuma integration, you can: - Monitor the health and performance of the Kuma control plane. @@ -13,6 +13,8 @@ For monitoring the Envoy data planes (sidecars) within your Kuma mesh: - Use the [Envoy integration][10] to collect metrics. - Use this Kuma integration to collect logs. +**Minimum Agent version:** 7.68.0 + ## Setup The Kuma check is included in the [Datadog Agent][3] package. No additional installation is needed on your server. diff --git a/kuma/images/kuma_control_plane.png b/kuma/images/kuma_control_plane.png new file mode 100644 index 0000000000000..8b9383f54f6b2 Binary files /dev/null and b/kuma/images/kuma_control_plane.png differ diff --git a/kuma/images/kuma_control_plane_dark.png b/kuma/images/kuma_control_plane_dark.png new file mode 100644 index 0000000000000..fafff03c32705 Binary files /dev/null and b/kuma/images/kuma_control_plane_dark.png differ diff --git a/kuma/images/kuma_service_communication.png b/kuma/images/kuma_service_communication.png new file mode 100644 index 0000000000000..b40a73e1b5f37 Binary files /dev/null and b/kuma/images/kuma_service_communication.png differ diff --git a/kuma/images/kuma_service_communication_dark.png b/kuma/images/kuma_service_communication_dark.png new file mode 100644 index 0000000000000..730edcbddc3de Binary files /dev/null and b/kuma/images/kuma_service_communication_dark.png differ diff --git a/kuma/manifest.json b/kuma/manifest.json index fc1f603bbca0f..d74e8895254d4 100644 --- a/kuma/manifest.json +++ b/kuma/manifest.json @@ -9,9 +9,30 @@ "configuration": "README.md#Setup", "support": "README.md#Support", "changelog": "CHANGELOG.md", - "description": "Collect metrics and logs from Kuma, an Open Source service mesh for Kubernetes and VMs.", + "description": "Collect metrics and logs from Kuma, a service mesh for Kubernetes and VMs. Kuma is the community version of Kong Mesh.", "title": "Kuma", - "media": [], + "media": [ + { + "media_type": "image", + "caption": "Kuma Control Plane Dashboard - Monitor your service mesh control plane metrics and health", + "image_url": "images/kuma_control_plane.png" + }, + { + "media_type": "image", + "caption": "Kuma Control Plane Dashboard (Dark Theme) - Monitor your service mesh control plane metrics and health", + "image_url": "images/kuma_control_plane_dark.png" + }, + { + "media_type": "image", + "caption": "Kuma Service Communication Dashboard - View service-to-service communication and performance", + "image_url": "images/kuma_service_communication.png" + }, + { + "media_type": "image", + "caption": "Kuma Service Communication Dashboard (Dark Theme) - View service-to-service communication and performance", + "image_url": "images/kuma_service_communication_dark.png" + } + ], "classifier_tags": [ "Supported OS::Linux", "Supported OS::Windows", diff --git a/kyototycoon/README.md b/kyototycoon/README.md index 18773ec899022..22f4fc7fa773d 100644 --- a/kyototycoon/README.md +++ b/kyototycoon/README.md @@ -4,6 +4,8 @@ The Agent's KyotoTycoon check tracks get, set, and delete operations, and lets you monitor replication lag. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/kyverno/README.md b/kyverno/README.md index 46bd56b4f33b8..2c884c3c9ec7b 100644 --- a/kyverno/README.md +++ b/kyverno/README.md @@ -4,6 +4,8 @@ This check monitors [Kyverno][1] through the Datadog Agent. +**Minimum Agent version:** 7.55.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running in your Kubernetes environment. For more information about configuration in containerized environments, see the [Autodiscovery Integration Templates][3] for guidance. diff --git a/langchain/README.md b/langchain/README.md index 52a641980951c..4cc7529a5d800 100644 --- a/langchain/README.md +++ b/langchain/README.md @@ -9,6 +9,8 @@ See the [LLM Observability tracing view video](https://imgix.datadoghq.com/video Get cost estimation, prompt and completion sampling, error tracking, performance metrics, and more out of [LangChain][1] Python library requests using Datadog metrics and APM. +**Minimum Agent version:** 7.47.0 + ## Setup ### LLM Observability: Get end-to-end visibility into your LLM application using LangChain diff --git a/lastpass/README.md b/lastpass/README.md index dc66cfe5bada4..560752d9dd8e7 100644 --- a/lastpass/README.md +++ b/lastpass/README.md @@ -10,6 +10,8 @@ Integrate LastPass with Datadog to gain insights into reporting event logs throu normalized and enriched before ingestion. Pre-built dashboard visualizations provide immediate insights into LastPass reporting events, while out-of-the-box detection rules enhance detection and response capabilities. +**Minimum Agent version:** 7.56.0 + ## Setup ### Generate API credentials in LastPass diff --git a/lighttpd/README.md b/lighttpd/README.md index 08efdbd89dbbe..92a6a85d0ab75 100644 --- a/lighttpd/README.md +++ b/lighttpd/README.md @@ -6,6 +6,8 @@ The Agent's lighttpd check tracks uptime, bytes served, requests per second, response codes, and more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/linux_audit_logs/README.md b/linux_audit_logs/README.md index a8869151c214d..6d63f88dbbdab 100644 --- a/linux_audit_logs/README.md +++ b/linux_audit_logs/README.md @@ -20,6 +20,8 @@ This integration collects Linux audit logs and sends them to Datadog for analysi * [Log Explorer][4] * [Cloud SIEM][5] +**Minimum Agent version:** 7.67.0 + ## Setup ### Installation diff --git a/linux_proc_extras/README.md b/linux_proc_extras/README.md index 64f22b4f13705..107bec9597f46 100644 --- a/linux_proc_extras/README.md +++ b/linux_proc_extras/README.md @@ -7,6 +7,8 @@ Get metrics from linux_proc_extras service in real time to: - Visualize and monitor linux_proc_extras states - Be notified about linux_proc_extras failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/litellm/README.md b/litellm/README.md index 170a2124442dc..5ac24fdec1f4a 100644 --- a/litellm/README.md +++ b/litellm/README.md @@ -12,6 +12,8 @@ Get cost estimation, prompt and completion sampling, error tracking, performance Key metrics such as request/response counts, latency, error rates, token usage, and spend per provider or deployment are monitored. This data enables customers to track usage patterns, detect anomalies, control costs, and troubleshoot issues quickly, ensuring efficient and reliable LLM operations through LiteLLM's health check and Prometheus endpoints. +**Minimum Agent version:** 7.68.0 + ## Setup ### LLM Observability: Get end-to-end visibility into your LLM application using LiteLLM diff --git a/lustre/README.md b/lustre/README.md index bbb1807850d8e..a6e04fb5675b6 100644 --- a/lustre/README.md +++ b/lustre/README.md @@ -15,6 +15,8 @@ The Datadog Agent can collect many metrics from Lustre clusters, including: - **Changelog Events**: Capture filesystem change events for audit and analysis (client nodes only) +**Minimum Agent version:** 7.69.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. diff --git a/mac_audit_logs/README.md b/mac_audit_logs/README.md index 4d593228914a4..e3d263ee660d0 100755 --- a/mac_audit_logs/README.md +++ b/mac_audit_logs/README.md @@ -16,6 +16,8 @@ This integration collects Mac audit logs and sends them to Datadog for analysis, * [Log Explorer][2] * [Cloud SIEM][3] +**Minimum Agent version:** 7.69.0 + ## Setup ### Installation diff --git a/mailchimp/README.md b/mailchimp/README.md index 4e68aab568626..69e6d800b206d 100644 --- a/mailchimp/README.md +++ b/mailchimp/README.md @@ -11,6 +11,8 @@ This integration ingests the following metrics: The Mailchimp integration collects metrics from campaigns and lists, directing them into Datadog for analysis. This integration provides insights including total campaigns, email performance, click-through rates, open rates, bounce rates, unsubscribes, and abuse reports. It features consolidated statistics for campaigns sent in the last 30 days, along with many additional metrics, all accessible through out-of-the-box dashboards. +**Minimum Agent version:** 7.56.0 + ## Setup ### Generate API credentials in Mailchimp diff --git a/mapr/README.md b/mapr/README.md index f10f567af936e..da2969df26250 100644 --- a/mapr/README.md +++ b/mapr/README.md @@ -4,6 +4,8 @@ This check monitors [MapR][1] 6.1+ through the Datadog Agent. +**Minimum Agent version:** 6.15.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. diff --git a/mapreduce/README.md b/mapreduce/README.md index 70eb816e5ba2d..c23160648eb70 100644 --- a/mapreduce/README.md +++ b/mapreduce/README.md @@ -9,6 +9,8 @@ Get metrics from mapreduce service in real time to: - Visualize and monitor mapreduce states - Be notified about mapreduce failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/marathon/README.md b/marathon/README.md index 1cccb9551a422..71280f6126de1 100644 --- a/marathon/README.md +++ b/marathon/README.md @@ -7,6 +7,8 @@ The Agent's Marathon check lets you: - Track the state and health of every application: see configured memory, disk, cpu, and instances; monitor the number of healthy and unhealthy tasks - Monitor the number of queued applications and the number of deployments +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/marklogic/README.md b/marklogic/README.md index 27243837542ec..ac4e1b0445f85 100644 --- a/marklogic/README.md +++ b/marklogic/README.md @@ -4,6 +4,8 @@ This check monitors [MarkLogic][1] through the Datadog Agent. MarkLogic Server is a multi-model database designed to be a data hub for operational and analytical data. +**Minimum Agent version:** 7.23.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/mcache/README.md b/mcache/README.md index 70e81db98093e..6a76c1dfdad41 100644 --- a/mcache/README.md +++ b/mcache/README.md @@ -4,6 +4,8 @@ The Agent's Memcache check lets you track Memcache's memory use, hits, misses, evictions, fill percent, and much more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/mesos_master/README.md b/mesos_master/README.md index 7336c5601b0c0..14726c0fd8d90 100644 --- a/mesos_master/README.md +++ b/mesos_master/README.md @@ -15,6 +15,8 @@ This check collects metrics from Mesos masters for: And many more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/mesos_slave/README.md b/mesos_slave/README.md index eabb354796ed5..e997a8fb4cf28 100644 --- a/mesos_slave/README.md +++ b/mesos_slave/README.md @@ -14,6 +14,8 @@ And many more. This check also creates a service check for every executor task. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/metabase/README.md b/metabase/README.md index 0ed36ef2e05af..b933985ec18e2 100644 --- a/metabase/README.md +++ b/metabase/README.md @@ -6,6 +6,8 @@ Integrate Metabase with Datadog to gain insights into activity event logs, view logs, and query logs through the Metabase API. The data is normalized and enriched before ingestion. Pre-built dashboard visualizations provide immediate insights into Metabase logs. +**Minimum Agent version:** 7.57.2 + ## Setup ### Prerequisites diff --git a/microsoft_dns/README.md b/microsoft_dns/README.md index 5de3e24501bc0..5932890cb63e1 100644 --- a/microsoft_dns/README.md +++ b/microsoft_dns/README.md @@ -6,6 +6,8 @@ This integration collects and enhances [DNS Server audit events][5], providing detailed insights through out-of-the-box dashboards. It also includes ready-to-use Cloud SIEM detection rules for improved monitoring and security. +**Minimum Agent version:** 7.68.0 + ## Setup ### Installation diff --git a/microsoft_sysmon/README.md b/microsoft_sysmon/README.md index d9f8d973e0ce1..c6689c67cc728 100644 --- a/microsoft_sysmon/README.md +++ b/microsoft_sysmon/README.md @@ -6,6 +6,8 @@ This integration enriches and ingests the [Sysmon event logs][5]. Use the pre-built dashboard to get a high-level view of the Sysmon events helping security teams monitor system activity. +**Minimum Agent version:** 7.67.0 + ## Setup ### Installation diff --git a/milvus/README.md b/milvus/README.md index f6a50b98824dc..dc95b2a6199bc 100644 --- a/milvus/README.md +++ b/milvus/README.md @@ -4,6 +4,8 @@ This check monitors [Milvus][1] through the Datadog Agent. It provides insights into your Milvus deployment's performance by collecting information about the latency and number of executions of individual operations. This integration also allows for monitoring the size and ressource allocation of your deployment. +**Minimum Agent version:** 7.62.0 + ## Setup ### Installation diff --git a/mimecast/README.md b/mimecast/README.md index 2cb39614b5b93..c7efe2b973db3 100644 --- a/mimecast/README.md +++ b/mimecast/README.md @@ -15,6 +15,8 @@ This integration ingests the following logs: The Mimecast integration seamlessly collects all the above listed logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into audit, DLP, malicious attachments in email, email sent by user as an impersonated identity, phishing email links, and many more through the out-of-the-box dashboards. +**Minimum Agent version:** 7.54.1 + ## Setup ### Generate API credentials in Mimecast diff --git a/mongo/README.md b/mongo/README.md index d14aab151f0f9..7d2189c305072 100644 --- a/mongo/README.md +++ b/mongo/README.md @@ -15,6 +15,8 @@ Enable [Database Monitoring][28] (DBM) for enhanced insights into query performa **Note**: MongoDB v3.0+ is required for this integration. Integration of MongoDB Atlas with Datadog is only available on M10+ clusters. This integration also supports Alibaba ApsaraDB and Amazon DocumentDB Instance-Based clusters. DocumentDB Elastic clusters are not supported because they only expose the cluster (mongos) endpoints. +**Minimum Agent version:** 6.0.0 + ## Setup
This page describes the standard MongoDB Agent integration. If you are looking for the Database Monitoring product for MongoDB, see Datadog Database Monitoring.
diff --git a/mux/README.md b/mux/README.md index d10a50bdaf9f9..46dc8ab306aa7 100644 --- a/mux/README.md +++ b/mux/README.md @@ -6,6 +6,8 @@ Integrate Mux with Datadog to gain insights into mux video performance data. +**Minimum Agent version:** 7.57.2 + ## Setup **Note:** Only cloud instances running Pro and Enterprise plans are currently supported. diff --git a/mysql/README.md b/mysql/README.md index 57138658a778a..a9c4f66907741 100644 --- a/mysql/README.md +++ b/mysql/README.md @@ -10,6 +10,8 @@ Enable [Database Monitoring][32] (DBM) for enhanced insights into query performa MySQL version 5.6, 5.7, 8.0, and MariaDB versions 10.5, 10.6, 10.11 and 11.1 are supported. +**Minimum Agent version:** 6.0.0 + ## Setup
This page describes the MySQL Agent standard integration. If you are looking for the Database Monitoring product for MySQL, see Datadog Database Monitoring.
diff --git a/nagios/README.md b/nagios/README.md index f119b82b3a7f4..bf6b41089d8c5 100644 --- a/nagios/README.md +++ b/nagios/README.md @@ -13,6 +13,8 @@ This check watches your Nagios server's logs and sends events to Datadog for the This check can also send Nagios performance data as metrics to Datadog. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/network/README.md b/network/README.md index 92d0b9fa1af2c..0acc02948af6c 100644 --- a/network/README.md +++ b/network/README.md @@ -6,6 +6,8 @@ The network check collects TCP/IP stats from the host operating system. +**Minimum Agent version:** 6.0.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. diff --git a/network_path/README.md b/network_path/README.md index 8b1ade0f0ab89..4b2dc14a9a4a3 100644 --- a/network_path/README.md +++ b/network_path/README.md @@ -4,6 +4,8 @@ Network Path integration collects traceroute data. +**Minimum Agent version:** 7.55.0 + ## Setup ### Installation diff --git a/nfsstat/README.md b/nfsstat/README.md index 88fa45df7d337..f38a7dac3c306 100644 --- a/nfsstat/README.md +++ b/nfsstat/README.md @@ -4,6 +4,8 @@ The NFS integration collects metrics about mount points on the NFS client as it uses the `nfsiostat` tool that displays NFS client per-mount [statistics][1]. +**Minimum Agent version:** 6.6.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. diff --git a/nginx/README.md b/nginx/README.md index 1454a99b10cbd..a056dd16483fd 100644 --- a/nginx/README.md +++ b/nginx/README.md @@ -16,6 +16,8 @@ For users of NGINX Plus, the commercial version of NGINX, the Agent can collect - Caches, such as size, hits, and misses - SSL, such as handshakes and failed handshakes +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/nvidia_nim/README.md b/nvidia_nim/README.md index 58872ae63f8ef..04c9fcacd2dd9 100644 --- a/nvidia_nim/README.md +++ b/nvidia_nim/README.md @@ -4,6 +4,8 @@ This check monitors [NVIDIA NIM][1] through the Datadog Agent. +**Minimum Agent version:** 7.61.0 + ## Setup
diff --git a/nvidia_triton/README.md b/nvidia_triton/README.md index d39239533cd3e..7c5d56b1db47e 100644 --- a/nvidia_triton/README.md +++ b/nvidia_triton/README.md @@ -4,6 +4,8 @@ This check monitors [Nvidia Triton][1] through the Datadog Agent. +**Minimum Agent version:** 7.50.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/octopus_deploy/README.md b/octopus_deploy/README.md index 0f55ceb8095d3..10cef4c3386b7 100644 --- a/octopus_deploy/README.md +++ b/octopus_deploy/README.md @@ -4,6 +4,8 @@ This check monitors your [Octopus Deploy][1] deployments through the Datadog Agent. Track information such as average deployment time per environment and deployment failure rate for a project. +**Minimum Agent version:** 7.63.0 + ## Setup Complete the following steps to install and configure this check on a host-based Agent. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/okta_workflows/README.md b/okta_workflows/README.md index a72c2cd846f6f..1cb8e7c49a5d7 100644 --- a/okta_workflows/README.md +++ b/okta_workflows/README.md @@ -5,6 +5,8 @@ The Okta Workflows integration collects Okta workflow event logs and sends them to Datadog for comprehensive analysis. +**Minimum Agent version:** 7.61.0 + ## Setup ### Generate API Credentials in Okta Workflows diff --git a/openldap/README.md b/openldap/README.md index 4d9a85a129a94..37fac41082567 100644 --- a/openldap/README.md +++ b/openldap/README.md @@ -4,6 +4,8 @@ Use the OpenLDAP integration to get metrics from the `cn=Monitor` backend of your OpenLDAP servers. +**Minimum Agent version:** 6.5.0 + ## Setup ### Installation diff --git a/openmetrics/README.md b/openmetrics/README.md index a79524ed355da..2b88c7fac2685 100644 --- a/openmetrics/README.md +++ b/openmetrics/README.md @@ -8,6 +8,8 @@ Extract custom metrics from any OpenMetrics or Prometheus endpoints. The integration is compatible with both the [Prometheus exposition format][12] as well as with the [OpenMetrics specification][13]. +**Minimum Agent version:** 6.6.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][1] for guidance on applying these instructions. diff --git a/openstack/README.md b/openstack/README.md index 6987ae0e5b5a2..abfd85ba4ed4b 100644 --- a/openstack/README.md +++ b/openstack/README.md @@ -11,6 +11,8 @@ Get metrics from OpenStack service in real time to: - Visualize and monitor OpenStack states. - Be notified about OpenStack failovers and events. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/openstack_controller/README.md b/openstack_controller/README.md index 11ed08273e85f..e17c13957b0b2 100644 --- a/openstack_controller/README.md +++ b/openstack_controller/README.md @@ -6,6 +6,8 @@ This check monitors [OpenStack][2] from the controller node. +**Minimum Agent version:** 6.10.0 + ## Setup ### Installation diff --git a/openvpn/README.md b/openvpn/README.md index 7d5f1ba7e8df9..bd1f8f018f92f 100644 --- a/openvpn/README.md +++ b/openvpn/README.md @@ -11,6 +11,8 @@ This integration enriches and ingests the following events: This integration seamlessly collects all of the above listed logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The OpenVPN integration provides insight into authentication and connection events through the out-of-the-box dashboards. Additionally, it includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.67.0 + ## Setup ### Installation diff --git a/oracle/README.md b/oracle/README.md index 66e80493ec504..956a74f39ef74 100644 --- a/oracle/README.md +++ b/oracle/README.md @@ -9,6 +9,8 @@ The Oracle integration provides health and performance metrics for your Oracle d Enable [Database Monitoring][2] (DBM) for enhanced insights into query performance and database health. In addition to the standard integration features, Datadog DBM provides query-level metrics, live and historical query snapshots, wait event analysis, database load, query explain plans, and blocking query insights. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/orca_security/README.md b/orca_security/README.md index 6de449a8e6a9d..6176de62de425 100644 --- a/orca_security/README.md +++ b/orca_security/README.md @@ -9,6 +9,8 @@ This integration ingests the following log: The Orca Security integration seamlessly ingests alert logs data using the built-in integration of Orca with Datadog. Before ingestion of the data, it normalizes and enriches the logs, ensures a consistent data format, and enhances information content for downstream processing and analysis. The integration provides insights into alert logs through the out-of-the-box dashboards. +**Minimum Agent version:** 7.59.1 + ## Setup ### Configuration diff --git a/ossec_security/README.md b/ossec_security/README.md index 9034cb2ec6113..b7d3ac1c34c85 100644 --- a/ossec_security/README.md +++ b/ossec_security/README.md @@ -16,6 +16,8 @@ This integration ingests the following types of logs: Visualize detailed insights into these logs through the out-of-the-box dashboards. +**Minimum Agent version:** 7.57.0 + ## Setup ### Installation diff --git a/palo_alto_cortex_xdr/README.md b/palo_alto_cortex_xdr/README.md index ba935f483b0dc..a1038a10d5402 100644 --- a/palo_alto_cortex_xdr/README.md +++ b/palo_alto_cortex_xdr/README.md @@ -11,6 +11,8 @@ This integration ingests the following logs: The Palo Alto Cortex XDR integration seamlessly collects the data of Palo Alto Cortex XDR logs using REST APIs. Before ingesting the data, it normalizes and enriches the logs, ensuring a consistent data format and enhancing information content for downstream processing and analysis. The integration provides insights into incidents and alerts using out-of-the-box dashboards. +**Minimum Agent version:** 7.55.2 + ## Setup ### Generate API credentials in Palo Alto Cortex XDR diff --git a/palo_alto_panorama/README.md b/palo_alto_panorama/README.md index 1d6313b5835df..6349a4c96f3fa 100644 --- a/palo_alto_panorama/README.md +++ b/palo_alto_panorama/README.md @@ -6,6 +6,8 @@ This integration ingests Traffic, Threat, Authentication, HIP Match, User ID, Tu This integration offers dashboard visualizations with detailed insights into inbound and outbound traffic flows, threats details, insights into user authentications, events generated by globalprotect, mapping between users and IP address, and more. +**Minimum Agent version:** 7.53.0 + ## Setup ### Installation diff --git a/pan_firewall/README.md b/pan_firewall/README.md index a8f1e74b4e644..22cac71b6ec4c 100644 --- a/pan_firewall/README.md +++ b/pan_firewall/README.md @@ -14,6 +14,8 @@ Firewall traffic logs can be used to measure the traffic and sessions passing th #### Monitor authentication anomalies Firewall authentication logs provide detailed information on users as they authenticate with Palo Alto Networks firewall. These logs can be used to monitor anomalous spikes in authentication traffic from specific protocols, users, locations, and more. +**Minimum Agent version:** 7.31.1 + ## Setup ### Log collection diff --git a/pdh_check/README.md b/pdh_check/README.md index b91104d5b2ce9..f9d540f632433 100644 --- a/pdh_check/README.md +++ b/pdh_check/README.md @@ -8,6 +8,8 @@ Get metrics from Windows performance counters in real time to: - Visualize and monitor Windows performance counters through the PDH API. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/pgbouncer/README.md b/pgbouncer/README.md index 3e74f3888a95f..3bb7dbe2b8232 100644 --- a/pgbouncer/README.md +++ b/pgbouncer/README.md @@ -4,6 +4,8 @@ The PgBouncer check tracks connection pool metrics and lets you monitor traffic to and from your application. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/php_fpm/README.md b/php_fpm/README.md index 223985ad256d5..21ab32e7d7f65 100644 --- a/php_fpm/README.md +++ b/php_fpm/README.md @@ -6,6 +6,8 @@ The PHP-FPM check monitors the state of your FPM pool and tracks request performance. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/ping_federate/README.md b/ping_federate/README.md index 7b7652ff444d8..1ec825237f2b5 100644 --- a/ping_federate/README.md +++ b/ping_federate/README.md @@ -5,6 +5,8 @@ This integration provides enrichment and visulization for admin and audit logs. It helps to visualize detailed insights into admin and audit log analysis using out-of-the-box dashboards. +**Minimum Agent version:** 7.57.0 + ## Setup ### Installation diff --git a/ping_one/README.md b/ping_one/README.md index ba8aab745f164..954f855aec0b6 100644 --- a/ping_one/README.md +++ b/ping_one/README.md @@ -10,6 +10,8 @@ This integration ingests the following logs: The PingOne integration seamlessly collects the data of PingOne audit logs using the REST APIs. Using the out-of-the-box logs pipeline, the logs are parsed and enriched for easy searching and analysis. This integration includes several dashboards visualizing total Audit events, total successful and total failed login attempts, total successful and total failed kerberos login attempts, and more. +**Minimum Agent version:** 7.54.1 + ## Setup ### Generate API credentials in PingOne diff --git a/plaid/README.md b/plaid/README.md index ef0a731ff03e7..9250fc93283c6 100644 --- a/plaid/README.md +++ b/plaid/README.md @@ -14,6 +14,8 @@ Here are some insights that can be drawn from your Plaid dashboard: - **Type Classification**: Categorize transactions by type for deeper financial insights. - **Currency Insights**: Examine iso_currency_code for multi-currency transaction patterns. +**Minimum Agent version:** 7.58.2 + ## Setup 1. Log in to [Plaid](https://dashboard.plaid.com/signin/). diff --git a/plivo/README.md b/plivo/README.md index 26ac995bb1801..d59bf0d034b71 100644 --- a/plivo/README.md +++ b/plivo/README.md @@ -5,6 +5,8 @@ The Plivo integration seamlessly collects message (SMS, MMS, and WhatsApp) and voice call data, and sends it to Datadog for comprehensive analysis. +**Minimum Agent version:** 7.51.0 + ## Setup ### Generate API credentials in Plivo diff --git a/postfix/README.md b/postfix/README.md index f04ee3c9c09b6..05dc9c2698ebf 100644 --- a/postfix/README.md +++ b/postfix/README.md @@ -6,6 +6,8 @@ This check monitors the size of all your Postfix queues. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/postgres/README.md b/postgres/README.md index ea6120a274f21..1c0ff15bbfdda 100644 --- a/postgres/README.md +++ b/postgres/README.md @@ -10,6 +10,8 @@ Enable [Database Monitoring][28] (DBM) for enhanced insights into query performa Postgres versions 9.6-16 are supported. +**Minimum Agent version:** 6.0.0 + ## Setup
This page describes the standard Postgres Agent integration. If you are looking for the Database Monitoring product for Postgres, see Datadog Database Monitoring.
diff --git a/postgres/assets/configuration/spec.yaml b/postgres/assets/configuration/spec.yaml index 5b1b293747682..6ca6dfdcf450b 100644 --- a/postgres/assets/configuration/spec.yaml +++ b/postgres/assets/configuration/spec.yaml @@ -16,24 +16,22 @@ files: - template: instances options: - name: host - required: true description: | The hostname to connect to. To connect to a Unix socket, specify the full path to the socket file, e.g. `/var/run/postgresql/.s.PGSQL.5432`. value: - example: "localhost" type: string + display_default: "localhost" - name: port description: The port to use when connecting to PostgreSQL. value: type: integer - example: 5432 + display_default: 5432 - name: username description: The Datadog username created to connect to PostgreSQL. - required: true value: type: string - example: datadog + display_default: "datadog" - name: password description: The password associated with the Datadog user. value: @@ -51,13 +49,13 @@ files: and can be useful to set a custom hostname when connecting to a remote database through a proxy. value: type: string + default: null - name: exclude_hostname description: | Omit the hostname from tags and events. This is useful when the database host is not monitored by an agent. value: type: boolean example: false - default: false - name: database_identifier description: | Controls how the database is identified. The default value is the resolved hostname for the instance, @@ -79,7 +77,6 @@ files: - host: The provided host of the instance. - port: The port number of the instance. In addition, you can use any key from the `tags` section of the configuration. - default: "$resolved_hostname" - name: dbstrict description: | Whether to restrict the scope of the check to just the database in question. @@ -117,7 +114,7 @@ files: - name: ignore_schemas_owned_by description: | A list of database users which own schemas to ignore. - No metrics or statement samples will be collected for these schemas. + No metrics will be collected for these schemas. Each value can be a plain string or a Postgres pattern. value: type: array @@ -157,6 +154,7 @@ files: For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html value: type: string + default: null - name: ssl_cert description: | The path to the ssl certificate. @@ -164,6 +162,7 @@ files: For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html value: type: string + default: null - name: ssl_key description: | The path to the ssl client key. @@ -171,6 +170,7 @@ files: For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html value: type: string + default: null - name: ssl_password description: | The password for the secret key specified in ssl_key, allowing client certificate private keys to be stored @@ -179,6 +179,7 @@ files: For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html value: type: string + default: null - name: query_timeout description: | Adds a statement_timeout https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT @@ -258,6 +259,7 @@ files: type: array items: type: string + default: [] example: - relation_name: schemas: @@ -284,6 +286,7 @@ files: example: true - name: locks_idle_in_transaction description: Configure collection of idle in transaction lock age metrics + hidden: true options: - name: enabled description: Enable collection of idle in transaction lock age metrics. @@ -311,7 +314,6 @@ files: value: type: boolean example: false - display_default: false - name: collect_activity_metrics description: | Collect metrics regarding transactions from pg_stat_activity. Please make sure the user @@ -364,14 +366,15 @@ files: Starting Postgres 10, WAL file metrics are enabled by default using `pg_ls_waldir` and don't need local access. value: type: boolean - example: false + example: true - name: data_directory description: | The data directory of your postgres installation - Required when collecting WAL metrics. + Required when collecting WAL metrics on Postgres 9.6. value: type: string example: /usr/local/pgsql/data + display_default: /usr/local/pgsql/data - name: tag_replication_role hidden: true description: Tag metrics and checks with `replication_role:`. @@ -383,7 +386,6 @@ files: value: type: integer display_default: 200 - example: 200 - template: instances/db overrides: custom_queries.value.example: @@ -396,6 +398,13 @@ files: tags: - test:postgresql metric_prefix: postgresql + - name: custom_metrics + description: This option is deprecated. Use `custom_queries` instead. + hidden: true + value: + type: array + items: + type: object - name: database_autodiscovery description: | Define the configuration for database autodiscovery. @@ -486,6 +495,15 @@ files: type: string example: show_pg_stat_statements() display_default: pg_stat_statements + - name: pg_stat_activity_view + hidden: true + description: | + Set this value if you want to define a custom view or function to allow the datadog user to query the + `pg_stat_activity` table, which is useful for restricting the permissions given to the datadog agent. + Please note this is an ALPHA feature and is subject to change or deprecation without notice. + value: + type: string + display_default: pg_stat_activity - name: query_encodings description: | Set this value if your database is encoded in SQL_ASCII and you have clients that use encodings other than UTF-8. @@ -501,6 +519,8 @@ files: example: - utf8 - latin1 + display_default: + - utf8 - name: query_metrics description: Configure collection of query metrics options: @@ -525,7 +545,21 @@ files: higher than this threshold, a warning is emitted to recommend lowering the setting value. value: type: number - example: 10000 + default: 10000 + - name: full_statement_text_cache_max_size + hidden: true + description: | + Set the max size of the cache used for the full statement text. + value: + type: number + default: 10000 + - name: full_statement_text_samples_per_hour_per_query + hidden: true + description: | + Set the max number of full statement text samples to collect per hour per query. + value: + type: number + default: 10000 - name: incremental_query_metrics hidden: true description: | @@ -544,6 +578,22 @@ files: type: number display_default: 300 example: 300 + - name: run_sync + hidden: true + description: | + Run the query metrics collection synchronously. This is useful for testing purposes, but should not be used + in production as it can block the main thread and cause performance issues. + value: + type: boolean + example: false + - name: batch_max_content_size + hidden: true + description: | + This is a stub option for type hints. This value is actually set in the datadog.yaml config using + database_monitoring.metrics.batch_max_content_size. For details on this parameter, see statements.py. + value: + type: integer + example: 20_000_000 - name: query_samples description: Configure collection of query samples options: @@ -601,6 +651,28 @@ files: value: type: boolean example: true + - name: explain_errors_cache_maxsize + hidden: true + description: | + Set the max size of the cache used for the explain errors. + value: + type: integer + default: 5000 + - name: explain_errors_cache_ttl + hidden: true + description: | + Set the ttl in seconds of the cache used for the explain errors. + value: + type: integer + default: 86400 + - name: run_sync + hidden: true + description: | + Run the query metrics collection synchronously. This is useful for testing purposes, but should not be used + in production as it can block the main thread and cause performance issues. + value: + type: boolean + example: false - name: query_activity description: Configure collection of query activity options: @@ -653,6 +725,14 @@ files: - plpgsql% default: - plpgsql% + - name: run_sync + hidden: true + description: | + Run the metadata collection synchronously. This is useful for testing purposes, but should not be used + in production as it can block the main thread and cause performance issues. + value: + type: boolean + example: false - name: collect_schemas description: | Enable collection of database schemas. In order to collect schemas from all user databases, @@ -896,35 +976,6 @@ files: - name: identity_scope type: string example: https://ossrdbms-aad.database.windows.net/.default - - - name: managed_identity - description: | - DEPRECATED: Please use `azure.managed_authentication` instead. - - Configuration section used for Azure AD Authentication. - - This supports using System or User assigned managed identities. - If this section is set, then the `username` and `password` fields will be ignored. - - For more information on Managed Identities, see the Azure docs - https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview - options: - - name: client_id - description: | - Client ID of the Managed Identity. - value: - type: string - - name: identity_scope - description: | - The permission scope from where to access the identity token. This value is optional if using the default - identity scope for Azure managed databases. - - For more information on scopes, see the Azure docs - https://learn.microsoft.com/en-us/azure/active-directory/develop/scopes-oidc - value: - type: string - example: https://ossrdbms-aad.database.windows.net/.default - - name: obfuscator_options description: | Configure how the SQL obfuscator behaves. @@ -1093,8 +1144,7 @@ files: This collection does not involve any additional queries to the database. value: type: number - example: 300 - display_default: false + default: 300 - name: propagate_agent_tags description: | Set to `true` to propagate the tags from `datadog.yaml` and the agent host tags to the check. diff --git a/postgres/changelog.d/21347.added b/postgres/changelog.d/21347.added new file mode 100644 index 0000000000000..442d20a538c90 --- /dev/null +++ b/postgres/changelog.d/21347.added @@ -0,0 +1,2 @@ +* Add agent health event for Postgres config validation +* Refactor Postgres configuration with fixes and clarifications on default values diff --git a/postgres/datadog_checks/postgres/config.py b/postgres/datadog_checks/postgres/config.py index e95e24960ef47..2c06a5b8d60c7 100644 --- a/postgres/datadog_checks/postgres/config.py +++ b/postgres/datadog_checks/postgres/config.py @@ -2,322 +2,481 @@ # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS -from typing import Optional +from __future__ import annotations -from datadog_checks.base import AgentCheck, ConfigurationError, is_affirmative +import copy +from typing import TYPE_CHECKING, Optional, Tuple + +from datadog_checks.postgres.config_models import InstanceConfig, defaults, dict_defaults +from datadog_checks.postgres.config_models.instance import ( + Aws, + Azure, + Gcp, + ManagedAuthentication, + ManagedAuthentication1, + Union, +) +from datadog_checks.postgres.relationsmanager import RelationsManager + +# We need to use TYPE_CHECKING to avoid circular imports, which are ok while type checking +# but not while executing +if TYPE_CHECKING: + from datadog_checks.postgres import PostgreSql + +from datadog_checks.base import AgentCheck, ConfigurationError from datadog_checks.base.utils.aws import rds_parse_tags_from_endpoint from datadog_checks.base.utils.db.utils import get_agent_host_tags +from datadog_checks.postgres.features import Feature, FeatureKey, FeatureNames SSL_MODES = {'disable', 'allow', 'prefer', 'require', 'verify-ca', 'verify-full'} TABLE_COUNT_LIMIT = 200 -DEFAULT_IGNORE_DATABASES = [ - 'template0', - 'template1', - 'rdsadmin', - 'azure_maintenance', - 'cloudsqladmin', - 'alloydbadmin', - 'alloydbmetadata', - 'postgres', -] - -DEFAULT_IGNORED_SCHEMAS_OWNED_BY = ['rdsadmin', 'rds_superuser'] - - -class PostgresConfig: - RATE = AgentCheck.rate - GAUGE = AgentCheck.gauge - MONOTONIC = AgentCheck.monotonic_count - - def __init__(self, instance, init_config, check): - self.exclude_hostname = instance.get("exclude_hostname", False) - self.database_identifier = instance.get('database_identifier', {}) - self.init_config = init_config - self.host = instance.get('host', '') - if not self.host: - raise ConfigurationError('Specify a Postgres host to connect to.') - self.port = instance.get('port', '5432') - if self.port != '': - self.port = int(self.port) - self.user = instance.get('username', '') - if not self.user: - raise ConfigurationError('Please specify a user to connect to Postgres.') - self.password = instance.get('password', '') - self.dbname = instance.get('dbname', 'postgres') - self.reported_hostname = instance.get('reported_hostname', '') - self.dbstrict = is_affirmative(instance.get('dbstrict', False)) - self.disable_generic_tags = is_affirmative(instance.get('disable_generic_tags', False)) if instance else False - - self.discovery_config = instance.get('database_autodiscovery', {"enabled": False}) - if self.discovery_config['enabled'] and self.dbname != 'postgres': - raise ConfigurationError( - "'dbname' parameter should not be set when `database_autodiscovery` is enabled." - "To monitor more databases, add them to the `database_autodiscovery` includelist." - ) - self.application_name = instance.get('application_name', 'datadog-agent') - if not self.application_name.isascii(): - raise ConfigurationError("Application name can include only ASCII characters: %s", self.application_name) +class ValidationResult: + """ + A simple class to represent the result of a validation. + It can be extended in the future to include more details about the validation. + """ - self.query_timeout = int(instance.get('query_timeout', 5000)) - self.idle_connection_timeout = instance.get('idle_connection_timeout', 60000) - self.relations = instance.get('relations', []) - if self.relations and not (self.dbname or self.discovery_config['enabled']): - raise ConfigurationError( - '"dbname" parameter must be set OR autodiscovery must be enabled when using the "relations" parameter.' - ) - self.max_connections = instance.get('max_connections', 30) + def __init__(self, valid=True): + """ + :param valid: Whether the validation passed. + """ + self.valid = valid + self.features: list[Feature] = [] + self.errors: list[ConfigurationError] = [] + self.warnings: list[str] = [] - ssl = instance.get('ssl', "allow") - if ssl in SSL_MODES: - self.ssl_mode = ssl - else: - check.warning(f"Invalid ssl option '{ssl}', should be one of {SSL_MODES}. Defaulting to 'allow'.") - self.ssl_mode = "allow" - - self.ssl_cert = instance.get('ssl_cert', None) - self.ssl_root_cert = instance.get('ssl_root_cert', None) - self.ssl_key = instance.get('ssl_key', None) - self.ssl_password = instance.get('ssl_password', None) - self.table_count_limit = instance.get('table_count_limit', TABLE_COUNT_LIMIT) - self.collect_buffercache_metrics = is_affirmative(instance.get('collect_buffercache_metrics', False)) - self.collect_function_metrics = is_affirmative(instance.get('collect_function_metrics', False)) - # Default value for `count_metrics` is True for backward compatibility - self.collect_count_metrics = is_affirmative(instance.get('collect_count_metrics', True)) - self.collect_activity_metrics = is_affirmative(instance.get('collect_activity_metrics', False)) - self.collect_checksum_metrics = is_affirmative(instance.get('collect_checksum_metrics', False)) - self.activity_metrics_excluded_aggregations = instance.get('activity_metrics_excluded_aggregations', []) - self.collect_database_size_metrics = is_affirmative(instance.get('collect_database_size_metrics', True)) - self.collect_wal_metrics = self._should_collect_wal_metrics(instance.get('collect_wal_metrics')) - self.collect_bloat_metrics = is_affirmative(instance.get('collect_bloat_metrics', False)) - # Locks idle in transaction metrics config - locks_idle_cfg = instance.get('locks_idle_in_transaction', {}) or {} - self.locks_idle_in_transaction = { - 'enabled': is_affirmative(locks_idle_cfg.get('enabled', True)), - 'collection_interval': int(locks_idle_cfg.get('collection_interval', 300)), - 'max_rows': int(locks_idle_cfg.get('max_rows', 100)), + def add_feature(self, feature: FeatureKey, enabled=True, description: Optional[str] = None): + """ + Add a feature to the validation result. + :param feature: The feature to add. + :param enabled: Whether the feature is enabled. + """ + self.features.append( + {"key": feature, "name": FeatureNames[feature], "enabled": enabled, "description": description} + ) + + def add_error(self, error: str | ConfigurationError): + """ + Add an error to the validation result. + :param error: The error message to add. + """ + self.errors.append(ConfigurationError(error) if isinstance(error, str) else error) + self.valid = False + + def add_warning(self, warning: str): + """ + Add a warning to the validation result. + :param warning: The warning message to add. + """ + self.warnings.append(warning) + + +def build_config(check: PostgreSql) -> Tuple[InstanceConfig, ValidationResult]: + """ + Build the Postgres configuration. + :param check: The check instance. + :return: InstanceConfig, ValidationResult + The instance configuration object and validation result. + """ + + # The `instance` is the user provided configuration for this particular Postgres instance + instance = check.instance + # The `init_config` is the user provided configuration for the check that applies to all instances + init_config = check.init_config + + args = {} + + # Automatically set values that support defaults or that have simple values in the instance + instance_config_fields = set(InstanceConfig.__annotations__.keys()) + + for f in instance_config_fields: + try: + args[f] = getattr(defaults, f"instance_{f}")() + except AttributeError: + args[f] = None + if f in instance: + args[f] = instance[f] + + # Set values for args that have deprecated fallbacks, are not supported by the spec model + # or have other complexities + # If you change a literal value here, make sure to update spec.yaml + args.update( + { + # Database configuration + "dbm": instance.get( + 'dbm', instance.get('deep_database_monitoring', defaults.instance_dbm()) + ), # Deprecated, use `dbm` instead + "custom_metrics": map_custom_metrics( + instance.get('custom_metrics', []) + ), # Deprecated, use `custom_queries` instead + "custom_queries": instance.get('custom_queries', []), + "database_identifier": { + **dict_defaults.instance_database_identifier().model_dump(), + **(instance.get('database_identifier', {})), + }, + "database_autodiscovery": { + **dict_defaults.instance_database_autodiscovery().model_dump(), + **(instance.get('database_autodiscovery', {})), + }, + "query_metrics": { + **dict_defaults.instance_query_metrics().model_dump(), + **{ + "batch_max_content_size": init_config.get('metrics', {}).get('batch_max_content_size', 20_000_000), + }, + **(instance.get('query_metrics', {})), + }, + "query_samples": { + **dict_defaults.instance_query_samples().model_dump(), + **(instance.get('statement_samples', {})), # Deprecated, use `query_samples` instead + **(instance.get('query_samples', {})), + }, + "query_activity": { + **dict_defaults.instance_query_activity().model_dump(), + **(instance.get('query_activity', {})), + }, + # Metadata collection + "collect_settings": { + **dict_defaults.instance_collect_settings().model_dump(), + **(instance.get('collect_settings') or {}), + }, + "collect_schemas": { + **dict_defaults.instance_collect_schemas().model_dump(), + **(instance.get('collect_schemas', {})), + }, + # Cloud + "aws": { + **Aws(managed_authentication=ManagedAuthentication()).model_dump(), + **(instance.get('aws', {})), + }, + "gcp": { + **Gcp().model_dump(), + **(instance.get('gcp', {})), + }, + "azure": { + **Azure(managed_authentication=ManagedAuthentication1()).model_dump(), + **(instance.get('azure', {})), + }, + # Obfuscation and query logging + "obfuscator_options": { + **dict_defaults.instance_obfuscator_options().model_dump(), + **(instance.get('obfuscator_options', {})), + }, + "collect_raw_query_statement": { + **dict_defaults.instance_collect_raw_query_statement().model_dump(), + **(instance.get('collect_raw_query_statement', {})), + }, + "locks_idle_in_transaction": { + **dict_defaults.instance_locks_idle_in_transaction().model_dump(), + **(instance.get('locks_idle_in_transaction', {})), + }, + "propagate_agent_tags": should_propagate_agent_tags(instance=instance, init_config=init_config), + "service": instance.get('service', init_config.get('service', None)), + # Metric filtering by pattern is implemented downstream, theoretically + "metric_patterns": instance.get('metric_patterns', None), } - self.data_directory = instance.get('data_directory', None) - self.ignore_databases = instance.get('ignore_databases', DEFAULT_IGNORE_DATABASES) - if is_affirmative(instance.get('collect_default_database', True)): - self.ignore_databases = [d for d in self.ignore_databases if d != 'postgres'] - self.ignore_schemas_owned_by = instance.get('ignore_schemas_owned_by', DEFAULT_IGNORED_SCHEMAS_OWNED_BY) - self.tag_replication_role = is_affirmative(instance.get('tag_replication_role', True)) - self.custom_metrics = self._get_custom_metrics(instance.get('custom_metrics', [])) - self.max_relations = int(instance.get('max_relations', 300)) - self.min_collection_interval = instance.get('min_collection_interval', 15) - # database monitoring adds additional telemetry for query metrics & samples - self.dbm_enabled = is_affirmative(instance.get('dbm', instance.get('deep_database_monitoring', False))) - self.full_statement_text_cache_max_size = instance.get('full_statement_text_cache_max_size', 10000) - self.full_statement_text_samples_per_hour_per_query = instance.get( - 'full_statement_text_samples_per_hour_per_query', 1 + ) + + validation_result = ValidationResult() + + # Generate and validate tags + tags, tag_errors = build_tags(instance=instance, init_config=init_config, config=args) + args['tags'] = tags + for error in tag_errors: + # If there are errors in the tags, we add them to the validation result + # but we don't raise an exception here, as we want to validate the rest of the configuration + validation_result.add_error(error) + + # Apply various validations and fallbacks + apply_validated_defaults(args, instance, validation_result) + apply_deprecation_warnings(instance, validation_result) + + # Check user provided value because the default configuration would trigger this warning + if instance.get('collect_default_database', False) and 'postgres' in instance.get('ignore_databases', []): + validation_result.add_warning( + 'The `postgres` database cannot be ignored when `collect_default_database` is enabled.' ) - # Support a custom view when datadog user has insufficient privilege to see queries - self.pg_stat_statements_view = instance.get('pg_stat_statements_view', 'pg_stat_statements') - # statement samples & execution plans - self.pg_stat_activity_view = instance.get('pg_stat_activity_view', 'pg_stat_activity') - self.statement_samples_config = instance.get('query_samples', instance.get('statement_samples', {})) or {} - self.settings_metadata_config = instance.get('collect_settings', {}) or {} - self.schemas_metadata_config = instance.get('collect_schemas', {"enabled": False}) - self.resources_metadata_config = instance.get('collect_resources', {}) or {} - self.statement_activity_config = instance.get('query_activity', {}) or {} - self.statement_metrics_config = instance.get('query_metrics', {}) or {} - self.query_encodings = instance.get('query_encodings') - self.managed_identity = instance.get('managed_identity', {}) - self.cloud_metadata = {} - aws = instance.get('aws', {}) - gcp = instance.get('gcp', {}) - azure = instance.get('azure', {}) - # Remap fully_qualified_domain_name to name - azure = {k if k != 'fully_qualified_domain_name' else 'name': v for k, v in azure.items()} - if aws: - aws['managed_authentication'] = self._aws_managed_authentication(aws, self.password) - self.cloud_metadata.update({'aws': aws}) - if gcp: - self.cloud_metadata.update({'gcp': gcp}) - if azure: - azure['managed_authentication'] = self._azure_managed_authentication(azure, self.managed_identity) - self.cloud_metadata.update({'azure': azure}) - obfuscator_options_config = instance.get('obfuscator_options', {}) or {} - self.obfuscator_options = { - # Valid values for this can be found at - # https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#connection-level-attributes - 'dbms': 'postgresql', - 'replace_digits': is_affirmative( - obfuscator_options_config.get( - 'replace_digits', obfuscator_options_config.get('quantize_sql_tables', False) + + # Validate that the keys of args match the fields of InstanceConfig + args_keys = set(args.keys()) + missing_fields = instance_config_fields - args_keys + extra_fields = args_keys - instance_config_fields + if missing_fields or extra_fields: + # This should get caught at test time and never execute at runtime + raise ConfigurationError( + f"build_config: args keys do not match InstanceConfig fields. " + f"Missing: {missing_fields}, Extra: {extra_fields}" + ) + + # The current InstanceConfig cannot be instantiated directly and integrations team is reluctant to fix it + # in case existing integrations use the faulty behavior. + # Instead we copy the behavior of the base check and instantiate this way + config = InstanceConfig.model_validate(args, context={"configured_fields": instance_config_fields}) + + validate_config(config, instance, validation_result) + + try: + RelationsManager.validate_relations_config(list(config.relations)) + except ConfigurationError as e: + validation_result.add_error(e) + + apply_features(config, validation_result) + + return config, validation_result + + +def build_tags(instance: dict, init_config: dict, config: dict) -> Tuple[list[str], list[ConfigurationError]]: + tags = list(set(instance.get('tags', []))) + + # preset tags to host + if not instance.get('disable_generic_tags', defaults.instance_disable_generic_tags()): + tags.append('server:{}'.format(config.get('host'))) + if config.get('port'): + tags.append('port:{}'.format(config.get('port'))) + else: + tags.append('port:socket') + + if instance.get('service'): + tags.append('service:{}'.format(instance.get('service'))) + elif init_config.get('service'): + tags.append('service:{}'.format(init_config.get('service'))) + + # preset tags to the database name + tags.extend(["db:%s" % config.get('dbname')]) + + rds_tags = rds_parse_tags_from_endpoint(config.get('host')) + if rds_tags: + tags.extend(rds_tags) + + errors = [] + if config.get('propagate_agent_tags'): + try: + agent_tags = get_agent_host_tags() + tags.extend(agent_tags) + except Exception as e: + errors.append( + ConfigurationError( + 'propagate_agent_tags enabled but there was an error fetching agent tags {}'.format(e) ) - ), - 'dollar_quoted_func': is_affirmative(obfuscator_options_config.get('keep_dollar_quoted_func', True)), - 'keep_sql_alias': is_affirmative(obfuscator_options_config.get('keep_sql_alias', True)), - 'return_json_metadata': is_affirmative(obfuscator_options_config.get('collect_metadata', True)), - 'table_names': is_affirmative(obfuscator_options_config.get('collect_tables', True)), - 'collect_commands': is_affirmative(obfuscator_options_config.get('collect_commands', True)), - 'collect_comments': is_affirmative(obfuscator_options_config.get('collect_comments', True)), - # Config to enable/disable obfuscation of sql statements with go-sqllexer pkg - # Valid values for this can be found at https://github.com/DataDog/datadog-agent/blob/main/pkg/obfuscate/obfuscate.go#L108 - 'obfuscation_mode': obfuscator_options_config.get('obfuscation_mode', 'obfuscate_and_normalize'), - 'remove_space_between_parentheses': is_affirmative( - obfuscator_options_config.get('remove_space_between_parentheses', False) - ), - 'keep_null': is_affirmative(obfuscator_options_config.get('keep_null', False)), - 'keep_boolean': is_affirmative(obfuscator_options_config.get('keep_boolean', False)), - 'keep_positional_parameter': is_affirmative( - obfuscator_options_config.get('keep_positional_parameter', False) - ), - 'keep_trailing_semicolon': is_affirmative(obfuscator_options_config.get('keep_trailing_semicolon', False)), - 'keep_identifier_quotation': is_affirmative( - obfuscator_options_config.get('keep_identifier_quotation', False) - ), - 'keep_json_path': is_affirmative(obfuscator_options_config.get('keep_json_path', False)), + ) + + tags.extend(["raw_query_statement:enabled"] if config.get('collect_raw_query_statement', {}).get("enabled") else []) + + return tags, errors + + +def apply_validated_defaults(args: dict, instance: dict, validation_result: ValidationResult): + # Check provided values and revert to defaults if they are invalid + + # Validate config arguments for invalid or deprecated options + if args['ssl'] not in SSL_MODES: + warning = f"Invalid ssl option '{args['ssl']}', should be one of {SSL_MODES}. Defaulting to 'allow'." + validation_result.add_warning(warning) + args['ssl'] = "allow" + + if safefloat(args['query_metrics']['collection_interval']) <= 0: + default_value = dict_defaults.instance_query_metrics().collection_interval + args['query_metrics']['collection_interval'] = default_value + validation_result.add_warning( + f"query_metrics.collection_interval must be greater than 0, defaulting to {default_value} seconds." + ) + + if safefloat(args['query_samples']['collection_interval']) <= 0: + default_value = dict_defaults.instance_query_samples().collection_interval + args['query_samples']['collection_interval'] = default_value + validation_result.add_warning( + f"query_samples.collection_interval must be greater than 0, defaulting to {default_value} seconds." + ) + + if safefloat(args['query_activity']['collection_interval']) <= 0: + default_value = dict_defaults.instance_query_activity().collection_interval + args['query_activity']['collection_interval'] = default_value + validation_result.add_warning( + f"query_activity.collection_interval must be greater than 0, defaulting to {default_value} seconds." + ) + + if args.get('collect_default_database'): + args['ignore_databases'] = [d for d in args['ignore_databases'] if d != 'postgres'] + + apply_cloud_defaults(args, instance, validation_result) + + +def apply_cloud_defaults(args: dict, instance: dict, validation_result: ValidationResult): + # AWS backfill and validation + if ( + not instance.get("aws", {}).get("managed_authentication", None) + and args.get('aws', {}).get('region') + and not args.get('password') + ): + # if managed_authentication is not set, we assume it is enabled if region is set and password is not set + args['aws'] = { + **args['aws'], + 'managed_authentication': {**args['aws'].get('managed_authentication', {}), 'enabled': True}, } - collect_raw_query_statement_config: dict = instance.get('collect_raw_query_statement', {}) or {} - self.collect_raw_query_statement = { - "enabled": is_affirmative(collect_raw_query_statement_config.get('enabled', False)), - "cache_max_size": int(collect_raw_query_statement_config.get('cache_max_size', 10000)), - "samples_per_hour_per_query": int(collect_raw_query_statement_config.get('samples_per_hour_per_query', 1)), + + if args.get('aws', {}).get('managed_authentication', {}).get('enabled') and not args.get('aws', {}).get('region'): + validation_result.add_error('AWS region must be set when using AWS managed authentication') + + # Azure backfill and validation + if instance.get("managed_identity"): + args['azure'] = { + **args.get('azure', {}), + 'managed_authentication': { + **args.get('azure', {}).get('managed_authentication', {}), + **instance.get('managed_identity', {}), + }, + } + + if not instance.get("azure", {}).get("managed_authentication", None) and ( + args.get('azure', {}).get('managed_authentication', {}).get('client_id') + or instance.get('managed_identity', {}).get('client_id') + ): + # if managed_authentication is not set, we assume it is enabled if client_id is set + args['azure'] = { + **args.get('azure', {}), + 'managed_authentication': {**args.get('azure', {}).get('managed_authentication', {}), 'enabled': True}, } - self.log_unobfuscated_queries = is_affirmative(instance.get('log_unobfuscated_queries', False)) - self.log_unobfuscated_plans = is_affirmative(instance.get('log_unobfuscated_plans', False)) - self.database_instance_collection_interval = instance.get('database_instance_collection_interval', 300) - self.incremental_query_metrics = is_affirmative( - self.statement_metrics_config.get('incremental_query_metrics', False) + + if args.get('azure', {}).get('managed_authentication', {}).get('enabled') and not args.get('azure', {}).get( + 'managed_authentication', {} + ).get('client_id'): + validation_result.add_error('Azure client_id must be set when using Azure managed authentication') + + +def deprecation_warning(option: str, replacement: str): + return f'The `{option}` option is deprecated. Use `{replacement}` instead.' + + +def apply_deprecation_warnings(instance: dict, validation_result: ValidationResult): + # Simple deprecated options + deprecations = [ + ['custom_metrics', 'custom_queries'], + ['deep_database_monitoring', 'dbm'], + ['managed_identity', 'azure.managed_authentication'], + ['statement_samples', 'query_samples'], + ['collect_default_database', 'postgres'], + ] + + for deprecation in deprecations: + if deprecation[0] in instance: + validation_result.add_warning(deprecation_warning(deprecation[0], deprecation[1])) + + +def validate_config(config: InstanceConfig, instance: dict, validation_result: ValidationResult): + # Validate config after defaults and other validations have been applied + if not config.application_name.isascii(): + validation_result.add_error(f"Application name can include only ASCII characters: {config.application_name}") + + if config.relations and not (config.dbname or config.database_autodiscovery.enabled): + validation_result.add_error( + '"dbname" parameter must be set OR autodiscovery must be enabled when using the "relations" parameter.' ) - self.baseline_metrics_expiry = self.statement_metrics_config.get('baseline_metrics_expiry', 300) - self.service = instance.get('service') or init_config.get('service') or '' - self.tags = self._build_tags( - custom_tags=instance.get('tags', []), - propagate_agent_tags=self._should_propagate_agent_tags(instance, init_config), - additional_tags=["raw_query_statement:enabled"] if self.collect_raw_query_statement["enabled"] else [], + if config.empty_default_hostname: + validation_result.add_warning( + 'The `empty_default_hostname` option has no effect in the Postgres check. ' + 'Use the `exclude_hostname` option instead.' ) - def _build_tags(self, custom_tags, propagate_agent_tags, additional_tags): - # Clean up tags in case there was a None entry in the instance - # e.g. if the yaml contains tags: but no actual tags - if custom_tags is None: - tags = [] - else: - tags = list(set(custom_tags)) + # If the user provided config explicitly enables these features, we add a warning if dbm is not enabled + dbm_required = ['query_activity', 'query_samples', 'query_metrics', 'collect_settings', 'collect_schemas'] + for feature in dbm_required: + if instance.get(feature, {}).get('enabled') and not config.dbm: + validation_result.add_warning(f'The `{feature}` feature requires the `dbm` option to be enabled.') - # preset tags to host - if not self.disable_generic_tags: - tags.append('server:{}'.format(self.host)) - if self.port: - tags.append('port:{}'.format(self.port)) - else: - tags.append('port:socket') - # preset tags to the database name - tags.extend(["db:%s" % self.dbname]) +def apply_features(config: InstanceConfig, validation_result: ValidationResult): + # Features + validation_result.add_feature( + FeatureKey.RELATION_METRICS, + bool(config.relations), + "Relation metrics requires a value for `relations` in the configuration." if not config.relations else None, + ) + validation_result.add_feature(FeatureKey.QUERY_ACTIVITY, config.query_activity.enabled and config.dbm) + validation_result.add_feature(FeatureKey.QUERY_SAMPLES, config.query_samples.enabled and config.dbm) + validation_result.add_feature(FeatureKey.QUERY_METRICS, config.query_metrics.enabled and config.dbm) + validation_result.add_feature(FeatureKey.COLLECT_SETTINGS, config.collect_settings.enabled and config.dbm) + validation_result.add_feature(FeatureKey.COLLECT_SCHEMAS, config.collect_schemas.enabled and config.dbm) - rds_tags = rds_parse_tags_from_endpoint(self.host) - if rds_tags: - tags.extend(rds_tags) - if propagate_agent_tags: - try: - agent_tags = get_agent_host_tags() - tags.extend(agent_tags) - except Exception as e: - raise ConfigurationError( - 'propagate_agent_tags enabled but there was an error fetching agent tags {}'.format(e) - ) +METRIC_TYPES = { + 'RATE': AgentCheck.rate, + 'GAUGE': AgentCheck.gauge, + 'MONOTONIC': AgentCheck.monotonic_count, +} - if additional_tags: - tags.extend(additional_tags) - return tags - - @staticmethod - def _get_custom_metrics(custom_metrics): - # Otherwise pre-process custom metrics and verify definition - required_parameters = ("descriptors", "metrics", "query", "relation") - - for m in custom_metrics: - for param in required_parameters: - if param not in m: - raise ConfigurationError('Missing {} parameter in custom metric'.format(param)) - - # Old formatting to new formatting. The first params is always the columns names from which to - # read metrics. The `relation` param instructs the check to replace the next '%s' with the list of - # relations names. - if m['relation']: - m['query'] = m['query'] % ('{metrics_columns}', '{relations_names}') - else: - m['query'] = m['query'] % '{metrics_columns}' - - try: - for ref, (_, mtype) in m['metrics'].items(): - cap_mtype = mtype.upper() - if cap_mtype not in ('RATE', 'GAUGE', 'MONOTONIC'): - raise ConfigurationError( - 'Collector method {} is not known. Known methods are RATE, GAUGE, MONOTONIC'.format( - cap_mtype - ) - ) - - m['metrics'][ref][1] = getattr(PostgresConfig, cap_mtype) - except Exception as e: - raise Exception('Error processing custom metric `{}`: {}'.format(m, e)) - return custom_metrics - - @staticmethod - def _aws_managed_authentication(aws, password): - if 'managed_authentication' not in aws: - # for backward compatibility - # if managed_authentication is not set, we assume it is enabled if region is set and password is not set - managed_authentication = {} - managed_authentication['enabled'] = 'region' in aws and not password - else: - managed_authentication = aws['managed_authentication'] - enabled = is_affirmative(managed_authentication.get('enabled', False)) - if enabled and 'region' not in aws: - raise ConfigurationError('AWS region must be set when using AWS managed authentication') - managed_authentication['enabled'] = enabled - return managed_authentication - - @staticmethod - def _azure_managed_authentication(azure, managed_identity): - if 'managed_authentication' not in azure: - # for backward compatibility - # if managed_authentication is not set, we assume it is enabled if client_id is set in managed_identity - managed_authentication = {} - if managed_identity: - managed_authentication['enabled'] = 'client_id' in managed_identity - managed_authentication.update(managed_identity) - else: - managed_authentication['enabled'] = False + +def map_custom_metrics(custom_metrics): + # Pre-process custom metrics and verify definition + required_parameters = ("descriptors", "metrics", "query", "relation") + + for m in custom_metrics: + for param in required_parameters: + if param not in m: + raise ConfigurationError(f'Missing {param} parameter in custom metric {m}') + + # Old formatting to new formatting. The first params is always the columns names from which to + # read metrics. The `relation` param instructs the check to replace the next '%s' with the list of + # relations names. + if m['relation']: + m['query'] = m['query'] % ('{metrics_columns}', '{relations_names}') else: - # if managed_authentication is set, we ignore the legacy managed_identity config - managed_authentication = azure['managed_authentication'] - enabled = is_affirmative(managed_authentication.get('enabled', False)) - if enabled and 'client_id' not in managed_authentication: - raise ConfigurationError('Azure client_id must be set when using Azure managed authentication') - managed_authentication['enabled'] = enabled - return managed_authentication - - @staticmethod - def _should_collect_wal_metrics(collect_wal_metrics) -> Optional[bool]: - if collect_wal_metrics is not None: - # if the user has explicitly set the value, return the boolean - return is_affirmative(collect_wal_metrics) - - return None - - @staticmethod - def _should_propagate_agent_tags(instance, init_config) -> bool: - ''' - return True if the agent tags should be propagated to the check - ''' - instance_propagate_agent_tags = instance.get('propagate_agent_tags') - init_config_propagate_agent_tags = init_config.get('propagate_agent_tags') - - if instance_propagate_agent_tags is not None: - # if the instance has explicitly set the value, return the boolean - return instance_propagate_agent_tags - if init_config_propagate_agent_tags is not None: - # if the init_config has explicitly set the value, return the boolean - return init_config_propagate_agent_tags - # if neither the instance nor the init_config has set the value, return False - return False + m['query'] = m['query'] % '{metrics_columns}' + + try: + for ref, (_, mtype) in m['metrics'].items(): + cap_mtype = mtype.upper() + if cap_mtype not in ('RATE', 'GAUGE', 'MONOTONIC'): + raise ConfigurationError( + f"Collector method {cap_mtype} for custom metric {m} is not known. " + "Known methods are RATE, GAUGE, MONOTONIC" + ) + + m['metrics'][ref][1] = METRIC_TYPES[cap_mtype] + except Exception as e: + raise Exception('Error processing custom metric `{}`: {}'.format(m, e)) + return custom_metrics + + +def should_propagate_agent_tags(instance, init_config) -> bool: + ''' + return True if the agent tags should be propagated to the check + ''' + instance_propagate = instance.get('propagate_agent_tags') + init_config_propagate = init_config.get('propagate_agent_tags') + + if instance_propagate is not None: + # if the instance has explicitly set the value, return the boolean + return instance_propagate + if init_config_propagate is not None: + # if the init_config has explicitly set the value, return the boolean + return init_config_propagate + # if neither the instance nor the init_config has set the value, return default for instance + return defaults.instance_propagate_agent_tags() + + +def sanitize(config: Union[InstanceConfig, dict]) -> dict: + if isinstance(config, InstanceConfig): + # If config is an InstanceConfig object, convert it to a dict + config = config.model_dump(exclude={'custom_metrics', 'custom_queries'}) + sanitized = copy.deepcopy(config) + sanitized['password'] = '***' if sanitized.get('password') else None + sanitized['ssl_password'] = '***' if sanitized.get('ssl_password') else None + # For the deprecated custom_metrics we inject a function into the instance + # The function isn't serializable so we have to strip it + for custom_metric in sanitized.get('custom_metrics', []): + for key in custom_metric.get('metrics', {}): + custom_metric.get('metrics')[key][1] = '' + + return sanitized + + +def safefloat(value: any) -> float: + if value is None: + return 0.0 + try: + f = float(value) + return f + except Exception: + return 0.0 diff --git a/postgres/datadog_checks/postgres/config_models/defaults.py b/postgres/datadog_checks/postgres/config_models/defaults.py index 22e250156d1ea..abcdbeb7e9475 100644 --- a/postgres/datadog_checks/postgres/config_models/defaults.py +++ b/postgres/datadog_checks/postgres/config_models/defaults.py @@ -53,7 +53,7 @@ def instance_collect_function_metrics(): def instance_collect_wal_metrics(): - return False + return True def instance_data_directory(): @@ -61,7 +61,7 @@ def instance_data_directory(): def instance_database_instance_collection_interval(): - return False + return 300 def instance_dbm(): @@ -88,6 +88,10 @@ def instance_exclude_hostname(): return False +def instance_host(): + return 'localhost' + + def instance_idle_connection_timeout(): return 60000 @@ -132,6 +136,10 @@ def instance_only_custom_queries(): return False +def instance_pg_stat_activity_view(): + return 'pg_stat_activity' + + def instance_pg_stat_statements_view(): return 'pg_stat_statements' @@ -144,14 +152,42 @@ def instance_propagate_agent_tags(): return False +def instance_query_encodings(): + return ['utf8'] + + def instance_query_timeout(): return 5000 +def instance_relations(): + return [] + + +def instance_reported_hostname(): + return None + + def instance_ssl(): return 'allow' +def instance_ssl_cert(): + return None + + +def instance_ssl_key(): + return None + + +def instance_ssl_password(): + return None + + +def instance_ssl_root_cert(): + return None + + def instance_table_count_limit(): return 200 @@ -162,3 +198,7 @@ def instance_tag_replication_role(): def instance_use_global_custom_queries(): return 'true' + + +def instance_username(): + return 'datadog' diff --git a/postgres/datadog_checks/postgres/config_models/dict_defaults.py b/postgres/datadog_checks/postgres/config_models/dict_defaults.py new file mode 100644 index 0000000000000..0a44908748bad --- /dev/null +++ b/postgres/datadog_checks/postgres/config_models/dict_defaults.py @@ -0,0 +1,120 @@ +# (C) Datadog, Inc. 2025-present +# All rights reserved +# Licensed under a 3-clause BSD style license (see LICENSE) + +# The spec.yaml file does not currently support dictionary defaults, so we use this file to define them manually +# If you change a literal value here, make sure to update spec.yaml to match + +from . import instance + + +def instance_database_identifier(): + return instance.DatabaseIdentifier( + template="$resolved_hostname", + ) + + +def instance_database_autodiscovery(): + return instance.DatabaseAutodiscovery( + enabled=False, + global_view_db="postgres", + max_databases=100, + include=[".*"], + exclude=["cloudsqladmin"], + refresh=600, + ) + + +def instance_query_metrics(): + return instance.QueryMetrics( + enabled=True, + collection_interval=10, + pg_stat_statements_max_warning_threshold=10000, + incremental_query_metrics=False, + baseline_metrics_expiry=300, + full_statement_text_cache_max_size=10000, + full_statement_text_samples_per_hour_per_query=10000, + run_sync=False, + ) + + +def instance_query_samples(): + return instance.QuerySamples( + enabled=True, + collection_interval=1, + explain_function="datadog.explain_statement", + explained_queries_per_hour_per_query=60, + samples_per_hour_per_query=15, + explained_queries_cache_maxsize=5000, + seen_samples_cache_maxsize=10000, + explain_parameterized_queries=True, + explain_errors_cache_maxsize=5000, + explain_errors_cache_ttl=86400, + run_sync=False, + ) + + +def instance_query_activity(): + return instance.QueryActivity( + enabled=True, + collection_interval=10, + payload_row_limit=3500, + ) + + +def instance_collect_settings(): + return instance.CollectSettings( + enabled=True, + collection_interval=600, + ignored_settings_patterns=["plpgsql%"], + run_sync=False, + ) + + +def instance_collect_schemas(): + return instance.CollectSchemas( + enabled=False, + max_tables=300, + max_columns=50, + collection_interval=600, + include_databases=[], + exclude_databases=[], + include_schemas=[], + exclude_schemas=[], + include_tables=[], + exclude_tables=[], + ) + + +def instance_obfuscator_options(): + return instance.ObfuscatorOptions( + obfuscation_mode="obfuscate_and_normalize", + replace_digits=False, + collect_metadata=True, + collect_tables=True, + collect_commands=True, + collect_comments=True, + keep_sql_alias=True, + keep_dollar_quoted_func=True, + remove_space_between_parentheses=False, + keep_null=False, + keep_boolean=False, + keep_positional_parameter=False, + keep_trailing_semicolon=False, + keep_identifier_quotation=False, + keep_json_path=False, + ) + + +def instance_collect_raw_query_statement(): + return instance.CollectRawQueryStatement( + enabled=False, + ) + + +def instance_locks_idle_in_transaction(): + return instance.LocksIdleInTransaction( + enabled=True, + collection_interval=300, + max_rows=100, + ) diff --git a/postgres/datadog_checks/postgres/config_models/instance.py b/postgres/datadog_checks/postgres/config_models/instance.py index e1485fe30eb0a..52a11028ad3b9 100644 --- a/postgres/datadog_checks/postgres/config_models/instance.py +++ b/postgres/datadog_checks/postgres/config_models/instance.py @@ -92,6 +92,7 @@ class CollectSettings(BaseModel): collection_interval: Optional[float] = None enabled: Optional[bool] = None ignored_settings_patterns: Optional[tuple[str, ...]] = None + run_sync: Optional[bool] = None class CustomQuery(BaseModel): @@ -146,15 +147,6 @@ class LocksIdleInTransaction(BaseModel): max_rows: Optional[int] = None -class ManagedIdentity(BaseModel): - model_config = ConfigDict( - arbitrary_types_allowed=True, - frozen=True, - ) - client_id: Optional[str] = None - identity_scope: Optional[str] = None - - class MetricPatterns(BaseModel): model_config = ConfigDict( arbitrary_types_allowed=True, @@ -202,10 +194,14 @@ class QueryMetrics(BaseModel): frozen=True, ) baseline_metrics_expiry: Optional[float] = None + batch_max_content_size: Optional[int] = None collection_interval: Optional[float] = None enabled: Optional[bool] = None + full_statement_text_cache_max_size: Optional[float] = None + full_statement_text_samples_per_hour_per_query: Optional[float] = None incremental_query_metrics: Optional[bool] = None pg_stat_statements_max_warning_threshold: Optional[float] = None + run_sync: Optional[bool] = None class QuerySamples(BaseModel): @@ -215,10 +211,13 @@ class QuerySamples(BaseModel): ) collection_interval: Optional[float] = None enabled: Optional[bool] = None + explain_errors_cache_maxsize: Optional[int] = None + explain_errors_cache_ttl: Optional[int] = None explain_function: Optional[str] = None explain_parameterized_queries: Optional[bool] = None explained_queries_cache_maxsize: Optional[int] = None explained_queries_per_hour_per_query: Optional[int] = None + run_sync: Optional[bool] = None samples_per_hour_per_query: Optional[int] = None seen_samples_cache_maxsize: Optional[int] = None @@ -257,6 +256,7 @@ class InstanceConfig(BaseModel): collect_schemas: Optional[CollectSchemas] = None collect_settings: Optional[CollectSettings] = None collect_wal_metrics: Optional[bool] = None + custom_metrics: Optional[tuple[MappingProxyType[str, Any], ...]] = None custom_queries: Optional[tuple[CustomQuery, ...]] = None data_directory: Optional[str] = None database_autodiscovery: Optional[DatabaseAutodiscovery] = None @@ -269,14 +269,13 @@ class InstanceConfig(BaseModel): empty_default_hostname: Optional[bool] = None exclude_hostname: Optional[bool] = None gcp: Optional[Gcp] = None - host: str + host: Optional[str] = None idle_connection_timeout: Optional[int] = None ignore_databases: Optional[tuple[str, ...]] = None ignore_schemas_owned_by: Optional[tuple[str, ...]] = None locks_idle_in_transaction: Optional[LocksIdleInTransaction] = None log_unobfuscated_plans: Optional[bool] = None log_unobfuscated_queries: Optional[bool] = None - managed_identity: Optional[ManagedIdentity] = None max_connections: Optional[int] = None max_relations: Optional[int] = None metric_patterns: Optional[MetricPatterns] = None @@ -284,6 +283,7 @@ class InstanceConfig(BaseModel): obfuscator_options: Optional[ObfuscatorOptions] = None only_custom_queries: Optional[bool] = None password: Optional[str] = None + pg_stat_activity_view: Optional[str] = None pg_stat_statements_view: Optional[str] = None port: Optional[int] = None propagate_agent_tags: Optional[bool] = None @@ -304,7 +304,7 @@ class InstanceConfig(BaseModel): tag_replication_role: Optional[bool] = None tags: Optional[tuple[str, ...]] = None use_global_custom_queries: Optional[str] = None - username: str + username: Optional[str] = None @model_validator(mode='before') def _initial_validation(cls, values): diff --git a/postgres/datadog_checks/postgres/config_models/validators.py b/postgres/datadog_checks/postgres/config_models/validators.py index 9c01a98bed297..53671327718d4 100644 --- a/postgres/datadog_checks/postgres/config_models/validators.py +++ b/postgres/datadog_checks/postgres/config_models/validators.py @@ -3,9 +3,4 @@ # Licensed under a 3-clause BSD style license (see LICENSE) -def initialize_instance(values, **kwargs): - if values.get('collect_wal_metrics'): - if 'data_directory' not in values: - raise ValueError('Field `data_directory` is required when `collect_wal_metrics` is enabled') - - return values +# Validation is handled in the config.py build_config function. diff --git a/postgres/datadog_checks/postgres/connection_pool.py b/postgres/datadog_checks/postgres/connection_pool.py index c3cac770c65dc..3ed99ff96f51b 100644 --- a/postgres/datadog_checks/postgres/connection_pool.py +++ b/postgres/datadog_checks/postgres/connection_pool.py @@ -21,7 +21,7 @@ class PostgresConnectionArgs: """ application_name: str - user: str + username: str host: Optional[str] = None port: Optional[int] = None password: Optional[str] = None @@ -43,7 +43,7 @@ def as_kwargs(self, dbname: str) -> Dict[str, Union[str, int]]: """ kwargs = { "application_name": self.application_name, - "user": self.user, + "user": self.username, "dbname": dbname, "sslmode": self.ssl_mode, } diff --git a/postgres/datadog_checks/postgres/data/conf.yaml.example b/postgres/datadog_checks/postgres/data/conf.yaml.example index f9e658998419f..2e71a9a73b0c4 100644 --- a/postgres/datadog_checks/postgres/data/conf.yaml.example +++ b/postgres/datadog_checks/postgres/data/conf.yaml.example @@ -31,21 +31,22 @@ init_config: # instances: - ## @param host - string - required + - + ## @param host - string - optional - default: localhost ## The hostname to connect to. To connect to a Unix socket, specify the full path to the socket file, ## e.g. `/var/run/postgresql/.s.PGSQL.5432`. # - - host: localhost + # host: ## @param port - integer - optional - default: 5432 ## The port to use when connecting to PostgreSQL. # - # port: 5432 + # port: - ## @param username - string - required + ## @param username - string - optional - default: datadog ## The Datadog username created to connect to PostgreSQL. # - username: datadog + # username: ## @param password - string - optional ## The password associated with the Datadog user. @@ -111,7 +112,7 @@ instances: ## @param ignore_schemas_owned_by - list of strings - optional ## A list of database users which own schemas to ignore. - ## No metrics or statement samples will be collected for these schemas. + ## No metrics will be collected for these schemas. ## Each value can be a plain string or a Postgres pattern. # # ignore_schemas_owned_by: @@ -226,10 +227,6 @@ instances: # # collect_count_metrics: true - ## Configure collection of idle in transaction lock age metrics - # - # locks_idle_in_transaction: - ## @param collect_checksum_metrics - boolean - optional - default: false ## Collect counts of database failed checksums. Only supported on versions >= 12. # @@ -272,24 +269,24 @@ instances: # collect_bloat_metrics: false - ## @param collect_wal_metrics - boolean - optional - default: false + ## @param collect_wal_metrics - boolean - optional - default: true ## Collect metrics about WAL file age. ## NOTE: ## For Postgres 9.6 and below, you must run the check local to your database if you want to enable this option. ## Starting Postgres 10, WAL file metrics are enabled by default using `pg_ls_waldir` and don't need local access. # - # collect_wal_metrics: false + # collect_wal_metrics: true ## @param data_directory - string - optional - default: /usr/local/pgsql/data ## The data directory of your postgres installation - ## Required when collecting WAL metrics. + ## Required when collecting WAL metrics on Postgres 9.6. # # data_directory: /usr/local/pgsql/data ## @param table_count_limit - integer - optional - default: 200 ## The maximum number of tables to collect metrics from. # - # table_count_limit: 200 + # table_count_limit: ## @param only_custom_queries - boolean - optional - default: false ## Set this parameter to `true` if you want to skip the integration's default metrics collection. @@ -437,7 +434,7 @@ instances: # # pg_stat_statements_view: show_pg_stat_statements() - ## @param query_encodings - list of strings - optional + ## @param query_encodings - list of strings - optional - default: ['utf8'] ## Set this value if your database is encoded in SQL_ASCII and you have clients that use encodings other than UTF-8. ## When attempting to decode stored query text for query metrics, samples and activity, the agent will use these ## values in order and return the first successful decoding. Only supported for Postgres 10 and above. @@ -746,32 +743,6 @@ instances: # # managed_authentication: {} - ## DEPRECATED: Please use `azure.managed_authentication` instead. - ## - ## Configuration section used for Azure AD Authentication. - ## - ## This supports using System or User assigned managed identities. - ## If this section is set, then the `username` and `password` fields will be ignored. - ## - ## For more information on Managed Identities, see the Azure docs - ## https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview - # - # managed_identity: - - ## @param client_id - string - optional - ## Client ID of the Managed Identity. - # - # client_id: - - ## @param identity_scope - string - optional - default: https://ossrdbms-aad.database.windows.net/.default - ## The permission scope from where to access the identity token. This value is optional if using the default - ## identity scope for Azure managed databases. - ## - ## For more information on scopes, see the Azure docs - ## https://learn.microsoft.com/en-us/azure/active-directory/develop/scopes-oidc - # - # identity_scope: https://ossrdbms-aad.database.windows.net/.default - ## Configure how the SQL obfuscator behaves. ## Note: This option only applies when `dbm` is enabled. # diff --git a/postgres/datadog_checks/postgres/discovery.py b/postgres/datadog_checks/postgres/discovery.py index 0d0b4d60ff815..d313090ca628f 100644 --- a/postgres/datadog_checks/postgres/discovery.py +++ b/postgres/datadog_checks/postgres/discovery.py @@ -1,40 +1,43 @@ # (C) Datadog, Inc. 2023-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) +from __future__ import annotations -from typing import Dict, List +from typing import TYPE_CHECKING, List + +from datadog_checks.postgres.config_models.instance import DatabaseAutodiscovery + +if TYPE_CHECKING: + from datadog_checks.postgres import PostgreSql -from datadog_checks.base import AgentCheck from datadog_checks.base.utils.discovery import Discovery from datadog_checks.postgres.util import DatabaseConfigurationError, warning_with_tags AUTODISCOVERY_QUERY: str = """select datname from pg_catalog.pg_database where datistemplate = false;""" DEFAULT_EXCLUDES = ["cloudsqladmin", "rdsadmin", "alloydbadmin", "alloydbmetadata"] -DEFAULT_MAX_DATABASES = 100 -DEFAULT_REFRESH = 600 class PostgresAutodiscovery(Discovery): def __init__( self, - check: AgentCheck, + check: PostgreSql, global_view_db: str, - autodiscovery_config: Dict, + autodiscovery_config: DatabaseAutodiscovery, default_ttl: int, ) -> None: super(PostgresAutodiscovery, self).__init__( self._get_databases, # parent class asks for includelist to be a dictionary - include=dict.fromkeys(autodiscovery_config.get("include", [".*"]), 0), - exclude=autodiscovery_config.get("exclude", DEFAULT_EXCLUDES), - interval=autodiscovery_config.get("refresh", DEFAULT_REFRESH), + include=dict.fromkeys(autodiscovery_config.include, 0), + exclude=autodiscovery_config.exclude, + interval=autodiscovery_config.refresh, ) self._default_ttl = default_ttl self._db = global_view_db self._check = check self._log = self._check.log self.db_pool = self._check.db_pool - self._max_databases = autodiscovery_config.get("max_databases", DEFAULT_MAX_DATABASES) + self._max_databases = autodiscovery_config.max_databases self._cache_filtered = [] def get_items(self) -> List[str]: diff --git a/postgres/datadog_checks/postgres/features.py b/postgres/datadog_checks/postgres/features.py new file mode 100644 index 0000000000000..9605939eebf9a --- /dev/null +++ b/postgres/datadog_checks/postgres/features.py @@ -0,0 +1,40 @@ +# (C) Datadog, Inc. 2025-present +# All rights reserved +# Licensed under a 3-clause BSD style license (see LICENSE) + +from enum import Enum +from typing import TypedDict + + +class FeatureKey(Enum): + """ + Enum representing the keys for features in the Postgres configuration. + """ + + RELATION_METRICS = "relation_metrics" + QUERY_SAMPLES = "query_samples" + COLLECT_SETTINGS = "collect_settings" + COLLECT_SCHEMAS = "collect_schemas" + QUERY_ACTIVITY = "query_activity" + QUERY_METRICS = "query_metrics" + + +FeatureNames = { + FeatureKey.RELATION_METRICS: 'Relation Metrics', + FeatureKey.QUERY_SAMPLES: 'Query Samples', + FeatureKey.COLLECT_SETTINGS: 'Collect Settings', + FeatureKey.COLLECT_SCHEMAS: 'Collect Schemas', + FeatureKey.QUERY_ACTIVITY: 'Query Activity', + FeatureKey.QUERY_METRICS: 'Query Metrics', +} + + +class Feature(TypedDict): + """ + A feature in the Postgres configuration that can be enabled or disabled. + """ + + key: str + name: str + enabled: bool + description: str | None diff --git a/postgres/datadog_checks/postgres/health.py b/postgres/datadog_checks/postgres/health.py index e0988afd6894f..91798bdcf534e 100644 --- a/postgres/datadog_checks/postgres/health.py +++ b/postgres/datadog_checks/postgres/health.py @@ -49,10 +49,10 @@ def submit_health_event( :param kwargs: Additional keyword arguments to include in the event. """ super().submit_health_event( - name, - status, + name=name, + status=status, # If we have an error parsing the config we may not have tags yet - self.check.tags if hasattr(self.check, 'tags') else [], - database_identifier=self.check.database_identifier, + tags=self.check.tags if hasattr(self.check, 'tags') else [], + database_instance=self.check.database_identifier, **kwargs, ) diff --git a/postgres/datadog_checks/postgres/metadata.py b/postgres/datadog_checks/postgres/metadata.py index b18cb3ae38cc5..24463cce23110 100644 --- a/postgres/datadog_checks/postgres/metadata.py +++ b/postgres/datadog_checks/postgres/metadata.py @@ -1,10 +1,12 @@ # (C) Datadog, Inc. 2023-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) +from __future__ import annotations + import json import re import time -from typing import Dict, List, Optional, Tuple, Union # noqa: F401 +from typing import Dict, List, Union import psycopg from psycopg.rows import dict_row @@ -14,21 +16,19 @@ except ImportError: from datadog_checks.base.stubs import datadog_agent -from datadog_checks.base import is_affirmative +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from datadog_checks.postgres import PostgreSql + from datadog_checks.base.utils.db.utils import DBMAsyncJob, default_json_event_encoding from datadog_checks.base.utils.tracking import tracked_method +from datadog_checks.postgres.config_models import InstanceConfig from datadog_checks.postgres.util import get_list_chunks from .util import payload_pg_version from .version_utils import VersionUtils -# default collection intervals in seconds -DEFAULT_EXTENSIONS_COLLECTION_INTERVAL = 600 -DEFAULT_SETTINGS_COLLECTION_INTERVAL = 600 -DEFAULT_SCHEMAS_COLLECTION_INTERVAL = 600 -DEFAULT_RESOURCES_COLLECTION_INTERVAL = 300 -DEFAULT_SETTINGS_IGNORED_PATTERNS = ["plpgsql%"] - # PG_EXTENSION_INFO_QUERY is used to collect extension names and versions from # the pg_extension table. Schema names and roles are retrieved from their re- # spective catalog tables. @@ -224,26 +224,18 @@ class PostgresMetadata(DBMAsyncJob): 2. collection of pg_settings """ - def __init__(self, check, config): - self.pg_settings_ignored_patterns = config.settings_metadata_config.get( - "ignored_settings_patterns", DEFAULT_SETTINGS_IGNORED_PATTERNS - ) - self.pg_extensions_collection_interval = config.settings_metadata_config.get( - "collection_interval", DEFAULT_EXTENSIONS_COLLECTION_INTERVAL - ) - self.pg_settings_collection_interval = config.settings_metadata_config.get( - "collection_interval", DEFAULT_SETTINGS_COLLECTION_INTERVAL - ) - self.schemas_collection_interval = config.schemas_metadata_config.get( - "collection_interval", DEFAULT_SCHEMAS_COLLECTION_INTERVAL - ) - resources_collection_interval = config.resources_metadata_config.get( - "collection_interval", DEFAULT_RESOURCES_COLLECTION_INTERVAL - ) + def __init__(self, check: PostgreSql, config: InstanceConfig): + self.pg_settings_ignored_patterns = list(config.collect_settings.ignored_settings_patterns) + self.pg_settings_collection_interval = config.collect_settings.collection_interval + # Extensions currently doesn't have a separate collection interval option + self.pg_extensions_collection_interval = self.pg_settings_collection_interval + self.schemas_collection_interval = config.collect_schemas.collection_interval + + # We want to be able to iterate this as a dict with string interpolation + self._collect_schemas_config = config.collect_schemas.model_dump() # by default, send resources every 10 minutes self.collection_interval = min( - resources_collection_interval, self.pg_extensions_collection_interval, self.pg_settings_collection_interval, self.schemas_collection_interval, @@ -252,8 +244,8 @@ def __init__(self, check, config): super(PostgresMetadata, self).__init__( check, rate_limit=1 / float(self.collection_interval), - run_sync=is_affirmative(config.settings_metadata_config.get("run_sync", False)), - enabled=is_affirmative(config.resources_metadata_config.get("enabled", True)), + run_sync=config.collect_settings.run_sync, + enabled=config.collect_settings.enabled or config.collect_schemas.enabled, dbms="postgres", min_collection_interval=config.min_collection_interval, expected_db_exceptions=(psycopg.errors.DatabaseError,), @@ -262,9 +254,9 @@ def __init__(self, check, config): self._check = check self._config = config self.db_pool = self._check.db_pool - self._collect_extensions_enabled = is_affirmative(config.settings_metadata_config.get("enabled", True)) - self._collect_pg_settings_enabled = is_affirmative(config.settings_metadata_config.get("enabled", True)) - self._collect_schemas_enabled = is_affirmative(config.schemas_metadata_config.get("enabled", False)) + self._collect_pg_settings_enabled = config.collect_settings.enabled + self._collect_extensions_enabled = self._collect_pg_settings_enabled + self._collect_schemas_enabled = config.collect_schemas.enabled self._is_schemas_collection_in_progress = False self._pg_settings_cached = None self._extensions_cached = None @@ -452,9 +444,10 @@ def _collect_postgres_schemas(self): datadog_agent.emit_agent_telemetry("postgres", "schema_tables_count", total_tables, "gauge") def _should_collect_metadata(self, name, metadata_type): - for re_str in self._config.schemas_metadata_config.get( - "exclude_{metadata_type}s".format(metadata_type=metadata_type), [] - ): + # We get the config as a dict so we can use string interpolation + # to iterate over object types + excludes = self._collect_schemas_config.get("exclude_{metadata_type}s".format(metadata_type=metadata_type), []) + for re_str in excludes: regex = re.compile(re_str) if regex.search(name): self._log.debug( @@ -464,9 +457,7 @@ def _should_collect_metadata(self, name, metadata_type): ) return False - includes = self._config.schemas_metadata_config.get( - "include_{metadata_type}s".format(metadata_type=metadata_type), [] - ) + includes = self._collect_schemas_config.get("include_{metadata_type}s".format(metadata_type=metadata_type), []) if len(includes) == 0: return True for re_str in includes: @@ -569,7 +560,7 @@ def _get_table_info(self, cursor: psycopg.Cursor, dbname, schema_id): rows = cursor.fetchall() table_info = [dict(row) for row in rows] - limit = self._config.schemas_metadata_config.get("max_tables", 300) + limit = self._config.collect_schemas.max_tables if len(table_info) <= limit: return table_info @@ -597,8 +588,8 @@ def _get_table_info(self, cursor: psycopg.Cursor, dbname, schema_id): return self._sort_and_limit_table_info(cursor, dbname, table_info, limit) def _get_tables_filter(self): - includes = self._config.schemas_metadata_config.get("include_tables", []) - excludes = self._config.schemas_metadata_config.get("exclude_tables", []) + includes = self._config.collect_schemas.include_tables + excludes = self._config.collect_schemas.exclude_tables if len(includes) == 0 and len(excludes) == 0: return "" diff --git a/postgres/datadog_checks/postgres/metrics_cache.py b/postgres/datadog_checks/postgres/metrics_cache.py index 2b50e4a604508..2830b66d13970 100644 --- a/postgres/datadog_checks/postgres/metrics_cache.py +++ b/postgres/datadog_checks/postgres/metrics_cache.py @@ -4,6 +4,8 @@ # https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS import logging +from datadog_checks.postgres.config_models import InstanceConfig + from .util import ( ACTIVITY_DD_METRICS, ACTIVITY_METRICS_8_3, @@ -36,7 +38,7 @@ class PostgresMetricsCache: """Maintains a cache of metrics to collect""" - def __init__(self, config): + def __init__(self, config: InstanceConfig): self.config = config self.instance_metrics = None self.bgw_metrics = None @@ -74,7 +76,7 @@ def get_instance_metrics(self, version): if metrics is None: # if DBM enabled, do not collect postgresql.connections metric in the main check c_metrics = COMMON_METRICS - if not self.config.dbm_enabled: + if not self.config.dbm: c_metrics = dict(c_metrics, **DBM_MIGRATED_METRICS) # select the right set of metrics to collect depending on postgres version self.instance_metrics = dict(c_metrics) @@ -189,7 +191,7 @@ def get_activity_metrics(self, version): metrics_data = self.activity_metrics if metrics_data is None: - excluded_aggregations = self.config.activity_metrics_excluded_aggregations + excluded_aggregations = list(self.config.activity_metrics_excluded_aggregations) if version < V9: excluded_aggregations.append('application_name') @@ -232,7 +234,7 @@ def get_activity_metrics(self, version): for i, q in enumerate(metrics_query): if '{dd__user}' in q: - metrics_query[i] = q.format(dd__user=self.config.user) + metrics_query[i] = q.format(dd__user=self.config.username) metrics = dict(zip(metrics_query, ACTIVITY_DD_METRICS)) diff --git a/postgres/datadog_checks/postgres/postgres.py b/postgres/datadog_checks/postgres/postgres.py index 463b8cfed74ca..8775936cb3248 100644 --- a/postgres/datadog_checks/postgres/postgres.py +++ b/postgres/datadog_checks/postgres/postgres.py @@ -14,6 +14,7 @@ from datadog_checks.base import AgentCheck from datadog_checks.base.utils.db import QueryExecutor from datadog_checks.base.utils.db.core import QueryManager +from datadog_checks.base.utils.db.health import HealthEvent, HealthStatus from datadog_checks.base.utils.db.utils import ( default_json_event_encoding, tracked_query, @@ -37,7 +38,7 @@ from datadog_checks.postgres.statements import PostgresStatementMetrics from .__about__ import __version__ -from .config import PostgresConfig +from .config import build_config, sanitize from .util import ( ANALYZE_PROGRESS_METRICS, AWS_RDS_HOSTNAME_SUFFIX, @@ -110,6 +111,7 @@ def __init__(self, name, init_config, instances): self._agent_hostname = None self._database_hostname = None self._db = None + self._cloud_metadata: dict[str, dict] = None self.version = None self.raw_version = None self.system_identifier = None @@ -117,23 +119,41 @@ def __init__(self, name, init_config, instances): self.is_aurora = None self.wal_level = None self._version_utils = VersionUtils() - # Deprecate custom_metrics in favor of custom_queries - if 'custom_metrics' in self.instance: - self.warning( - "DEPRECATION NOTICE: Please use the new custom_queries option " - "rather than the now deprecated custom_metrics" - ) - if 'managed_identity' in self.instance: - self.warning( - "DEPRECATION NOTICE: The managed_identity option is deprecated and will be removed in a future version." - " Please use the new azure.managed_authentication option instead." - ) - self._config = PostgresConfig(self.instance, self.init_config, self) - self.cloud_metadata = self._config.cloud_metadata - self.tags = self._config.tags + config, validation_result = build_config(self) + self._config = config + # Log validation errors and warnings + for error in validation_result.errors: + self.log.error(error) + for warning in validation_result.warnings: + self.log.warning(warning) + + self.tags = list(self._config.tags) self.add_core_tags() + try: + # Handle the config validation result after we've set tags so those tags are included in the health event + self.health.submit_health_event( + name=HealthEvent.INITIALIZATION, + status=HealthStatus.ERROR + if not validation_result.valid + else HealthStatus.WARNING + if validation_result.warnings + else HealthStatus.OK, + errors=[str(error) for error in validation_result.errors], + warnings=validation_result.warnings, + config=sanitize(self._config), + instance=sanitize(self.instance), + features=validation_result.features, + ) + except Exception as e: + self.log.error("Error submitting health event for initialization: %s", e) + + # Abort initializing the check if the config is invalid + if validation_result.valid is False: + self.log.error("Configuration validation failed: %s", validation_result.errors) + raise validation_result.errors[0] + # Keep a copy of the tags without the internal resource tags so they can be used for paths that don't # go through the agent internal metrics submission processing those tags self._non_internal_tags = copy.deepcopy(self.tags) @@ -153,7 +173,9 @@ def __init__(self, name, init_config, instances): self._relations_manager = RelationsManager(self._config.relations, self._config.max_relations) self._clean_state() self._query_manager = QueryManager(self, lambda _: None, queries=[]) # query executor is set later - self.check_initializations.append(lambda: RelationsManager.validate_relations_config(self._config.relations)) + self.check_initializations.append( + lambda: RelationsManager.validate_relations_config(list(self._config.relations)) + ) self.check_initializations.append(self.set_resolved_hostname_metadata) self.check_initializations.append(self._connect) self.check_initializations.append(self.load_cluster_name) @@ -171,7 +193,7 @@ def __init__(self, name, init_config, instances): ) # type: TTLCache def _build_autodiscovery(self): - if not self._config.discovery_config['enabled']: + if not self._config.database_autodiscovery.enabled: return None if not self._config.relations: @@ -182,8 +204,8 @@ def _build_autodiscovery(self): discovery = PostgresAutodiscovery( self, - self._config.discovery_config.get('global_view_db', 'postgres'), - self._config.discovery_config, + self._config.database_autodiscovery.global_view_db, + self._config.database_autodiscovery, self._config.idle_connection_timeout, ) return discovery @@ -198,31 +220,29 @@ def add_core_tags(self): self.tags.append("ddagenthostname:{}".format(self.agent_hostname)) def set_resource_tags(self): - if self.cloud_metadata.get("gcp") is not None: + if self._config.gcp.project_id and self._config.gcp.instance_id: self.tags.append( "dd.internal.resource:gcp_sql_database_instance:{}:{}".format( - self.cloud_metadata.get("gcp")["project_id"], self.cloud_metadata.get("gcp")["instance_id"] + self._config.gcp.project_id, self._config.gcp.instance_id ) ) - if self.cloud_metadata.get("aws") is not None and 'instance_endpoint' in self.cloud_metadata.get("aws"): + if self._config.aws.instance_endpoint: self.tags.append( "dd.internal.resource:aws_rds_instance:{}".format( - self.cloud_metadata.get("aws")["instance_endpoint"], + self._config.aws.instance_endpoint, ) ) elif AWS_RDS_HOSTNAME_SUFFIX in self.resolved_hostname: # allow for detecting if the host is an RDS host, and emit # the resource properly even if the `aws` config is unset self.tags.append("dd.internal.resource:aws_rds_instance:{}".format(self.resolved_hostname)) - self.cloud_metadata["aws"] = self.cloud_metadata.get("aws", {}) - self.cloud_metadata["aws"]["instance_endpoint"] = self.resolved_hostname - if self.cloud_metadata.get("azure") is not None: - deployment_type = self.cloud_metadata.get("azure")["deployment_type"] + if self._config.azure.deployment_type and self._config.azure.fully_qualified_domain_name: + deployment_type = self._config.azure.deployment_type # some `deployment_type`s map to multiple `resource_type`s resource_type = AZURE_DEPLOYMENT_TYPE_TO_RESOURCE_TYPE.get(deployment_type) if resource_type: self.tags.append( - "dd.internal.resource:{}:{}".format(resource_type, self.cloud_metadata.get("azure")["name"]) + "dd.internal.resource:{}:{}".format(resource_type, self._config.azure.fully_qualified_domain_name) ) # finally, tag the `database_instance` resource for this instance # metrics intake will use this tag to add all the tags for the instance @@ -379,13 +399,13 @@ def dynamic_queries(self): queries.append(STAT_SUBSCRIPTION_STATS_METRICS) queries.append(QUERY_PG_STAT_RECOVERY_PREFETCH) if self.version >= V16: - if self._config.dbm_enabled: + if self._config.dbm: queries.append(STAT_IO_METRICS) - if self._config.dbm_enabled and self._config.locks_idle_in_transaction['enabled']: + if self._config.dbm and self._config.locks_idle_in_transaction.enabled: query_def = copy.deepcopy(IDLE_TX_LOCK_AGE_METRICS) - query_def['collection_interval'] = self._config.locks_idle_in_transaction['collection_interval'] - max_rows = self._config.locks_idle_in_transaction.get('max_rows', 100) + query_def['collection_interval'] = self._config.locks_idle_in_transaction.collection_interval + max_rows = self._config.locks_idle_in_transaction.max_rows query_def['query'] = query_def['query'].format(max_rows=max_rows) per_database_queries.append(query_def) @@ -416,7 +436,7 @@ def cancel(self): """ Cancels and sends cancel signal to all threads. """ - if self._config.dbm_enabled: + if self._config.dbm: self.statement_samples.cancel() self.statement_metrics.cancel() self.metadata_samples.cancel() @@ -537,7 +557,7 @@ def resolved_hostname(self): def database_identifier(self): # type: () -> str if self._database_identifier is None: - template = Template(self._config.database_identifier.get('template') or '$resolved_hostname') + template = Template(self._config.database_identifier.template) tag_dict = {} tags = self.tags.copy() # sort tags to ensure consistent ordering @@ -555,6 +575,16 @@ def database_identifier(self): self._database_identifier = template.safe_substitute(**tag_dict) return self._database_identifier + @property + def cloud_metadata(self): + if self._cloud_metadata is None: + self._cloud_metadata = { + "aws": self._config.aws.model_dump(), + "azure": self._config.azure.model_dump(), + "gcp": self._config.gcp.model_dump(), + } + return self._cloud_metadata + def set_resolved_hostname_metadata(self): """ set_resolved_hostname_metadata cannot be invoked in the __init__ method because it calls self.set_metadata. @@ -887,29 +917,22 @@ def build_connection_args(self) -> PostgresConnectionArgs: if self._config.host == 'localhost' and self._config.password == '': return PostgresConnectionArgs( application_name=self._config.application_name, - user=self._config.user, + username=self._config.username, ) else: password = self._config.password - if 'aws' in self.cloud_metadata and 'managed_authentication' in self.cloud_metadata['aws']: - # if we are running on AWS, check if IAM auth is enabled - aws_managed_authentication = self.cloud_metadata['aws']['managed_authentication'] - if aws_managed_authentication['enabled']: - # if IAM auth is enabled, region must be set. Validation is done in the config - region = self.cloud_metadata['aws']['region'] - password = aws.generate_rds_iam_token( - host=self._config.host, - username=self._config.user, - port=self._config.port, - region=region, - role_arn=aws_managed_authentication.get('role_arn'), - ) - elif 'azure' in self.cloud_metadata: - azure_managed_authentication = self.cloud_metadata['azure']['managed_authentication'] - if azure_managed_authentication['enabled']: - client_id = azure_managed_authentication['client_id'] - identity_scope = azure_managed_authentication.get('identity_scope', None) - password = azure.generate_managed_identity_token(client_id=client_id, identity_scope=identity_scope) + if self._config.aws.managed_authentication.enabled: + password = aws.generate_rds_iam_token( + host=self._config.host, + username=self._config.username, + port=self._config.port, + region=self._config.aws.region, + role_arn=self._config.aws.managed_authentication.role_arn, + ) + elif self._config.azure.managed_authentication.enabled: + client_id = self._config.azure.managed_authentication.client_id + identity_scope = self._config.azure.managed_authentication.identity_scope + password = azure.generate_managed_identity_token(client_id=client_id, identity_scope=identity_scope) self.log.debug( "Try to connect to %s with %s", @@ -918,11 +941,11 @@ def build_connection_args(self) -> PostgresConnectionArgs: ) return PostgresConnectionArgs( application_name=self._config.application_name, - user=self._config.user, + username=self._config.username, host=self._config.host, port=self._config.port, password=password, - ssl_mode=self._config.ssl_mode, + ssl_mode=self._config.ssl, ssl_cert=self._config.ssl_cert, ssl_root_cert=self._config.ssl_root_cert, ssl_key=self._config.ssl_key, @@ -1016,7 +1039,7 @@ def _send_database_instance_metadata(self): "timestamp": time() * 1000, "cloud_metadata": self.cloud_metadata, "metadata": { - "dbm": self._config.dbm_enabled, + "dbm": self._config.dbm, "connection_host": self._config.host, }, } @@ -1070,7 +1093,7 @@ def check(self, _): if self._query_manager.queries: self._query_manager.executor = functools.partial(self.execute_query_raw, db=self.db) self._query_manager.execute(extra_tags=tags) - if self._config.dbm_enabled: + if self._config.dbm: self.statement_metrics.run_job_loop(tags) self.statement_samples.run_job_loop(tags) self.metadata_samples.run_job_loop(tags) diff --git a/postgres/datadog_checks/postgres/relationsmanager.py b/postgres/datadog_checks/postgres/relationsmanager.py index 6e6ec0d9abed5..2bad7e44ef1a6 100644 --- a/postgres/datadog_checks/postgres/relationsmanager.py +++ b/postgres/datadog_checks/postgres/relationsmanager.py @@ -20,6 +20,7 @@ from datadog_checks.base import AgentCheck, ConfigurationError from datadog_checks.base.log import get_check_logger +from datadog_checks.postgres.config_models.instance import Relations ALL_SCHEMAS = object() RELATION_NAME = 'relation_name' @@ -441,13 +442,13 @@ def filter_relation_query(self, query, schema_field): # Stub filter to allow for appending relation_filter.append("( 1=1") - if ALL_SCHEMAS not in r[SCHEMAS]: - schema_filter = ','.join("'{}'".format(s) for s in r[SCHEMAS]) + if ALL_SCHEMAS not in r.get(SCHEMAS, []): + schema_filter = ','.join("'{}'".format(s) for s in r.get(SCHEMAS, [])) relation_filter.append('AND {} = ANY(array[{}]::text[])'.format(schema_field, schema_filter)) # TODO: explicitly declare `relkind` compatiblity in the query rather than implicitly checking query text if r.get(RELKIND) and 'FROM pg_locks' in query: - relkind_filter = ','.join("'{}'".format(s) for s in r[RELKIND]) + relkind_filter = ','.join("'{}'".format(s) for s in r.get(RELKIND, [])) relation_filter.append('AND relkind = ANY(array[{}])'.format(relkind_filter)) relation_filter.append(')') @@ -464,40 +465,44 @@ def filter_relation_query(self, query, schema_field): def validate_relations_config(yamlconfig): # type: (List[Union[str, Dict]]) -> None for element in yamlconfig: + if isinstance(element, Relations): + element = element.model_dump() if isinstance(element, dict): - if not (RELATION_NAME in element or RELATION_REGEX in element): + if not (element.get(RELATION_NAME) or element.get(RELATION_REGEX)): raise ConfigurationError( "Parameter '%s' or '%s' is required for relation element %s", RELATION_NAME, RELATION_REGEX, element, ) - if RELATION_NAME in element and RELATION_REGEX in element: + if element.get(RELATION_NAME) and element.get(RELATION_REGEX): raise ConfigurationError( "Expecting only of parameters '%s', '%s' for relation element %s", RELATION_NAME, RELATION_REGEX, element, ) - if not isinstance(element.get(SCHEMAS, []), list): - raise ConfigurationError("Expected '%s' to be a list for %s", SCHEMAS, element) - if not isinstance(element.get(RELKIND, []), list): - raise ConfigurationError("Expected '%s' to be a list for %s", RELKIND, element) + if element.get(SCHEMAS) and not isinstance(element.get(SCHEMAS), (list, tuple)): + raise ConfigurationError("Expected '%s' to be a list or tuple for %s", SCHEMAS, element) + if element.get(RELKIND) and not isinstance(element.get(RELKIND), (list, tuple)): + raise ConfigurationError("Expected '%s' to be a list or tuple for %s", RELKIND, element) elif not isinstance(element, str): raise ConfigurationError('Unhandled relations config type: %s', element) @staticmethod - def _build_relations_config(yamlconfig): - # type: (List[Union[str, Dict]]) -> List[Dict[str, Any]] + def _build_relations_config(yamlconfig: list[str | Relations]) -> List[Dict[str, Any]]: """Builds a list from relations configuration while maintaining compatibility""" relations = [] for element in yamlconfig: config = {} + if isinstance(element, Relations): + element = element.model_dump() + if isinstance(element, str): config = {RELATION_NAME: element, SCHEMAS: [ALL_SCHEMAS]} elif isinstance(element, dict): config = element.copy() - if len(config.get(SCHEMAS, [])) == 0: + if len(config.get(SCHEMAS) or []) == 0: config[SCHEMAS] = [ALL_SCHEMAS] relations.append(config) return relations diff --git a/postgres/datadog_checks/postgres/statement_samples.py b/postgres/datadog_checks/postgres/statement_samples.py index 19cc622e1ae2f..01643d1c1771d 100644 --- a/postgres/datadog_checks/postgres/statement_samples.py +++ b/postgres/datadog_checks/postgres/statement_samples.py @@ -1,6 +1,7 @@ # (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) +from __future__ import annotations import copy import re @@ -12,11 +13,19 @@ from cachetools import TTLCache from psycopg.rows import dict_row +from datadog_checks.postgres.config_models import InstanceConfig + try: import datadog_agent except ImportError: from datadog_checks.base.stubs import datadog_agent + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from datadog_checks.postgres import PostgreSql + from datadog_checks.base import is_affirmative from datadog_checks.base.utils.common import to_native_string from datadog_checks.base.utils.db.sql import compute_exec_plan_signature, compute_sql_signature @@ -127,10 +136,6 @@ class StatementTruncationState(Enum): unknown = 'unknown' -DEFAULT_COLLECTION_INTERVAL = 1 -DEFAULT_ACTIVITY_COLLECTION_INTERVAL = 10 - - def agent_check_getter(self): return self._check @@ -140,29 +145,20 @@ class PostgresStatementSamples(DBMAsyncJob): Collects statement samples and execution plans. """ - def __init__(self, check, config): - collection_interval = float( - config.statement_samples_config.get('collection_interval', DEFAULT_COLLECTION_INTERVAL) - ) - if collection_interval <= 0: - collection_interval = DEFAULT_COLLECTION_INTERVAL + def __init__(self, check: PostgreSql, config: InstanceConfig): + collection_interval = config.query_samples.collection_interval # if regular samples is disabled, only need to collect as often as activity is sampled - if not is_affirmative(config.statement_samples_config.get('enabled', True)): - collection_interval = config.statement_activity_config.get( - 'collection_interval', DEFAULT_ACTIVITY_COLLECTION_INTERVAL - ) + if not config.query_samples.enabled: + collection_interval = config.query_activity.collection_interval self.db_pool = check.db_pool super(PostgresStatementSamples, self).__init__( check, rate_limit=1 / collection_interval, - run_sync=is_affirmative(config.statement_samples_config.get('run_sync', False)), - enabled=is_affirmative( - config.statement_samples_config.get('enabled', True) - or is_affirmative(config.statement_activity_config.get('enabled', True)) - ), + run_sync=config.query_samples.run_sync, + enabled=config.query_samples.enabled or config.query_activity.enabled, dbms="postgres", min_collection_interval=config.min_collection_interval, expected_db_exceptions=(psycopg.errors.DatabaseError,), @@ -175,50 +171,47 @@ def __init__(self, check, config): self.tags = None self._activity_last_query_start = None # The value is loaded when connecting to the main database - self._explain_function = config.statement_samples_config.get('explain_function', 'datadog.explain_statement') + self._explain_function = config.query_samples.explain_function self._explain_parameterized_queries = ExplainParameterizedQueries(check, config, self._explain_function) - self._obfuscate_options = to_native_string(json.dumps(self._config.obfuscator_options)) - self._collect_raw_query_statement = config.collect_raw_query_statement.get("enabled", False) + self._obfuscate_options = to_native_string(self._config.obfuscator_options.model_dump_json()) + self._collect_raw_query_statement = config.collect_raw_query_statement.enabled self._collection_strategy_cache = TTLCache( - maxsize=config.statement_samples_config.get('collection_strategy_cache_maxsize', 1000), - ttl=config.statement_samples_config.get('collection_strategy_cache_ttl', 300), + maxsize=1000, + ttl=300, ) self._explain_errors_cache = TTLCache( - maxsize=config.statement_samples_config.get('explain_errors_cache_maxsize', 5000), + maxsize=self._config.query_samples.explain_errors_cache_maxsize, # only try to re-explain invalid statements once per day - ttl=config.statement_samples_config.get('explain_errors_cache_ttl', 24 * 60 * 60), + ttl=self._config.query_samples.explain_errors_cache_ttl, ) # explained_statements_ratelimiter: limit how often we try to re-explain the same query self._explained_statements_ratelimiter = RateLimitingTTLCache( - maxsize=int(config.statement_samples_config.get('explained_queries_cache_maxsize', 5000)), - ttl=60 * 60 / int(config.statement_samples_config.get('explained_queries_per_hour_per_query', 60)), + maxsize=int(config.query_samples.explained_queries_cache_maxsize), + ttl=60 * 60 / int(config.query_samples.explained_queries_per_hour_per_query), ) # seen_samples_ratelimiter: limit the ingestion rate per (query_signature, plan_signature) self._seen_samples_ratelimiter = RateLimitingTTLCache( # assuming ~100 bytes per entry (query & plan signature, key hash, 4 pointers (ordered dict), expiry time) # total size: 10k * 100 = 1 Mb - maxsize=int(config.statement_samples_config.get('seen_samples_cache_maxsize', 10000)), - ttl=60 * 60 / int(config.statement_samples_config.get('samples_per_hour_per_query', 15)), + maxsize=int(config.query_samples.seen_samples_cache_maxsize), + ttl=60 * 60 / config.query_samples.samples_per_hour_per_query, ) self._raw_statement_text_cache = RateLimitingTTLCache( - maxsize=config.collect_raw_query_statement["cache_max_size"], - ttl=60 * 60 / config.collect_raw_query_statement["samples_per_hour_per_query"], + maxsize=10000, + ttl=60 * 60 / 1, ) - self._activity_coll_enabled = is_affirmative(self._config.statement_activity_config.get('enabled', True)) - self._explain_plan_coll_enabled = is_affirmative(self._config.statement_samples_config.get('enabled', True)) + self._activity_coll_enabled = self._config.query_activity.enabled + self._explain_plan_coll_enabled = self._config.query_samples.enabled # activity events cannot be reported more often than regular samples - self._activity_coll_interval = max( - self._config.statement_activity_config.get('collection_interval', DEFAULT_ACTIVITY_COLLECTION_INTERVAL), - collection_interval, - ) - self._activity_max_rows = self._config.statement_activity_config.get('payload_row_limit', 3500) + self._activity_coll_interval = max(self._config.query_activity.collection_interval, collection_interval) + self._activity_max_rows = self._config.query_activity.payload_row_limit # Keep track of last time we sent an activity event self._time_since_last_activity_event = 0 self._pg_stat_activity_cols = None @@ -799,7 +792,7 @@ def _run_explain_safe(self, dbname, statement, obfuscated_statement, query_signa # we should directly jump into self._explain_parameterized_queries.explain_statement # instead of trying to explain it then failing if self._explain_parameterized_queries._is_parameterized_query(statement): - if is_affirmative(self._config.statement_samples_config.get('explain_parameterized_queries', True)): + if is_affirmative(self._config.query_samples.explain_parameterized_queries): return self._explain_parameterized_queries.explain_statement( dbname, statement, obfuscated_statement, query_signature ) diff --git a/postgres/datadog_checks/postgres/statements.py b/postgres/datadog_checks/postgres/statements.py index bf8790389fcad..ca6e525e0fbf6 100644 --- a/postgres/datadog_checks/postgres/statements.py +++ b/postgres/datadog_checks/postgres/statements.py @@ -11,13 +11,13 @@ from cachetools import TTLCache from psycopg.rows import dict_row -from datadog_checks.base import is_affirmative from datadog_checks.base.utils.common import to_native_string from datadog_checks.base.utils.db.sql import compute_sql_signature from datadog_checks.base.utils.db.statement_metrics import StatementMetrics from datadog_checks.base.utils.db.utils import DBMAsyncJob, default_json_event_encoding, obfuscate_sql_with_metadata from datadog_checks.base.utils.serialization import json from datadog_checks.base.utils.tracking import tracked_method +from datadog_checks.postgres.config_models import InstanceConfig from .query_calls_cache import QueryCallsCache from .util import DatabaseConfigurationError, payload_pg_version, warning_with_tags @@ -150,22 +150,15 @@ def _row_key(row): return row['query_signature'], row['datname'], row['rolname'] -DEFAULT_COLLECTION_INTERVAL = 10 - - class PostgresStatementMetrics(DBMAsyncJob): """Collects telemetry for SQL statements""" - def __init__(self, check, config): - collection_interval = float( - config.statement_metrics_config.get('collection_interval', DEFAULT_COLLECTION_INTERVAL) - ) - if collection_interval <= 0: - collection_interval = DEFAULT_COLLECTION_INTERVAL + def __init__(self, check, config: InstanceConfig): + collection_interval = float(config.query_metrics.collection_interval) super(PostgresStatementMetrics, self).__init__( check, - run_sync=is_affirmative(config.statement_metrics_config.get('run_sync', False)), - enabled=is_affirmative(config.statement_metrics_config.get('enabled', True)), + run_sync=config.query_metrics.run_sync, + enabled=config.query_metrics.enabled, expected_db_exceptions=(psycopg.errors.DatabaseError,), min_collection_interval=config.min_collection_interval, dbms="postgres", @@ -174,9 +167,7 @@ def __init__(self, check, config): ) self._check = check self._metrics_collection_interval = collection_interval - self._pg_stat_statements_max_warning_threshold = config.statement_metrics_config.get( - 'pg_stat_statements_max_warning_threshold', 10000 - ) + self._pg_stat_statements_max_warning_threshold = config.query_metrics.pg_stat_statements_max_warning_threshold self._config = config # This config option isn't publicized because the related option in datadog.yaml # (database_monitoring.metrics.batch_max_content_size) cannot be decreased, and increasing it @@ -185,7 +176,7 @@ def __init__(self, check, config): # NB: This value should always match the datadog.yaml value, whose default is set # https://github.com/DataDog/datadog-agent/blob/96d253e8b91326c2418302b13a73b420ad5a6d92/comp/forwarder/eventplatform/eventplatformimpl/epforwarder.go#L79 # If that default changes, this should be updated - self.batch_max_content_size = config.init_config.get('metrics', {}).get('batch_max_content_size', 20_000_000) + self.batch_max_content_size = config.query_metrics.batch_max_content_size self._tags_no_db = None self.tags = None self._state = StatementMetrics() @@ -194,11 +185,11 @@ def __init__(self, check, config): self._baseline_metrics = {} self._last_baseline_metrics_expiry = None self._track_io_timing_cache = None - self._obfuscate_options = to_native_string(json.dumps(self._config.obfuscator_options)) + self._obfuscate_options = to_native_string(self._config.obfuscator_options.model_dump_json()) # full_statement_text_cache: limit the ingestion rate of full statement text events per query_signature self._full_statement_text_cache = TTLCache( - maxsize=config.full_statement_text_cache_max_size, - ttl=60 * 60 / config.full_statement_text_samples_per_hour_per_query, + maxsize=config.query_metrics.full_statement_text_cache_max_size, + ttl=60 * 60 / config.query_metrics.full_statement_text_samples_per_hour_per_query, ) def _execute_query(self, query, params=(), binary=False, row_factory=None) -> Tuple[list, list]: @@ -560,7 +551,7 @@ def _apply_called_queries(self, rows): def _check_baseline_metrics_expiry(self): if ( self._last_baseline_metrics_expiry is None - or self._last_baseline_metrics_expiry + self._config.baseline_metrics_expiry < time.time() + or self._last_baseline_metrics_expiry + self._config.query_metrics.baseline_metrics_expiry < time.time() or len(self._baseline_metrics) > 3 * int(self._check.pg_settings.get("pg_stat_statements.max", 10000)) ): self._baseline_metrics = {} @@ -582,7 +573,7 @@ def _collect_metrics_rows(self): self._check_baseline_metrics_expiry() rows = [] - if (not self._config.incremental_query_metrics) or self._check.version < V10: + if (not self._config.query_metrics.incremental_query_metrics) or self._check.version < V10: rows = self._load_pg_stat_statements() rows = self._normalize_queries(rows) elif len(self._baseline_metrics) == 0: diff --git a/postgres/pyproject.toml b/postgres/pyproject.toml index a39c0e24e51c1..95cf08137307b 100644 --- a/postgres/pyproject.toml +++ b/postgres/pyproject.toml @@ -63,4 +63,4 @@ include = [ ] dev-mode-dirs = [ ".", -] +] \ No newline at end of file diff --git a/postgres/tests/compose/etc/postgresql/postgresql.conf b/postgres/tests/compose/etc/postgresql/postgresql.conf index f0f17a5b1dab2..4e8eea778e08f 100644 --- a/postgres/tests/compose/etc/postgresql/postgresql.conf +++ b/postgres/tests/compose/etc/postgresql/postgresql.conf @@ -9,4 +9,4 @@ cluster_name = 'primary' wal_level = logical max_wal_senders = 10 -max_replication_slots = 10 +max_replication_slots = 10 \ No newline at end of file diff --git a/postgres/tests/compose/resources/03_load_data.sh b/postgres/tests/compose/resources/02_load_data.sh similarity index 100% rename from postgres/tests/compose/resources/03_load_data.sh rename to postgres/tests/compose/resources/02_load_data.sh diff --git a/postgres/tests/compose/resources/02_setup.sh b/postgres/tests/compose/resources/03_setup.sh similarity index 100% rename from postgres/tests/compose/resources/02_setup.sh rename to postgres/tests/compose/resources/03_setup.sh diff --git a/postgres/tests/conftest.py b/postgres/tests/conftest.py index 476f2342463fd..85136060ebc66 100644 --- a/postgres/tests/conftest.py +++ b/postgres/tests/conftest.py @@ -3,6 +3,8 @@ # Licensed under Simplified BSD License (see LICENSE) import copy import os +from collections.abc import Callable +from typing import Optional import psycopg import pytest @@ -10,7 +12,7 @@ from datadog_checks.dev import WaitFor, docker_run from datadog_checks.postgres import PostgreSql -from datadog_checks.postgres.config import PostgresConfig +from datadog_checks.postgres.config import build_config from datadog_checks.postgres.metrics_cache import PostgresMetricsCache from .common import ( @@ -36,6 +38,7 @@ 'dbname': DB_NAME, 'tags': ['foo:bar'], 'disable_generic_tags': True, + 'collect_settings': {'enabled': True, 'run_sync': True}, } @@ -67,6 +70,7 @@ def dd_environment(e2e_instance): os.path.join(HERE, 'compose', compose_file), conditions=[WaitFor(connect_to_pg)], env_vars={"POSTGRES_IMAGE": POSTGRES_IMAGE, "POSTGRES_LOCALE": POSTGRES_LOCALE}, + capture=True, ): yield e2e_instance, E2E_METADATA @@ -79,8 +83,8 @@ def check(): @pytest.fixture -def integration_check(): - def _check(instance, init_config=None): +def integration_check() -> Callable[[dict, Optional[dict]], PostgreSql]: + def _check(instance: dict, init_config: dict = None): c = PostgreSql('postgres', init_config or {}, [instance]) return c @@ -115,13 +119,17 @@ def pg_replica_logical(): @pytest.fixture def metrics_cache(pg_instance): - config = PostgresConfig(instance=pg_instance, init_config={}, check={'warning': print}) + check = PostgreSql('postgres', {}, [pg_instance]) + check.warning = print + config, _ = build_config(check) return PostgresMetricsCache(config) @pytest.fixture def metrics_cache_replica(pg_replica_instance): - config = PostgresConfig(instance=pg_replica_instance, init_config={}, check={'warning': print}) + check = PostgreSql('postgres', {}, [pg_replica_instance]) + check.warning = print + config, _ = build_config(check) return PostgresMetricsCache(config) @@ -129,5 +137,4 @@ def metrics_cache_replica(pg_replica_instance): def e2e_instance(): instance = copy.deepcopy(INSTANCE) instance['dbm'] = True - instance['collect_resources'] = {'collection_interval': 0.1} return instance diff --git a/postgres/tests/test_config.py b/postgres/tests/test_config.py new file mode 100644 index 0000000000000..a30c2ca789c0b --- /dev/null +++ b/postgres/tests/test_config.py @@ -0,0 +1,383 @@ +# (C) Datadog, Inc. 2025-present +# All rights reserved +# Licensed under a 3-clause BSD style license (see LICENSE) + + +import json +from unittest.mock import MagicMock + +import pytest + +from datadog_checks.base.errors import ConfigurationError +from datadog_checks.postgres.config import ( + FeatureKey, + ValidationResult, + build_config, + deprecation_warning, + sanitize, +) +from datadog_checks.postgres.config_models import dict_defaults +from datadog_checks.postgres.config_models.instance import Relations +from datadog_checks.postgres.relationsmanager import RelationsManager + + +@pytest.fixture +def mock_check(): + # Mock check object with a warning method + check = MagicMock() + check.warning = MagicMock() + return check + + +@pytest.fixture +def minimal_instance(): + return {'host': 'localhost', 'port': 5432, 'username': 'testuser', 'password': 'testpass', 'dbname': 'testdb'} + + +pytestmark = pytest.mark.unit + + +def test_initialize_valid_config(mock_check, minimal_instance): + mock_check.instance = minimal_instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert isinstance(result, ValidationResult) + assert result.valid + assert not result.errors + + +def test_initialize_invalid_ssl_mode(mock_check, minimal_instance): + instance = minimal_instance + instance['ssl'] = 'invalid_ssl' + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.valid # Should still be valid, but with a warning + assert any("Invalid ssl option" in w for w in result.warnings) + + +def test_initialize_conflicting_collect_default_database_and_ignore_databases(mock_check, minimal_instance): + instance = minimal_instance + instance['collect_default_database'] = True + instance['ignore_databases'] = ['postgres'] + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.valid + assert any("cannot be ignored" in w for w in result.warnings) + + +def test_initialize_non_ascii_application_name(mock_check, minimal_instance): + instance = minimal_instance + instance['application_name'] = 'datadog-агент' + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert not result.valid + assert any("ASCII characters" in str(e) for e in result.errors) + + +def test_initialize_features_enabled_and_disabled(mock_check, minimal_instance): + # Enable all features + instance = minimal_instance + instance.update( + { + 'relations': ['public.table1'], + 'dbm': True, + 'query_samples': {'enabled': True}, + 'collect_settings': {'enabled': True}, + 'collect_schemas': {'enabled': True}, + 'query_activity': {'enabled': True}, + 'query_metrics': {'enabled': True}, + } + ) + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + feature_keys = {f['key'] for f in result.features} + assert set(feature_keys) == { + FeatureKey.RELATION_METRICS, + FeatureKey.QUERY_SAMPLES, + FeatureKey.COLLECT_SETTINGS, + FeatureKey.COLLECT_SCHEMAS, + FeatureKey.QUERY_ACTIVITY, + FeatureKey.QUERY_METRICS, + } + for feature in result.features: + assert feature['enabled'] is True + + +def test_initialize_features_disabled_by_default(mock_check, minimal_instance): + mock_check.instance = minimal_instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + features = {f['key']: f for f in result.features} + assert features[FeatureKey.RELATION_METRICS]['enabled'] is False + assert features[FeatureKey.QUERY_SAMPLES]['enabled'] is False + assert features[FeatureKey.COLLECT_SETTINGS]['enabled'] is False + assert features[FeatureKey.COLLECT_SCHEMAS]['enabled'] is False + assert features[FeatureKey.QUERY_ACTIVITY]['enabled'] is False + assert features[FeatureKey.QUERY_METRICS]['enabled'] is False + + +def test_initialize_features_warn_if_dbm_missing_for_dbm_features(mock_check, minimal_instance): + # Enable features that require dbm, but do not enable dbm + instance = minimal_instance + instance['query_samples'] = {'enabled': True} + instance['collect_settings'] = {'enabled': True} + instance['collect_schemas'] = {'enabled': True} + instance['query_activity'] = {'enabled': True} + instance['query_metrics'] = {'enabled': True} + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + # Should warn for each feature that requires dbm + assert any("requires the `dbm` option to be enabled" in w for w in result.warnings) + # Should have all features in the features list + feature_keys = {f['key'] for f in result.features} + assert FeatureKey.QUERY_SAMPLES in feature_keys + assert FeatureKey.COLLECT_SETTINGS in feature_keys + assert FeatureKey.COLLECT_SCHEMAS in feature_keys + assert FeatureKey.QUERY_ACTIVITY in feature_keys + assert FeatureKey.QUERY_METRICS in feature_keys + + +def test_initialize_deprecated_options_warn(mock_check, minimal_instance): + instance = minimal_instance + instance['deep_database_monitoring'] = True + instance['statement_samples'] = {'enabled': True} + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert config.dbm is True + assert any("deprecated" in w for w in result.warnings) + + +def test_initialize_empty_default_hostname_warns(mock_check, minimal_instance): + instance = minimal_instance + instance['empty_default_hostname'] = True + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert any("empty_default_hostname" in w for w in result.warnings) + + +@pytest.mark.parametrize( + 'instance, init_config, should_propagate', + [ + (True, True, True), + (False, False, False), + (True, False, True), + (False, True, False), + (None, True, True), + (None, False, False), + (False, None, False), + (True, None, True), + ], +) +def test_propagate_agent_tags(instance, init_config, should_propagate, mock_check, minimal_instance): + minimal_instance['propagate_agent_tags'] = instance + init_config = {'propagate_agent_tags': init_config} + mock_check.instance = minimal_instance + mock_check.init_config = init_config + config, _ = build_config(check=mock_check) + assert config.propagate_agent_tags == should_propagate + + +def test_sanitize_config(mock_check, minimal_instance): + instance = minimal_instance + instance['password'] = 'secret' + instance['ssl_password'] = 'ssl_secret' + instance['custom_metrics'] = [ + { + "descriptors": [], + "metrics": {"count": ["imqs.user.logins", "MONOTONIC"]}, + "query": "select count(did_what) as %s from actionlog where did_what = 'Login';", + "relation": False, + } + ] + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + sanitized = sanitize(config) + assert sanitized['password'] == '***' + assert sanitized['ssl_password'] == '***' + assert 'custom_metrics' not in sanitized + + +def test_serialize_config(mock_check, minimal_instance): + instance = minimal_instance + instance['password'] = 'secret' + instance['ssl_password'] = 'ssl_secret' + instance['custom_metrics'] = [ + { + "descriptors": [], + "metrics": {"count": ["imqs.user.logins", "MONOTONIC"]}, + "query": "select count(did_what) as %s from actionlog where did_what = 'Login';", + "relation": False, + } + ] + instance['custom_queries'] = [ + { + 'metric_prefix': 'custom', + 'query': "SELECT letter, num FROM (VALUES (97, 'a'), (98, 'b'), (99, 'c')) AS t (num,letter)", + 'columns': [{'name': 'customtag', 'type': 'tag'}, {'name': 'num', 'type': 'gauge'}], + 'tags': ['query:custom'], + }, + { + 'metric_prefix': 'another_custom_one', + 'query': "SELECT letter, num FROM (VALUES (97, 'a'), (98, 'b'), (99, 'c')) AS t (num,letter)", + 'columns': [{'name': 'customtag', 'type': 'tag'}, {'name': 'num', 'type': 'gauge'}], + 'tags': ['query:another_custom_one'], + }, + ] + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + serialized = json.dumps(sanitize(config)) + assert isinstance(serialized, str) + assert '"password": "***"' in serialized + assert '"ssl_password": "***"' in serialized + + +def test_valid_string_numbers(mock_check, minimal_instance): + instance = minimal_instance + instance['query_metrics'] = {'collection_interval': '30'} + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.valid + assert config.query_metrics.collection_interval == 30 + + +def test_invalid_numbers(mock_check, minimal_instance): + instance = minimal_instance + instance['query_metrics'] = {'collection_interval': 'not_a_number'} + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert any("query_metrics.collection_interval must be greater than 0" in w for w in result.warnings) + assert config.query_metrics.collection_interval == dict_defaults.instance_query_metrics().collection_interval + + +def test_relations_validation(mock_check, minimal_instance): + minimal_instance["relations"] = [ + {"relation_regex": ".*", "schemas": ["hello", "hello2"]}, + # Empty schemas means all schemas, even though the first relation matches first. + {"relation_regex": r"[pP]ersons[-_]?(dup\d)?"}, + ] + + mock_check.instance = minimal_instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.errors == [] + assert result.valid + assert config.relations == ( + Relations(relation_regex=".*", schemas=("hello", "hello2")), + # Empty schemas means all schemas, even though the first relation matches first. + Relations(relation_regex=r"[pP]ersons[-_]?(dup\d)?"), + ) + + +@pytest.mark.parametrize( + 'section, section_config, expected_collection_interval', + [ + ( + "query_metrics", + {"collection_interval": "not_a_number"}, + dict_defaults.instance_query_metrics().collection_interval, + ), + ("query_metrics", {"collection_interval": "0"}, dict_defaults.instance_query_metrics().collection_interval), + ("query_metrics", {"collection_interval": "1"}, 1), + ( + "query_samples", + {"collection_interval": "not_a_number"}, + dict_defaults.instance_query_samples().collection_interval, + ), + ("query_samples", {"collection_interval": "0"}, dict_defaults.instance_query_samples().collection_interval), + ("query_samples", {"collection_interval": "1"}, 1), + ( + "query_activity", + {"collection_interval": "not_a_number"}, + dict_defaults.instance_query_activity().collection_interval, + ), + ("query_activity", {"collection_interval": "0"}, dict_defaults.instance_query_activity().collection_interval), + ("query_activity", {"collection_interval": "1"}, 1), + ], +) +def test_apply_validated_defaults(mock_check, minimal_instance, section, section_config, expected_collection_interval): + instance = minimal_instance + instance[section] = {**instance.get(section, {}), **section_config} + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.valid + assert getattr(config, section).collection_interval == expected_collection_interval + + +def test_apply_validated_defaults_ssl(mock_check, minimal_instance): + instance = minimal_instance + instance['ssl'] = 'invalid_ssl' + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.valid + assert config.ssl == "allow" + assert any("Invalid ssl option" in w for w in result.warnings) + + +@pytest.mark.parametrize( + 'option, replacement, value', + [ + ('custom_metrics', 'custom_queries', []), + ('deep_database_monitoring', 'dbm', True), + ('managed_identity', 'azure.managed_authentication', {}), + ('statement_samples', 'query_samples', {}), + ('collect_default_database', 'postgres', True), + ], +) +def test_apply_deprecation_warnings(mock_check, minimal_instance, option, replacement, value): + instance = minimal_instance + instance[option] = value + mock_check.instance = instance + mock_check.init_config = {} + _, result = build_config(check=mock_check) + assert result.valid + assert any(deprecation_warning(option, replacement) in w for w in result.warnings) + + +def test_cloud_validations(mock_check, minimal_instance): + # AWS + instance = minimal_instance + instance['aws'] = {'region': 'us-east-1'} + instance['password'] = None + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.valid + assert config.aws.managed_authentication.enabled + + # Azure + instance = minimal_instance + instance['managed_identity'] = {'client_id': '123'} + instance['password'] = None + mock_check.instance = instance + mock_check.init_config = {} + config, result = build_config(check=mock_check) + assert result.valid + assert config.azure.managed_authentication.enabled + + +def test_relations_validation_fails_if_no_relname_or_regex(): + with pytest.raises(ConfigurationError): + RelationsManager.validate_relations_config([{"relkind": ["i"]}]) + + +def test_relations_validation_fails_if_schemas_is_wrong_type(): + with pytest.raises(ConfigurationError): + RelationsManager.validate_relations_config([{"relation_name": "person", "schemas": "foo"}]) + + +def test_relations_validation_fails_if_relkind_is_wrong_type(): + with pytest.raises(ConfigurationError): + RelationsManager.validate_relations_config([{"relation_name": "person", "relkind": "foo"}]) diff --git a/postgres/tests/test_connection_pool.py b/postgres/tests/test_connection_pool.py index 2f7ea1bae2c9b..874a0bdb53e19 100644 --- a/postgres/tests/test_connection_pool.py +++ b/postgres/tests/test_connection_pool.py @@ -29,7 +29,7 @@ def _create_conn_args(pg_instance, application_name="test_connection_pool"): """ return PostgresConnectionArgs( application_name=application_name, - user=pg_instance["username"], + username=pg_instance["username"], password=pg_instance["password"], host=pg_instance["host"], port=int(pg_instance["port"]), @@ -40,7 +40,7 @@ def _make_base_args(**overrides): """Helper to create base connection arguments with defaults.""" base = { "application_name": "test_app", - "user": "testuser", + "username": "testuser", "password": "testpass", "host": "localhost", "port": 5432, @@ -738,7 +738,7 @@ def test_closed_state_and_pool_creation_prevention(): # Create a pool manager with mock connection args (no real DB needed for this test) conn_args = PostgresConnectionArgs( application_name="test_closed_state", - user="testuser", + username="testuser", password="testpass", host="localhost", port=5432, diff --git a/postgres/tests/test_discovery.py b/postgres/tests/test_discovery.py index 6c0b440794663..c9d38f6e2390a 100644 --- a/postgres/tests/test_discovery.py +++ b/postgres/tests/test_discovery.py @@ -12,8 +12,6 @@ import psycopg.sql import pytest -from datadog_checks.base import ConfigurationError - from .common import HOST, PASSWORD_ADMIN, USER_ADMIN, _get_expected_tags, check_common_metrics from .utils import requires_over_13, run_one_check @@ -261,19 +259,6 @@ def test_autodiscovery_exceeds_min_interval(aggregator, integration_check, pg_in assert test_structure.match(check.warnings[0]) -@pytest.mark.integration -@pytest.mark.usefixtures('dd_environment') -def test_autodiscovery_dbname_specified(integration_check, pg_instance): - """ - If a dbname is specified in the config, autodiscovery should not run. - """ - pg_instance["database_autodiscovery"] = DISCOVERY_CONFIG - pg_instance['dbname'] = "dogs_30" - - with pytest.raises(ConfigurationError): - integration_check(pg_instance) - - def _set_allow_connection(dbname: str, allow: bool): with get_postgres_connection() as conn: cursor = conn.cursor() diff --git a/postgres/tests/test_explain_parameterized_queries.py b/postgres/tests/test_explain_parameterized_queries.py index 8fd866bb29748..9f08beb116eba 100644 --- a/postgres/tests/test_explain_parameterized_queries.py +++ b/postgres/tests/test_explain_parameterized_queries.py @@ -28,7 +28,6 @@ def dbm_instance(pg_instance): } pg_instance['query_activity'] = {'enabled': True, 'collection_interval': 1} pg_instance['query_metrics'] = {'enabled': True, 'run_sync': True, 'collection_interval': 10} - pg_instance['collect_resources'] = {'enabled': False} return pg_instance @@ -198,7 +197,6 @@ def test_explain_parameterized_queries_explain_prepared_statement_no_plan_return assert err is None -@pytest.mark.unit @requires_over_12 def test_generate_prepared_statement_query_no_parameters(integration_check, dbm_instance): check = integration_check(dbm_instance) @@ -216,8 +214,6 @@ def test_generate_prepared_statement_query_no_parameters(integration_check, dbm_ assert prepared_statement_query == f"EXECUTE dd_{test_query_signature}" -@pytest.mark.unit -@requires_over_12 def test_generate_prepared_statement_query_three_parameters(integration_check, dbm_instance): check = integration_check(dbm_instance) test_query_signature = "12345678" diff --git a/postgres/tests/test_metadata.py b/postgres/tests/test_metadata.py index 8dde780d3aa49..cd6bca0d835a4 100644 --- a/postgres/tests/test_metadata.py +++ b/postgres/tests/test_metadata.py @@ -22,7 +22,6 @@ def dbm_instance(pg_instance): pg_instance['query_samples'] = {'enabled': False} pg_instance['query_activity'] = {'enabled': False} pg_instance['query_metrics'] = {'enabled': False} - pg_instance['collect_resources'] = {'enabled': True, 'run_sync': True, 'collection_interval': 0.1} pg_instance['collect_settings'] = {'enabled': True, 'run_sync': True, 'collection_interval': 0.1} return pg_instance @@ -81,9 +80,9 @@ def test_collect_schemas(integration_check, dbm_instance, aggregator, use_defaul dbm_instance['relations'] = [] dbm_instance["database_autodiscovery"] = {"enabled": True, "include": ["datadog"]} del dbm_instance['dbname'] - check = integration_check(dbm_instance) if not use_default_ignore_schemas_owned_by: - check._config.ignore_schemas_owned_by = ['rds_superuser'] + dbm_instance["ignore_schemas_owned_by"] = ['rds_superuser'] + check = integration_check(dbm_instance) run_one_check(check, dbm_instance) dbm_metadata = aggregator.get_event_platform_events("dbm-metadata") diff --git a/postgres/tests/test_metrics_cache.py b/postgres/tests/test_metrics_cache.py index 4507e2c6d06a8..c30a143b62c41 100644 --- a/postgres/tests/test_metrics_cache.py +++ b/postgres/tests/test_metrics_cache.py @@ -3,8 +3,9 @@ # Licensed under Simplified BSD License (see LICENSE) import pytest -from datadog_checks.postgres.config import PostgresConfig +from datadog_checks.postgres.config import build_config from datadog_checks.postgres.metrics_cache import PostgresMetricsCache +from datadog_checks.postgres.postgres import PostgreSql from datadog_checks.postgres.util import ( COMMON_METRICS, DBM_MIGRATED_METRICS, @@ -28,7 +29,9 @@ ], ) def test_aurora_replication_metrics(pg_instance, version, is_aurora, expected_metrics): - config = PostgresConfig(instance=pg_instance, init_config={}, check={'warning': print}) + check = PostgreSql('postgres', {}, [pg_instance]) + check.warning = print + config, _ = build_config(check=check) cache = PostgresMetricsCache(config) replication_metrics = cache.get_replication_metrics(version, is_aurora) assert replication_metrics == expected_metrics @@ -48,9 +51,11 @@ def test_aurora_replication_metrics(pg_instance, version, is_aurora, expected_me ) def test_dbm_enabled_conn_metric(pg_instance, version, is_dbm_enabled, expected_metrics): pg_instance['dbm'] = is_dbm_enabled - pg_instance['collect_resources'] = {'enabled': False} pg_instance['collect_database_size_metrics'] = False - config = PostgresConfig(instance=pg_instance, init_config={}, check={'warning': print}) + check = PostgreSql('postgres', {}, [pg_instance]) + check.warning = print + config, _ = build_config(check=check) + assert config.collect_database_size_metrics is False cache = PostgresMetricsCache(config) instance_metrics = cache.get_instance_metrics(version) assert instance_metrics['metrics'] == expected_metrics diff --git a/postgres/tests/test_pg_integration.py b/postgres/tests/test_pg_integration.py index 1bdc917202d5c..22773c0eb3637 100644 --- a/postgres/tests/test_pg_integration.py +++ b/postgres/tests/test_pg_integration.py @@ -9,7 +9,6 @@ import psycopg import pytest -from datadog_checks.base.errors import ConfigurationError from datadog_checks.postgres import PostgreSql from datadog_checks.postgres.__about__ import __version__ from datadog_checks.postgres.util import BUFFERCACHE_METRICS, DatabaseHealthCheckError, PartialFormatter, fmt @@ -89,8 +88,9 @@ def test_common_metrics(aggregator, integration_check, pg_instance, is_aurora): check_stat_replication_no_slot(aggregator, expected_tags=expected_tags) if is_aurora is False: check_wal_receiver_metrics(aggregator, expected_tags=expected_tags, connected=0) - check_file_wal_metrics(aggregator, expected_tags=expected_tags) check_stat_wal_metrics(aggregator, expected_tags=expected_tags) + if float(POSTGRES_VERSION) >= 10.0: + check_file_wal_metrics(aggregator, expected_tags=expected_tags) check_uptime_metrics(aggregator, expected_tags=expected_tags) check_logical_replication_slots(aggregator, expected_tags) @@ -605,6 +605,7 @@ def test_query_timeout(integration_check, pg_instance): cursor.execute("select pg_sleep(2000)") +@pytest.mark.flaky(max_runs=10) def test_pg_control(aggregator, integration_check, pg_instance): check = integration_check(pg_instance) check.run() @@ -677,12 +678,20 @@ def test_config_tags_is_unchanged_between_checks(integration_check, pg_instance) check = integration_check(pg_instance) # Put elements in set as we don't care about order, only elements equality - expected_tags = set( - _get_expected_tags(check, pg_instance, db=DB_NAME, with_version=False, with_sys_id=False, role=None) - ) + expected_tags = _get_expected_tags(check, pg_instance, db=DB_NAME, with_version=False, with_sys_id=False, role=None) + # Remove tags from expected tags that are set later by the check + expected_tags = [ + tag + for tag in expected_tags + if not tag.startswith('database_instance:') + and not tag.startswith('database_hostname:') + and not tag.startswith('ddagenthostname:') + and not tag.startswith('dd.internal') + ] + for _ in range(3): check.run() - assert set(check._config.tags) == expected_tags + assert set(check._config.tags) == set(expected_tags) @mock.patch.dict('os.environ', {'DDEV_SKIP_GENERIC_TAGS_CHECK': 'true'}) @@ -701,7 +710,6 @@ def test_correct_hostname(dbm_enabled, reported_hostname, expected_hostname, agg pg_instance['query_samples'] = {'enabled': False} pg_instance['query_activity'] = {'enabled': False} pg_instance['query_metrics'] = {'enabled': False} - pg_instance['collect_resources'] = {'enabled': False} pg_instance['disable_generic_tags'] = False # This flag also affects the hostname pg_instance['reported_hostname'] = reported_hostname @@ -749,9 +757,7 @@ def test_correct_hostname(dbm_enabled, reported_hostname, expected_hostname, agg ) def test_database_instance_metadata(aggregator, pg_instance, dbm_enabled, reported_hostname): pg_instance['dbm'] = dbm_enabled - # this will block on cancel and wait for the coll interval of 600 seconds, - # unless the collection_interval is set to a short amount of time - pg_instance['collect_resources'] = {'collection_interval': 0.1} + pg_instance['collect_settings'] = {'collection_interval': 1, 'run_sync': True} expected_database_hostname = expected_database_instance = expected_host = "stubbed.hostname" if reported_hostname: @@ -808,7 +814,7 @@ def test_database_instance_metadata(aggregator, pg_instance, dbm_enabled, report }, None, None, - False, + None, ), ( { @@ -817,7 +823,7 @@ def test_database_instance_metadata(aggregator, pg_instance, dbm_enabled, report }, None, None, - False, + None, ), ( { @@ -825,7 +831,7 @@ def test_database_instance_metadata(aggregator, pg_instance, dbm_enabled, report }, None, None, - False, + None, ), ( { @@ -864,17 +870,16 @@ def test_database_instance_cloud_metadata_aws( if expected_managed_auth_enabled: assert mocked_generate_rds_iam_token.called - if not expected_error == ConfigurationError: - # we only assert the check ran if we don't expect a ConfigurationError - assert check.cloud_metadata['aws']['managed_authentication']['enabled'] == expected_managed_auth_enabled + # we only assert the check ran if we don't expect a ConfigurationError + assert check.cloud_metadata['aws']['managed_authentication']['enabled'] == expected_managed_auth_enabled - role = None if expected_error else 'master' - expected_tags = _get_expected_tags(check, pg_instance, with_db=True, role=role) - if "instance_endpoint" in aws_metadata: - expected_tags.append("dd.internal.resource:aws_rds_instance:{}".format(aws_metadata["instance_endpoint"])) + role = None if expected_error else 'master' + expected_tags = _get_expected_tags(check, pg_instance, with_db=True, role=role) + if "instance_endpoint" in aws_metadata: + expected_tags.append("dd.internal.resource:aws_rds_instance:{}".format(aws_metadata["instance_endpoint"])) - status = check.CRITICAL if expected_error else check.OK - aggregator.assert_service_check(check.SERVICE_CHECK_NAME, status=status, tags=expected_tags) + status = check.CRITICAL if expected_error else check.OK + aggregator.assert_service_check(check.SERVICE_CHECK_NAME, status=status, tags=expected_tags) @pytest.mark.parametrize( @@ -888,7 +893,7 @@ def test_database_instance_cloud_metadata_aws( None, None, None, - False, + None, ), ( { @@ -957,29 +962,19 @@ def test_database_instance_cloud_metadata_azure( if expected_managed_auth_enabled: assert generate_managed_identity_token.called - if not expected_error == ConfigurationError: - # we only assert the check ran if we don't expect a ConfigurationError - assert check.cloud_metadata['azure']['managed_authentication']['enabled'] == expected_managed_auth_enabled - - role = None if expected_error else 'master' - expected_tags = _get_expected_tags(check, pg_instance, with_db=True, role=role) - if "fully_qualified_domain_name" in azure_metadata: - expected_tags.append( - "dd.internal.resource:azure_postgresql_flexible_server:{}".format( - azure_metadata["fully_qualified_domain_name"] - ) - ) + assert check.cloud_metadata['azure']['managed_authentication']['enabled'] == expected_managed_auth_enabled - status = check.CRITICAL if expected_error else check.OK - aggregator.assert_service_check(check.SERVICE_CHECK_NAME, status=status, tags=expected_tags) + role = None if expected_error else 'master' + expected_tags = _get_expected_tags(check, pg_instance, with_db=True, role=role) + if "fully_qualified_domain_name" in azure_metadata: + expected_tags.append( + "dd.internal.resource:azure_postgresql_flexible_server:{}".format( + azure_metadata["fully_qualified_domain_name"] + ) + ) - if managed_identity: - assert check.warnings == [ - ( - 'DEPRECATION NOTICE: The managed_identity option is deprecated and will be removed ' - 'in a future version. Please use the new azure.managed_authentication option instead.' - ) - ] + status = check.CRITICAL if expected_error else check.OK + aggregator.assert_service_check(check.SERVICE_CHECK_NAME, status=status, tags=expected_tags) def assert_state_clean(check): @@ -1074,8 +1069,8 @@ def test_propagate_agent_tags( agent_tags = ["my-env:test-env", "random:tag", "bar:foo"] with mock.patch('datadog_checks.postgres.config.get_agent_host_tags', return_value=agent_tags): - check = integration_check(pg_instance, init_config) - assert check._config._should_propagate_agent_tags(pg_instance, init_config) == should_propagate_agent_tags + check = integration_check(instance=pg_instance, init_config=init_config) + assert check._config.propagate_agent_tags == should_propagate_agent_tags if should_propagate_agent_tags: assert all(tag in check.tags for tag in agent_tags) check.run() @@ -1094,7 +1089,7 @@ def test_pg_stat_io_metrics(aggregator, integration_check, pg_instance, dbm_enab pg_instance['dbm'] = dbm_enabled # this will block on cancel and wait for the coll interval of 600 seconds, # unless the collection_interval is set to a short amount of time - pg_instance['collect_resources'] = {'collection_interval': 0.1} + pg_instance['collect_settings'] = {'collection_interval': 0.1} check = integration_check(pg_instance) run_one_check(check) diff --git a/postgres/tests/test_relations.py b/postgres/tests/test_relations.py index fefa3d6f7ba9c..327c5d0e25343 100644 --- a/postgres/tests/test_relations.py +++ b/postgres/tests/test_relations.py @@ -7,7 +7,6 @@ import psycopg import pytest -from datadog_checks.base import ConfigurationError from datadog_checks.postgres.relationsmanager import ( QUERY_PG_CLASS, QUERY_PG_CLASS_SIZE, @@ -530,21 +529,3 @@ def test_relations_validation_accepts_list_of_str_and_dict(): {"relation_name": "person", "schemas": ["foo"]}, ] ) - - -@pytest.mark.unit -def test_relations_validation_fails_if_no_relname_or_regex(): - with pytest.raises(ConfigurationError): - RelationsManager.validate_relations_config([{"relkind": ["i"]}]) - - -@pytest.mark.unit -def test_relations_validation_fails_if_schemas_is_wrong_type(): - with pytest.raises(ConfigurationError): - RelationsManager.validate_relations_config([{"relation_name": "person", "schemas": "foo"}]) - - -@pytest.mark.unit -def test_relations_validation_fails_if_relkind_is_wrong_type(): - with pytest.raises(ConfigurationError): - RelationsManager.validate_relations_config([{"relation_name": "person", "relkind": "foo"}]) diff --git a/postgres/tests/test_statements.py b/postgres/tests/test_statements.py index 2569e92f805d0..b76bf0b58a7a8 100644 --- a/postgres/tests/test_statements.py +++ b/postgres/tests/test_statements.py @@ -19,7 +19,8 @@ from datadog_checks.base.utils.db.utils import DBMAsyncJob from datadog_checks.base.utils.serialization import json from datadog_checks.base.utils.time import UTC -from datadog_checks.postgres.config import PostgresConfig +from datadog_checks.postgres.config import build_config +from datadog_checks.postgres.postgres import PostgreSql from datadog_checks.postgres.statement_samples import ( DBExplainError, StatementTruncationState, @@ -68,8 +69,6 @@ (USER_ADMIN, PASSWORD_ADMIN, "dogs", "SELECT * FROM breed WHERE name = %s", "Labrador"), ] -dbm_enabled_keys = ["dbm", "deep_database_monitoring"] - @pytest.fixture(autouse=True) def stop_orphaned_threads(): @@ -78,17 +77,6 @@ def stop_orphaned_threads(): DBMAsyncJob.executor = ThreadPoolExecutor() -@pytest.mark.parametrize("dbm_enabled_key", dbm_enabled_keys) -@pytest.mark.parametrize("dbm_enabled", [True, False]) -def test_dbm_enabled_config(integration_check, dbm_instance, dbm_enabled_key, dbm_enabled): - # test to make sure we continue to support the old key - for k in dbm_enabled_keys: - dbm_instance.pop(k, None) - dbm_instance[dbm_enabled_key] = dbm_enabled - check = integration_check(dbm_instance) - assert check._config.dbm_enabled == dbm_enabled - - @requires_over_10 def test_statement_metrics_multiple_pgss_rows_single_query_signature( aggregator, @@ -136,8 +124,6 @@ def _run_query(idx): connections[dbname].cursor().execute(query, args) - check = integration_check(dbm_instance) - check._connect() # Execute the query with the mocked obfuscate_sql. The result should produce an event payload with the metadata. with mock.patch.object(datadog_agent, 'obfuscate_sql', passthrough=True) as mock_agent: mock_agent.side_effect = obfuscate_sql @@ -150,6 +136,7 @@ def _run_query(idx): _run_query(1) _run_query(0) + run_one_check(check, cancel=False) # Call one query @@ -323,7 +310,7 @@ def _should_catch_query(dbname): fqt_events = [e for e in dbm_samples if e.get('dbm_type') == 'fqt'] assert len(fqt_events) > 0 matching = [e for e in fqt_events if e['db']['query_signature'] == query_signature] - assert len(matching) == 1 + assert len(matching) >= 1 fqt_event = matching[0] assert fqt_event['ddagentversion'] == datadog_agent.get_version() assert fqt_event['ddsource'] == "postgres" @@ -341,118 +328,6 @@ def _should_catch_query(dbname): conn.close() -@pytest.mark.parametrize( - "input_cloud_metadata,output_cloud_metadata", - [ - ({}, {}), - ( - { - 'azure': { - 'deployment_type': 'flexible_server', - 'name': 'test-server.database.windows.net', - }, - }, - { - 'azure': { - 'deployment_type': 'flexible_server', - 'name': 'test-server.database.windows.net', - 'managed_authentication': {'enabled': False}, - }, - }, - ), - ( - { - 'azure': { - 'deployment_type': 'flexible_server', - 'fully_qualified_domain_name': 'test-server.database.windows.net', - }, - }, - { - 'azure': { - 'deployment_type': 'flexible_server', - 'name': 'test-server.database.windows.net', - 'managed_authentication': {'enabled': False}, - }, - }, - ), - ( - { - 'aws': { - 'instance_endpoint': 'foo.aws.com', - }, - 'azure': { - 'deployment_type': 'flexible_server', - 'name': 'test-server.database.windows.net', - }, - }, - { - 'aws': {'instance_endpoint': 'foo.aws.com', 'managed_authentication': {'enabled': False}}, - 'azure': { - 'deployment_type': 'flexible_server', - 'name': 'test-server.database.windows.net', - 'managed_authentication': {'enabled': False}, - }, - }, - ), - ( - { - 'gcp': { - 'project_id': 'foo-project', - 'instance_id': 'bar', - 'extra_field': 'included', - }, - }, - { - 'gcp': { - 'project_id': 'foo-project', - 'instance_id': 'bar', - 'extra_field': 'included', - }, - }, - ), - ], -) -def test_statement_metrics_cloud_metadata( - aggregator, integration_check, dbm_instance, input_cloud_metadata, output_cloud_metadata, datadog_agent -): - dbm_instance['pg_stat_statements_view'] = "pg_stat_statements" - # don't need samples for this test - dbm_instance['query_samples'] = {'enabled': False} - dbm_instance['query_activity'] = {'enabled': False} - if input_cloud_metadata: - for k, v in input_cloud_metadata.items(): - dbm_instance[k] = v - connections = {} - - def _run_queries(): - for user, password, dbname, query, arg in SAMPLE_QUERIES: - if dbname not in connections: - connections[dbname] = psycopg.connect(host=HOST, dbname=dbname, user=user, password=password) - connections[dbname].cursor().execute(query, (arg,)) - - check = integration_check(dbm_instance) - check._connect() - - _run_queries() - run_one_check(check, cancel=False) - _run_queries() - run_one_check(check) - - events = aggregator.get_event_platform_events("dbm-metrics") - assert len(events) == 1, "should capture exactly one metrics payload" - event = events[0] - - assert event['host'] == 'stubbed.hostname' - assert event['timestamp'] > 0 - assert event['ddagentversion'] == datadog_agent.get_version() - assert event['ddagenthostname'] == datadog_agent.get_hostname() - assert event['min_collection_interval'] == dbm_instance['query_metrics']['collection_interval'] - assert event['cloud_metadata'] == output_cloud_metadata, "wrong cloud_metadata" - - for conn in connections.values(): - conn.close() - - @requires_over_13 def test_wal_metrics(aggregator, integration_check, dbm_instance): dbm_instance['pg_stat_statements_view'] = "pg_stat_statements" @@ -545,11 +420,11 @@ def dbm_instance(pg_instance): pg_instance['pg_stat_activity_view'] = "datadog.pg_stat_activity()" pg_instance['query_samples'] = {'enabled': True, 'run_sync': True, 'collection_interval': 0.2} pg_instance['query_activity'] = {'enabled': True, 'collection_interval': 0.2} + pg_instance['collect_settings'] = {'enabled': False} # Set collection_interval close to 0. This is needed if the test runs the check multiple times. # This prevents DBMAsync from skipping job executions, as it is designed # to not execute jobs more frequently than their collection period. pg_instance['query_metrics'] = {'enabled': True, 'run_sync': True, 'collection_interval': CLOSE_TO_ZERO_INTERVAL} - pg_instance['collect_resources'] = {'enabled': False} return pg_instance @@ -562,7 +437,6 @@ def dbm_instance_replica2(pg_instance): pg_instance['query_samples'] = {'enabled': True, 'run_sync': True, 'collection_interval': 1} pg_instance['query_activity'] = {'enabled': True, 'collection_interval': 1} pg_instance['query_metrics'] = {'enabled': True, 'run_sync': True, 'collection_interval': 0.2} - pg_instance['collect_resources'] = {'enabled': False} return pg_instance @@ -1149,7 +1023,7 @@ def test_activity_snapshot_collection( dbm_instance['pg_stat_activity_view'] = pg_stat_activity_view # No need for query metrics here dbm_instance['query_metrics']['enabled'] = False - dbm_instance['collect_resources']['enabled'] = False + dbm_instance['query_samples']['enabled'] = False check = integration_check(dbm_instance) check._connect() @@ -1277,7 +1151,6 @@ def test_activity_raw_statement_collection(aggregator, integration_check, dbm_in dbm_instance['dbstrict'] = True dbm_instance['dbname'] = "datadog_test" dbm_instance['query_metrics']['enabled'] = False - dbm_instance['collect_resources']['enabled'] = False dbm_instance['collect_raw_query_statement'] = {'enabled': True} check = integration_check(dbm_instance) check._connect() @@ -1773,7 +1646,6 @@ def test_disabled_activity_or_explain_plans( dbm_instance['query_activity']['enabled'] = query_activity_enabled dbm_instance['query_samples']['enabled'] = query_samples_enabled dbm_instance['query_metrics']['enabled'] = False - dbm_instance['collect_resources']['enabled'] = False check = integration_check(dbm_instance) check._connect() @@ -1855,23 +1727,6 @@ def test_statement_samples_invalid_activity_view(aggregator, integration_check, assert "code=undefined-pg-stat-activity-view dbname=datadog_test host=stubbed.hostname" in check.warnings[0] -@pytest.mark.parametrize( - "number_key", - [ - "explained_queries_cache_maxsize", - "explained_queries_per_hour_per_query", - "seen_samples_cache_maxsize", - "collection_interval", - ], -) -def test_statement_samples_config_invalid_number(integration_check, pg_instance, number_key): - pg_instance['query_samples'] = { - number_key: "not-a-number", - } - with pytest.raises(ValueError): - integration_check(pg_instance) - - @pytest.mark.parametrize( "error,metric_columns,expected_error_tag,expected_warnings", [ @@ -1982,7 +1837,7 @@ def test_statement_metrics_database_extension_errors( 'this warning. See https://docs.datadoghq.com/database_monitoring/setup_postgres/troubleshooting#' 'high-pg-stat-statements-max-configuration for more details\n' 'code=high-pg-stat-statements-max-configuration dbname=datadog_test host=stubbed.hostname ' - 'threshold=9999 value=10000', + 'threshold=9999.0 value=10000', ], ), (10000, []), @@ -2116,9 +1971,12 @@ def _run_queries(): conn.close() -@pytest.mark.unit +# Even though this test is a unit test we leave it unmarked because loading this file loads the fixture +# that requires booting up the database and makes it very slow to run compared to other unit tests def test_get_query_metrics_payload_rows(): - config = PostgresConfig({"host": "host", "username": "user"}, {}, None) + check = PostgreSql('postgres', {}, [{"host": "host", "username": "user"}]) + check.warning = print + config, _ = build_config(check=check) statement_metrics = PostgresStatementMetrics({}, config) wrapper = {} diff --git a/postgres/tests/test_unit.py b/postgres/tests/test_unit.py index a4b9d1c6bb88b..2e52b32a6f4df 100644 --- a/postgres/tests/test_unit.py +++ b/postgres/tests/test_unit.py @@ -74,6 +74,8 @@ def test_get_instance_with_default(pg_instance, collect_default_database): Test the contents of the query string with different `collect_default_database` values """ pg_instance['collect_default_database'] = collect_default_database + if not collect_default_database: + pg_instance['ignore_databases'] = ['postgres'] check = PostgreSql('postgres', {}, [pg_instance]) check.version = VersionInfo(9, 2, 0) res = check.metrics_cache.get_instance_metrics(check.version) diff --git a/postgres/tests/utils.py b/postgres/tests/utils.py index afc47ec52579e..cd067952d0bba 100644 --- a/postgres/tests/utils.py +++ b/postgres/tests/utils.py @@ -7,6 +7,8 @@ import psycopg import pytest +from datadog_checks.base import AgentCheck + from .common import PASSWORD_ADMIN, POSTGRES_VERSION, USER_ADMIN requires_over_10 = pytest.mark.skipif( @@ -131,7 +133,7 @@ def run_vacuum_thread(pg_instance, vacuum_query, application_name='test'): return run_query_thread(pg_instance, vacuum_query, application_name, init_stmts) -def run_one_check(check, cancel=True): +def run_one_check(check: AgentCheck, cancel=True): """ Run check and immediately cancel. Waits for all threads to close before continuing. diff --git a/postmark/README.md b/postmark/README.md index 131076ec88bf6..e49eebfece015 100644 --- a/postmark/README.md +++ b/postmark/README.md @@ -6,6 +6,8 @@ To gain insights into Postmark's broadcast and transactional message streams, integrate Postmark with Datadog using [webhooks][2]. +**Minimum Agent version:** 7.58.0 + ## Setup Follow the instructions below to configure this integration for your Postmark account. diff --git a/powerdns_recursor/README.md b/powerdns_recursor/README.md index 0065c8e025a25..41a363919a7e2 100644 --- a/powerdns_recursor/README.md +++ b/powerdns_recursor/README.md @@ -12,6 +12,8 @@ Track the performance of your PowerDNS Recursor and monitor strange or worrisome And many more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/presto/README.md b/presto/README.md index 230359aa3b106..2fcccc8cc3bd2 100644 --- a/presto/README.md +++ b/presto/README.md @@ -7,6 +7,8 @@ This check collects [Presto][1] metrics, for example: - Overall activity metrics: completed/failed queries, data input/output size, execution time. - Performance metrics: cluster memory, input CPU, execution CPU time. +**Minimum Agent version:** 6.11.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/process/README.md b/process/README.md index 21b15acdde993..df045bcb4d9e4 100644 --- a/process/README.md +++ b/process/README.md @@ -6,6 +6,8 @@ The Process Check lets you: - Collect resource usage metrics for specific running processes on any host. For example, CPU, memory, I/O, and number of threads. - Use [Process Monitors][1] to configure thresholds for how many instances of a specific process should be running and get alerts when the thresholds aren't met (see **Service Checks** below). +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/proofpoint_on_demand/README.md b/proofpoint_on_demand/README.md index 08a0c8721d3dc..5fad81c90efce 100644 --- a/proofpoint_on_demand/README.md +++ b/proofpoint_on_demand/README.md @@ -10,6 +10,8 @@ This integration ingests the following logs: This integration collects message logs and send them to Datadog for analysis. The logs are parsed and enriched using Datadog's built-in pipeline, which allows for searching and analysis. Dashboards and Cloud SIEM detection rules are included to help monitor message logs and improve security. +**Minimum Agent version:** 7.67.1 + ## Setup ### Get an API key from the Proofpoint On-Demand Portal diff --git a/proofpoint_tap/README.md b/proofpoint_tap/README.md index efc0898cabb33..1c0c7d00df472 100644 --- a/proofpoint_tap/README.md +++ b/proofpoint_tap/README.md @@ -9,6 +9,8 @@ This integration ingests the following logs: This integration gathers and forwards above mentioned events to Datadog for seamless analysis. Datadog uses its built-in log pipelines to parse and enrich these logs, facilitating easy search and detailed insights. With preconfigured dashboards, the integration offers clear visibility into activities within the Proofpoint TAP platform. Additionally, it includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.67.1 + ## Setup ### Generate Service Credentials in Proofpoint TAP diff --git a/proxmox/README.md b/proxmox/README.md index f153d084cb5fe..8b70e410d5dd9 100644 --- a/proxmox/README.md +++ b/proxmox/README.md @@ -4,6 +4,8 @@ This check monitors [Proxmox][1] through the Datadog Agent. Proxmox is an open-source server management platform. It supports running both VMs and containers. The Proxmox integration collects data about your Proxmox cluster including the status and performance of nodes, VMs, containers, and more. +**Minimum Agent version:** 7.69.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/proxysql/README.md b/proxysql/README.md index 08c5083e3f26d..55d38a4a94150 100644 --- a/proxysql/README.md +++ b/proxysql/README.md @@ -4,6 +4,8 @@ This check monitors [ProxySQL][1] through the Datadog Agent. +**Minimum Agent version:** 7.19.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/pulsar/README.md b/pulsar/README.md index 8dff4148d3077..f356df0cca5c4 100644 --- a/pulsar/README.md +++ b/pulsar/README.md @@ -4,6 +4,8 @@ This check monitors [Pulsar][1] through the Datadog Agent. +**Minimum Agent version:** 7.34.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/quarkus/README.md b/quarkus/README.md index 7232ccdc8910f..504e8af6a0e05 100644 --- a/quarkus/README.md +++ b/quarkus/README.md @@ -4,6 +4,8 @@ This check monitors [Quarkus][1] through the Datadog Agent. +**Minimum Agent version:** 7.62.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/rabbitmq/README.md b/rabbitmq/README.md index b4cd947ce8841..53ebced84c473 100644 --- a/rabbitmq/README.md +++ b/rabbitmq/README.md @@ -12,6 +12,8 @@ This check monitors [RabbitMQ][2] through the Datadog Agent. It allows you to: Consider [Data Streams Monitoring][24] to enhance your RabbitMQ integration. This solution enables pipeline visualization and lag tracking, helping you identify and resolve bottlenecks. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/ray/README.md b/ray/README.md index 5153a83849505..540f791a597e5 100644 --- a/ray/README.md +++ b/ray/README.md @@ -4,6 +4,8 @@ This check monitors [Ray][1] through the Datadog Agent. Ray is an open-source unified compute framework that makes it easy to scale AI and Python workloads, from reinforcement learning to deep learning to tuning, and model serving. +**Minimum Agent version:** 7.48.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/redisdb/README.md b/redisdb/README.md index 1a0f19839cc4c..c570c2f05d180 100644 --- a/redisdb/README.md +++ b/redisdb/README.md @@ -12,6 +12,8 @@ Whether you use Redis as a database, cache, or message queue, this integration t - Expired and evicted keys - and many more +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/rethinkdb/README.md b/rethinkdb/README.md index b98b033f639e3..d625124d5f3db 100644 --- a/rethinkdb/README.md +++ b/rethinkdb/README.md @@ -10,6 +10,8 @@ data availability, cluster configuration, and more. **Note**: this integration is compatible with RethinkDB **version 2.3.6 and above**. +**Minimum Agent version:** 7.19.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For diff --git a/riak/README.md b/riak/README.md index 50d6743aa56f9..e6cbec03f6acc 100644 --- a/riak/README.md +++ b/riak/README.md @@ -6,6 +6,8 @@ This check lets you track node, vnode, and ring performance metrics from RiakKV or RiakTS. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/riakcs/README.md b/riakcs/README.md index 8befa52188745..7a31e8a167617 100644 --- a/riakcs/README.md +++ b/riakcs/README.md @@ -9,6 +9,8 @@ Capture RiakCS metrics in Datadog to: - Visualize key RiakCS metrics. - Correlate RiakCS performance with the rest of your applications. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/ringcentral/README.md b/ringcentral/README.md index dd018aae5128f..06b229389aa9d 100644 --- a/ringcentral/README.md +++ b/ringcentral/README.md @@ -6,6 +6,8 @@ The RingCentral integration collects voice and audit logs, as well as Voice (Analytics) and A2P SMS metrics, and sends them to Datadog for comprehensive analysis. +**Minimum Agent version:** 7.56.0 + ## Setup ### Generate API Credentials in RingCentral diff --git a/sanity/README.md b/sanity/README.md index 0542ce97bd082..df2c80e0f0e96 100644 --- a/sanity/README.md +++ b/sanity/README.md @@ -6,6 +6,8 @@ Integrate Sanity with Datadog to gain insights into content and project-related activity logs through the Sanity API and GROQ-powered Webhook. Pre-built dashboard visualizations provide immediate insights into Sanity activity logs. +**Minimum Agent version:** 7.61.0 + ## Setup ### Generate API Token in Sanity diff --git a/sap_hana/README.md b/sap_hana/README.md index 55ff7c04a353b..522116b084fa7 100644 --- a/sap_hana/README.md +++ b/sap_hana/README.md @@ -4,6 +4,8 @@ This check monitors [SAP HANA][1] 2.0, SPS 2 through the Datadog Agent. +**Minimum Agent version:** 7.16.1 + ## Setup ### Installation diff --git a/scylla/README.md b/scylla/README.md index 748c208778cd3..d01d1f4d0fa88 100644 --- a/scylla/README.md +++ b/scylla/README.md @@ -6,6 +6,8 @@ This Datadog-[Scylla][1] integration collects a majority of the exposed metrics Scylla is an open-source NoSQL data store that can act as "a drop-in Apache Cassandra alternative." It has rearchitected the Cassandra model tuned for modern hardware, reducing the size of required clusters while improving theoretical throughput and performance. +**Minimum Agent version:** 7.17.2 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. diff --git a/shopify/README.md b/shopify/README.md index 3d11539d8af42..b11b2fbec0c43 100644 --- a/shopify/README.md +++ b/shopify/README.md @@ -8,6 +8,8 @@ The Shopify Integration collects Event, Product, Customer, and Order logs, sendi It includes dashboards that show and analyze logs, making it easier to monitor and understand patterns. +**Minimum Agent version:** 7.57.2 + ## Setup ### Generate API credentials in Shopify diff --git a/sidekiq/README.md b/sidekiq/README.md index df3c66d086567..f451949fee5d4 100644 --- a/sidekiq/README.md +++ b/sidekiq/README.md @@ -6,6 +6,8 @@ This integration monitors [Sidekiq][1] through [Dogstatsd][2]. It collects metri **Note** Only Sidekiq Pro (>= 3.6) or Enterprise (>= 1.1.0) users can collect metrics. +**Minimum Agent version:** 7.19.0 + ## Setup ### Installation diff --git a/silk/README.md b/silk/README.md index adbd6b1c15da1..244ff7707b861 100644 --- a/silk/README.md +++ b/silk/README.md @@ -4,6 +4,8 @@ This check monitors [Silk][1] through the Datadog Agent. +**Minimum Agent version:** 7.34.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/silverstripe_cms/README.md b/silverstripe_cms/README.md index 77c426e910e2d..cdc5cd42f1ea3 100644 --- a/silverstripe_cms/README.md +++ b/silverstripe_cms/README.md @@ -6,6 +6,8 @@ Silverstripe CMS is an open-source platform for creating and managing websites a The SilverStripe CMS integration collects metrics for files, pages, and failed login attempts, and sends them to Datadog for analysis and monitoring. +**Minimum Agent version:** 7.65.0 + ## Setup ### Installation diff --git a/singlestore/README.md b/singlestore/README.md index c3148200f26b9..fdd34738e562d 100644 --- a/singlestore/README.md +++ b/singlestore/README.md @@ -9,6 +9,8 @@ This check monitors [SingleStore][1] through the Datadog Agent. SingleStore offe - Improve resource utilization efficiency. +**Minimum Agent version:** 7.32.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/slurm/README.md b/slurm/README.md index ffb1097b20e02..1a32a36d3fad3 100644 --- a/slurm/README.md +++ b/slurm/README.md @@ -10,6 +10,8 @@ The check collects metrics from the head node (`slurmctld`) by executing and par On worker nodes, the check can also collect metrics using [`scontrol`][13], which provides process IDs (PIDs) and other job information that is not available through the head node. +**Minimum Agent version:** 7.59.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. Since the Agent requires direct access to the various Slurm binaries, monitoring Slurm in containerized environments is not recommended. diff --git a/snmp/README.md b/snmp/README.md index bf5d559c3a0f4..d837e03e4d19d 100644 --- a/snmp/README.md +++ b/snmp/README.md @@ -11,6 +11,8 @@ A MIB (Management Information Base) acts as a translator between OIDs and human * `1.3.6.1.1`: (MIB-II) A standard that holds system information like uptime, interfaces, and network stack. * `1.3.6.1.4.1`: A standard that holds vendor specific information. +**Minimum Agent version:** 6.0.0 + ## Setup To install and configure the SNMP integration, see the [Network Device Monitoring][1] documentation. diff --git a/snowflake/README.md b/snowflake/README.md index 76dc715b326f1..4071e1df3bbdb 100644 --- a/snowflake/README.md +++ b/snowflake/README.md @@ -10,6 +10,8 @@ Note: This integration is now deprecated and replaced by the new API-based integ
Note: Metrics are collected with queries to Snowflake. Queries made by the Datadog integration are billable by Snowflake.
+**Minimum Agent version:** 7.23.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. diff --git a/solarwinds/README.md b/solarwinds/README.md index 9b009b79acd62..ce5d369062e6d 100644 --- a/solarwinds/README.md +++ b/solarwinds/README.md @@ -4,6 +4,8 @@ Get alerts from SolarWinds Orion to aggregate and triage your alerts in a centra This integration works by subscribing Datadog to all of your SolarWinds alert notifications. +**Minimum Agent version:** 7.67.0 + ## Setup ### Create trigger actions diff --git a/solr/README.md b/solr/README.md index ca135c475de3b..e90340f838a02 100644 --- a/solr/README.md +++ b/solr/README.md @@ -6,6 +6,8 @@ The Solr check tracks the state and performance of a Solr cluster. It collects metrics for the number of documents indexed, cache hits and evictions, average request times, average requests per second, and more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/sonarqube/README.md b/sonarqube/README.md index 609e6cf4336eb..73a480db66133 100644 --- a/sonarqube/README.md +++ b/sonarqube/README.md @@ -4,6 +4,8 @@ This check monitors [SonarQube][1]. +**Minimum Agent version:** 7.24.0 + ## Setup ### Installation diff --git a/sonatype_nexus/README.md b/sonatype_nexus/README.md index 3fd1c176b0cb5..3e9753f6e84f3 100644 --- a/sonatype_nexus/README.md +++ b/sonatype_nexus/README.md @@ -4,6 +4,8 @@ Sonatype Nexus is a popular repository management solution designed for managing The Sonatype Nexus integration collects analytics and instance health status metrics from Sonatype Nexus and sends them to Datadog for comprehensive analysis. +**Minimum Agent version:** 7.64.0 + ## Setup ### Installation diff --git a/sonicwall_firewall/README.md b/sonicwall_firewall/README.md index d3df0d2e64f7f..d2b3c90e1e48d 100644 --- a/sonicwall_firewall/README.md +++ b/sonicwall_firewall/README.md @@ -5,6 +5,8 @@ This integration provides enrichment and visualization for all log types shared by SonicWall Firewall over syslog. Detailed insights into the logs received by syslog are visualized in out-of-the-box dashboards and detection rules. +**Minimum Agent version:** 7.61.0 + ## Setup ### Installation diff --git a/sophos_central_cloud/README.md b/sophos_central_cloud/README.md index 7fa8bbc873b50..9145c39b2b724 100644 --- a/sophos_central_cloud/README.md +++ b/sophos_central_cloud/README.md @@ -11,6 +11,8 @@ This integration ingests the following logs: The Sophos Central Cloud integration seamlessly collects all the above listed logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into alerts and events through the out-of-the-box dashboards. Additionally, the integration enriches corresponding endpoint details along with alert and event logs through the **get_endpoint_details** flag. +**Minimum Agent version:** 7.55.0 + ## Setup ### Generate API credentials in Sophos Central Cloud diff --git a/spark/README.md b/spark/README.md index 1213f38b41bb1..b638ca23c894b 100644 --- a/spark/README.md +++ b/spark/README.md @@ -16,6 +16,8 @@ This check monitors [Spark][2] through the Datadog Agent. Collect Spark metrics - Tasks: number of tasks active, skipped, failed, and total. - Job state: number of jobs active, completed, skipped, and failed. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/sqlserver/README.md b/sqlserver/README.md index 0d17494ad7410..6b0f2b9c81bde 100644 --- a/sqlserver/README.md +++ b/sqlserver/README.md @@ -10,6 +10,8 @@ Enable [Database Monitoring](https://docs.datadoghq.com/database_monitoring/) (D SQL Server 2012, 2014, 2016, 2017, 2019, and 2022 are supported. +**Minimum Agent version:** 6.0.0 + ## Setup
This page describes the SQL Server Agent standard integration. If you are looking for the Database Monitoring product for SQL Server, see Datadog Database Monitoring.
diff --git a/sqlserver/changelog.d/21319.fixed b/sqlserver/changelog.d/21319.fixed new file mode 100644 index 0000000000000..c338098cbb8ab --- /dev/null +++ b/sqlserver/changelog.d/21319.fixed @@ -0,0 +1 @@ +Compile and reuse connection error regex patterns diff --git a/sqlserver/datadog_checks/sqlserver/connection_errors.py b/sqlserver/datadog_checks/sqlserver/connection_errors.py index 1db2d14963ff3..57ea924fc778b 100644 --- a/sqlserver/datadog_checks/sqlserver/connection_errors.py +++ b/sqlserver/datadog_checks/sqlserver/connection_errors.py @@ -40,21 +40,33 @@ class ConnectionErrorCode(Enum): # Connection error messages, which we expect to get from an ADO provider or # ODBC. These drivers can have inconsistent error codes across versions, so regex on # the known error messages -known_error_patterns = { +KNOWN_ERROR_PATTERNS = { # typically results in an -2147467259 ADO error code, which is not very descriptive. Identifying this error # can help provide specific troubleshooting help to the customer - "(certificate verify failed|" - "certificate chain was issued by an authority that is not trusted)": ConnectionErrorCode.certificate_verify_failed, + re.compile( + "(certificate verify failed|certificate chain was issued by an authority that is not trusted)", re.IGNORECASE + ): ConnectionErrorCode.certificate_verify_failed, # DSN could be specified incorrectly in config - "data source name not found.* and no default driver specified": ConnectionErrorCode.driver_not_found, + re.compile( + "data source name not found.* and no default driver specified", re.IGNORECASE + ): ConnectionErrorCode.driver_not_found, # driver not installed on host - "(can't open lib .* file not found|Provider cannot be found)": ConnectionErrorCode.driver_not_found, + re.compile( + "(can't open lib .* file not found|Provider cannot be found)", re.IGNORECASE + ): ConnectionErrorCode.driver_not_found, # Connection & login issues - "(cannot open database .* requested by the login|login timeout expired)": ConnectionErrorCode.tcp_connection_failed, - "(login failed for user|The login is from an untrusted domain)": ConnectionErrorCode.login_failed_for_user, - "ssl security error": ConnectionErrorCode.ssl_security_error, + re.compile( + "(cannot open database .* requested by the login|login timeout expired)", re.IGNORECASE + ): ConnectionErrorCode.tcp_connection_failed, + re.compile( + "(login failed for user|The login is from an untrusted domain)", re.IGNORECASE + ): ConnectionErrorCode.login_failed_for_user, + re.compile("ssl security error", re.IGNORECASE): ConnectionErrorCode.ssl_security_error, } +# Pre-compiled regex pattern for password obfuscation +PASSWORD_OBFUSCATION_PATTERN = re.compile(r"(?i)(Password=)([^;]+)") + # ADO provider connection errors yield a hresult code, which # can be mapped to helpful err messages known_hresult_codes = { @@ -132,9 +144,9 @@ def _get_is_odbc_driver_installed(configured_driver): def _lookup_conn_error_and_msg(hresult, msg): - for k in known_error_patterns.keys(): - if re.search(k, msg, re.IGNORECASE): - return None, known_error_patterns[k] + for compiled_pattern, error_code in KNOWN_ERROR_PATTERNS.items(): + if compiled_pattern.search(msg): + return None, error_code # if we cannot determine the type or error based on the msg, try to look it up by its hresult # this will be true for error messages like 'Invalid connection string attribute' if hresult: @@ -151,7 +163,7 @@ def obfuscate_error_msg(msg, password): # obfuscate the password in the error message # regex to match the `Password=;` in the connection string # and replace it with `Password=***;` (case insensitive) - obfuscated_error_msg = re.sub(r"(?i)(Password=)([^;]+)", r"\1******", msg) + obfuscated_error_msg = PASSWORD_OBFUSCATION_PATTERN.sub(r"\1******", msg) if password: # this is a fallback in case the password is not in the connection string obfuscated_error_msg = obfuscated_error_msg.replace(password, "*" * 6) diff --git a/squid/README.md b/squid/README.md index 795354af2a7c4..3e841999051c6 100644 --- a/squid/README.md +++ b/squid/README.md @@ -15,6 +15,8 @@ Additionally, it includes pre-configured monitors for proactive notifications on This check monitors [Squid][1] metrics from the Cache Manager through the Datadog Agent. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/ssh_check/README.md b/ssh_check/README.md index 4cf15f4786874..3ef4841541d25 100644 --- a/ssh_check/README.md +++ b/ssh_check/README.md @@ -4,6 +4,8 @@ This check lets you monitor SSH connectivity to remote hosts and SFTP response times. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/statsd/README.md b/statsd/README.md index 8552c74ce3eac..55a1426a6c217 100644 --- a/statsd/README.md +++ b/statsd/README.md @@ -6,6 +6,8 @@ This check monitors the availability and uptime of non-Datadog StatsD servers. I This check does **NOT** forward application metrics from StatsD servers to Datadog. It collects metrics about StatsD itself. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/streamnative/README.md b/streamnative/README.md index 2df7d60f66a48..640b0ac3494f7 100644 --- a/streamnative/README.md +++ b/streamnative/README.md @@ -12,6 +12,8 @@ The StreamNative integration collects the following types of [metrics][2]: 4. Sink Connector 5. Kafka Connect +**Minimum Agent version:** 7.58.0 + ## Setup ### Generate API credentials in StreamNative diff --git a/strimzi/README.md b/strimzi/README.md index 1ad79e3b2246f..bfd8e24dfe0b4 100644 --- a/strimzi/README.md +++ b/strimzi/README.md @@ -4,6 +4,8 @@ This check monitors [Strimzi][1] through the Datadog Agent. +**Minimum Agent version:** 7.47.0 + ## Setup ### Installation diff --git a/supabase/README.md b/supabase/README.md index 7a6de6451153c..37b3835e35823 100644 --- a/supabase/README.md +++ b/supabase/README.md @@ -4,6 +4,8 @@ This check monitors [Supabase][1] through the Datadog Agent. +**Minimum Agent version:** 7.62.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/supervisord/README.md b/supervisord/README.md index a2403c8b2766b..5e5a1ff79c37e 100644 --- a/supervisord/README.md +++ b/supervisord/README.md @@ -6,6 +6,8 @@ This check monitors the uptime, status, and number of processes running under Supervisor. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/supply_chain_firewall/README.md b/supply_chain_firewall/README.md index 3eda67af08e82..5de2545c6a223 100644 --- a/supply_chain_firewall/README.md +++ b/supply_chain_firewall/README.md @@ -7,6 +7,8 @@ Integrate Supply Chain Firewall with Datadog's pre-built dashboard visualizations to gain insights into Package Manager logs. With Datadog's built-in log pipelines, you can parse and enrich these logs to facilitate easy search and detailed insights. Additionally, the integration includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.69.1 + ## Setup ### Configuration diff --git a/suricata/README.md b/suricata/README.md index 3c45c6828347b..94ec01bfc834b 100644 --- a/suricata/README.md +++ b/suricata/README.md @@ -4,6 +4,8 @@ This integration provides enrichment and visualization for Alert, Anomaly, HTTP, DNS, FTP, FTP_DATA, TLS, TFTP, SMB, SSH, Flow, RDP, DHCP, and ARP log types. It helps to visualize detailed insights into Alerts, Anomaly, network connections, DNS, and DHCP activity, as well as detailed network protocol analysis in the integration's out-of-the-box dashboards. +**Minimum Agent version:** 7.57.0 + ## Setup ### Installation diff --git a/symantec_endpoint_protection/README.md b/symantec_endpoint_protection/README.md index 99d40f025ed13..8b7dbfbf527a3 100644 --- a/symantec_endpoint_protection/README.md +++ b/symantec_endpoint_protection/README.md @@ -14,6 +14,8 @@ This integration enriches and ingests the following logs from Symantec Endpoint You can also visualize detailed insights into the above-mentioned logs with the out-of-the-box dashboards. Once you've installed the integration, you can find the dashboards by searching for "symantec-endpoint-protection" in the dashboards list. +**Minimum Agent version:** 7.61.0 + ## Setup ### Installation diff --git a/symantec_vip/README.md b/symantec_vip/README.md index b1efe1c4eead3..3bc8f7b15ef09 100644 --- a/symantec_vip/README.md +++ b/symantec_vip/README.md @@ -10,6 +10,8 @@ This integration ingests the following logs: This integration seamlessly collects all the above listed logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into event logs through the out-of-the-box dashboards. +**Minimum Agent version:** 7.70.0 + ## Setup ### Generate API credentials in Symantec VIP diff --git a/system_core/README.md b/system_core/README.md index 46c405e9c6c3b..bcf5e2ad1b32f 100644 --- a/system_core/README.md +++ b/system_core/README.md @@ -6,6 +6,8 @@ This check collects the number of CPU cores on a host and CPU times, such as `system`, `user`, `idle`, etc. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/system_swap/README.md b/system_swap/README.md index 5dc90c46bf4d6..b9d2d4987915c 100644 --- a/system_swap/README.md +++ b/system_swap/README.md @@ -4,6 +4,8 @@ This check monitors the number of bytes a host has swapped in and out. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/tanium/README.md b/tanium/README.md index e92677126fdf9..9903adfcd2435 100644 --- a/tanium/README.md +++ b/tanium/README.md @@ -10,6 +10,8 @@ This integration ingests the following logs: This integration collects logs from the sources listed above and transmits them to Datadog for analysis in [Log Explorer][3] and [Cloud SIEM][4]. +**Minimum Agent version:** 7.61.0 + ## Setup ### Prerequisites diff --git a/tcp_check/README.md b/tcp_check/README.md index 44c3b4273669d..b189b79bd2d12 100644 --- a/tcp_check/README.md +++ b/tcp_check/README.md @@ -6,6 +6,8 @@ Monitor TCP connectivity and response time for any host and port. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/teamcity/README.md b/teamcity/README.md index 1e8020592ec7f..7bfa2eda474d7 100644 --- a/teamcity/README.md +++ b/teamcity/README.md @@ -4,6 +4,8 @@ This integration connects to your TeamCity server to submit metrics, service checks, and events, allowing you to monitor the health of your TeamCity projects' build configurations, build runs, server resources, and more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/tekton/README.md b/tekton/README.md index 88567cf9e6023..57dee29bcdd32 100644 --- a/tekton/README.md +++ b/tekton/README.md @@ -4,6 +4,8 @@ This check monitors [Tekton][1] through the Datadog Agent. Tekton is a powerful and flexible open source framework for creating CI/CD systems, allowing developers to build, test, and deploy across cloud providers and on-premise systems. +**Minimum Agent version:** 7.53.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/teleport/README.md b/teleport/README.md index a791fdbed972e..aab6a210e5223 100644 --- a/teleport/README.md +++ b/teleport/README.md @@ -9,6 +9,8 @@ This integration monitors the health and performance of [Teleport][1] through th - Cluster logs into patterns for faster investigation of abnormal infrastructure access, such as a high number of failed logins or attempts to access as many resources as possible in a short period of time. +**Minimum Agent version:** 7.54.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/temporal/README.md b/temporal/README.md index 918c6ec5f09be..4fdf133ad4fd8 100644 --- a/temporal/README.md +++ b/temporal/README.md @@ -6,6 +6,8 @@ This check monitors [Temporal][1] through the Datadog Agent. **Note**: This check can only be installed if you are self-hosting Temporal. **To monitor your Temporal Cloud instance**, follow the [Datadog Temporal Cloud integration documentation][13]. +**Minimum Agent version:** 7.45.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/temporal_cloud/README.md b/temporal_cloud/README.md index ed6a1eaa8d731..451f22712f877 100644 --- a/temporal_cloud/README.md +++ b/temporal_cloud/README.md @@ -4,6 +4,8 @@ This integration gathers Temporal Cloud metrics into Datadog, offering insights into system health, workflow efficiency, task execution, and performance bottlenecks. +**Minimum Agent version:** 7.59.1 + ## Setup ### Generate a Metrics endpoint URL in Temporal Cloud diff --git a/tenable/README.md b/tenable/README.md index 6d0d667227fd7..090d94ed1f687 100644 --- a/tenable/README.md +++ b/tenable/README.md @@ -2,6 +2,8 @@ This integration monitors [Tenable Nessus][1] logs through the Datadog Agent. +**Minimum Agent version:** 7.17.2 + ## Setup Follow the instructions below configure this integration for an Agent running on a host. diff --git a/tenable_io/README.md b/tenable_io/README.md index cb7c562c295a3..ef022c77f88ee 100644 --- a/tenable_io/README.md +++ b/tenable_io/README.md @@ -11,6 +11,8 @@ The Tenable.io integration collects the following types of logs: This integration collects logs from the sources listed above and sends them to Datadog. +**Minimum Agent version:** 7.59.1 + ## Setup ### Generate API credentials in Tenable.io diff --git a/teradata/README.md b/teradata/README.md index e86de8499110d..0b70cbbebd70e 100644 --- a/teradata/README.md +++ b/teradata/README.md @@ -6,6 +6,8 @@ This check monitors Teradata through the Datadog Agent. Enable the Datadog-Teradata integration to view Teradata performance, disk usage, and resource consumption. +**Minimum Agent version:** 7.37.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/tibco_ems/README.md b/tibco_ems/README.md index f043b89b3f426..20d15b281891e 100644 --- a/tibco_ems/README.md +++ b/tibco_ems/README.md @@ -4,6 +4,8 @@ This check monitors [TIBCO Enterprise Message Service][1] through the Datadog Agent. +**Minimum Agent version:** 7.57.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/tls/README.md b/tls/README.md index 04ea2da8ea9db..807ea5e076810 100644 --- a/tls/README.md +++ b/tls/README.md @@ -9,6 +9,8 @@ This check monitors [TLS][1] protocol versions, certificate expiration and valid 1. Only TCP is supported. 2. Only leaf / end user certificates are verified (not intermediate and root certificates). +**Minimum Agent version:** 6.12.0 + ## Setup ### Installation diff --git a/tokumx/README.md b/tokumx/README.md index 75cfe0ace3e3e..c3487073a7256 100644 --- a/tokumx/README.md +++ b/tokumx/README.md @@ -14,6 +14,8 @@ This check collects TokuMX metrics, including: - Replication lag. - Cache table utilization and storage size. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/tomcat/README.md b/tomcat/README.md index e211adbb6ba0a..623c46713ede1 100644 --- a/tomcat/README.md +++ b/tomcat/README.md @@ -10,6 +10,8 @@ This check collects Tomcat metrics, for example: - Thread pool metrics: thread count, number of threads busy, etc. - Servlet processing times +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/torchserve/README.md b/torchserve/README.md index ea6dfef59537e..2a2d921db92d4 100644 --- a/torchserve/README.md +++ b/torchserve/README.md @@ -4,6 +4,8 @@ This check monitors [TorchServe][1] through the Datadog Agent. +**Minimum Agent version:** 7.47.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/traefik_mesh/README.md b/traefik_mesh/README.md index 333e5ce6dc769..cccf7cd59112f 100644 --- a/traefik_mesh/README.md +++ b/traefik_mesh/README.md @@ -9,6 +9,8 @@ Traefik Mesh is a lightweight and easy-to-deploy service mesh that offers advanc This check monitors [Traefik Mesh][1] through the Datadog Agent. +**Minimum Agent version:** 7.54.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/traffic_server/README.md b/traffic_server/README.md index 562261674dd57..29adc1e226db2 100644 --- a/traffic_server/README.md +++ b/traffic_server/README.md @@ -12,6 +12,8 @@ Enable the Datadog-Apache Traffic Server integration to: - Monitor system and error logs. +**Minimum Agent version:** 7.35.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/trellix_endpoint_security/README.md b/trellix_endpoint_security/README.md index 92f8985ea1468..6ea3f71761668 100644 --- a/trellix_endpoint_security/README.md +++ b/trellix_endpoint_security/README.md @@ -8,6 +8,8 @@ This integration ingests the following logs: This integration provides enrichment and visualization for above mentioned event types. It helps to visualize detailed insights into security trends, threats, and policy violations through the out-of-the-box dashboards. Also, This integration provides out of the box detection rules. +**Minimum Agent version:** 7.57.2 + ## Setup ### Generate API Credentials in Trellix Endpoint Security diff --git a/trend_micro_cloud_one/README.md b/trend_micro_cloud_one/README.md index 43c120c968035..6ceb7c7bf85fe 100644 --- a/trend_micro_cloud_one/README.md +++ b/trend_micro_cloud_one/README.md @@ -6,6 +6,8 @@ Integrate Trend Micro Cloud One with Datadog to gain insights into endpoint and workload security, file storage security, and network security events using pre-built dashboard visualizations. Datadog uses its built-in log pipelines to parse and enrich these logs, facilitating easy search and detailed insights. Additionally, integration includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.69.2 + ## Setup ### Log Collection Overview diff --git a/trend_micro_email_security/README.md b/trend_micro_email_security/README.md index a675da5234133..3503b03bfe36e 100644 --- a/trend_micro_email_security/README.md +++ b/trend_micro_email_security/README.md @@ -9,6 +9,8 @@ This integration ingests the following logs: Use out-of-the-box dashboards to visualize detailed insights into email traffic analysis, real-time threat detection, security detection and observation, and compliance monitoring. +**Minimum Agent version:** 7.55.2 + ## Setup ### Generate API credentials in Trend Micro Email Security diff --git a/trend_micro_vision_one_endpoint_security/README.md b/trend_micro_vision_one_endpoint_security/README.md index bc4ff7403360c..7f68c05b92b20 100644 --- a/trend_micro_vision_one_endpoint_security/README.md +++ b/trend_micro_vision_one_endpoint_security/README.md @@ -22,6 +22,8 @@ This integration ingests the following logs: Use out-of-the-box dashboards to gain detailed insights into system events, network events, and data loss prevention events, security detection and observation, and compliance monitoring. +**Minimum Agent version:** 7.56.0 + ## Setup ### Generate API credentials in Trend Micro Vision One Endpoint Security diff --git a/trend_micro_vision_one_xdr/README.md b/trend_micro_vision_one_xdr/README.md index 72638db9e8729..c4b59805c4c91 100644 --- a/trend_micro_vision_one_xdr/README.md +++ b/trend_micro_vision_one_xdr/README.md @@ -11,6 +11,8 @@ This integration collects logs from the sources listed above and sends them to D * [Log Explorer][3] * [Cloud SIEM][4] +**Minimum Agent version:** 7.56.1 + ## Setup ### Generate API Credentials in Trend Micro Vision One XDR diff --git a/twemproxy/README.md b/twemproxy/README.md index 0186bb2842c69..7febdde584bd8 100644 --- a/twemproxy/README.md +++ b/twemproxy/README.md @@ -4,6 +4,8 @@ Track overall and per-pool stats on each of your Twemproxy servers. This Agent check collects metrics for client and server connections and errors, request and response rates, bytes in and out of the proxy, and more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/twistlock/README.md b/twistlock/README.md index 5018828267b79..c30ac1bb81c97 100644 --- a/twistlock/README.md +++ b/twistlock/README.md @@ -4,6 +4,8 @@ [Prisma Cloud Compute Edition][1] is a security scanner. It scans containers, hosts, and packages to find vulnerabilities and compliance issues. +**Minimum Agent version:** 6.11.0 + ## Setup ### Installation diff --git a/varnish/README.md b/varnish/README.md index 82ae51c8ac9c6..cd1452e5e8b04 100644 --- a/varnish/README.md +++ b/varnish/README.md @@ -13,6 +13,8 @@ This check collects Varnish metrics regarding: It also submits service checks for the health of each backend. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/vault/README.md b/vault/README.md index cb2ec2587c4db..e2168fa723325 100644 --- a/vault/README.md +++ b/vault/README.md @@ -4,6 +4,8 @@ This check monitors [Vault][1] cluster health and leader changes. +**Minimum Agent version:** 6.3.2 + ## Setup ### Installation diff --git a/velero/README.md b/velero/README.md index 61f87a59f64ae..77e5f1bedd5ed 100644 --- a/velero/README.md +++ b/velero/README.md @@ -4,6 +4,8 @@ This check monitors [Velero][1] through the Datadog Agent. It collects data about Velero's backup, restore and snapshot operations. This allows users to gain insight into the health, performance and reliability of their disaster recovery processes. +**Minimum Agent version:** 7.64.0 + ## Setup ### Installation diff --git a/vertica/README.md b/vertica/README.md index f3d3be784c81c..7afcd452a9918 100644 --- a/vertica/README.md +++ b/vertica/README.md @@ -4,6 +4,8 @@ This check monitors [Vertica][1] through the Datadog Agent. +**Minimum Agent version:** 6.14.0 + ## Setup ### Installation diff --git a/vllm/README.md b/vllm/README.md index f176058ddcc6a..a8e15680d37c5 100644 --- a/vllm/README.md +++ b/vllm/README.md @@ -4,6 +4,8 @@ This check monitors [vLLM][1] through the Datadog Agent. +**Minimum Agent version:** 7.56.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. diff --git a/voltdb/README.md b/voltdb/README.md index 82ad177233d82..2f8255ca420bc 100644 --- a/voltdb/README.md +++ b/voltdb/README.md @@ -4,6 +4,8 @@ This check monitors [VoltDB][1] through the Datadog Agent. +**Minimum Agent version:** 7.26.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][2] for guidance on applying these instructions. diff --git a/vonage/README.md b/vonage/README.md index 8903ea1f65f91..d01d91c653124 100644 --- a/vonage/README.md +++ b/vonage/README.md @@ -10,6 +10,8 @@ This integration provides the following benefits: 3. **Trend identification**: Allows businesses to spot trends in customer interactions, aiding proactive engagement. 4. **Informed decision-making**: Provides insights that drive strategic decisions for growth and improvement. +**Minimum Agent version:** 7.58.1 + ## Setup 1. Log into [Vonage](https://www.vonage.com/log-in/). diff --git a/vsphere/README.md b/vsphere/README.md index 187c752e95fd7..71e7b69cb2fae 100644 --- a/vsphere/README.md +++ b/vsphere/README.md @@ -6,6 +6,8 @@ This check collects resource usage metrics from your vSphere cluster-CPU, disk, memory, and network usage. It also watches your vCenter server for events and emits them to Datadog. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/watchguard_firebox/README.md b/watchguard_firebox/README.md index 4f9a1cd071484..5eb70234e75c4 100644 --- a/watchguard_firebox/README.md +++ b/watchguard_firebox/README.md @@ -12,6 +12,8 @@ This integration enriches and ingests the following events: This integration seamlessly collects all the above listed logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into firewall, networking, management, VPN, and proxy policy events through the out-of-the-box dashboards. Additionally, it includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.68.0 + ## Setup ### Installation diff --git a/wazuh/README.md b/wazuh/README.md index 80817974c1f31..6693f607e041f 100644 --- a/wazuh/README.md +++ b/wazuh/README.md @@ -17,6 +17,8 @@ This integration parses the following types of logs: Visualize detailed insights into these logs through the out-of-the-box dashboards. +**Minimum Agent version:** 7.61.0 + ## Setup ### Installation diff --git a/weaviate/README.md b/weaviate/README.md index 86f24bb0f3530..63bf9a06e74b5 100644 --- a/weaviate/README.md +++ b/weaviate/README.md @@ -13,6 +13,8 @@ Weaviate is an open source, AI-native vector database that helps create AI-power This check monitors [Weaviate][1] through the Datadog Agent. For more information, see [Weaviate monitoring][2]. To learn more about Datadog's suite of AI integrations, see this [blog][15]. +**Minimum Agent version:** 7.47.0 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/weblogic/README.md b/weblogic/README.md index 17cb4d5775b01..9eeb86be7b2e6 100644 --- a/weblogic/README.md +++ b/weblogic/README.md @@ -11,6 +11,8 @@ Oracle WebLogic monitoring with Datadog enables you to: - Track thread pool and messaging services - Track database connection pool usage +**Minimum Agent version:** 7.33.0 + ## Setup ### Installation diff --git a/win32_event_log/README.md b/win32_event_log/README.md index 8d812a308d997..b43ec46c900e2 100644 --- a/win32_event_log/README.md +++ b/win32_event_log/README.md @@ -11,6 +11,8 @@ Enable this integration to: For more information, see the [Windows Event Logging documentation][13]. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/wincrashdetect/README.md b/wincrashdetect/README.md index 6e37a491d6a7c..e03756d735086 100644 --- a/wincrashdetect/README.md +++ b/wincrashdetect/README.md @@ -6,6 +6,8 @@ Get Datadog events upon Windows system crash to create monitors in Datadog. **Note**: The list of metrics collected by this integration may change between minor Agent versions. Such changes may not be mentioned in the Agent's changelog. +**Minimum Agent version:** 7.47.0 + ## Setup ### Installation diff --git a/windows_certificate/README.md b/windows_certificate/README.md index 207552214915c..8c9b275ae4ae4 100644 --- a/windows_certificate/README.md +++ b/windows_certificate/README.md @@ -4,6 +4,8 @@ This integration monitors the Local Machine certificates in the [Windows Certificate Store][1] to check whether any have expired. +**Minimum Agent version:** 7.66.0 + ## Setup ### Installation diff --git a/windows_performance_counters/README.md b/windows_performance_counters/README.md index ab0c707d8b044..b58afb80b83f9 100644 --- a/windows_performance_counters/README.md +++ b/windows_performance_counters/README.md @@ -6,6 +6,8 @@ This check monitors [Windows performance counters][1] through the Datadog Agent. **Note:** Agent version 7.33.0 is the minimum supported version. +**Minimum Agent version:** 7.32.1 + ## Setup Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. diff --git a/windows_registry/README.md b/windows_registry/README.md index d94b0b753610a..7c4061bfdf03e 100644 --- a/windows_registry/README.md +++ b/windows_registry/README.md @@ -7,6 +7,8 @@ Watch for changes in Windows Registry keys and forward them to Datadog. Enable t - Understand system and application level health and state through Windows Registry values. - Monitor for unexpected changes impacting security and compliance requirements. +**Minimum Agent version:** 7.50.0 + ## Setup ### Installation diff --git a/windows_service/README.md b/windows_service/README.md index 09216ccf4278d..09512888b9918 100644 --- a/windows_service/README.md +++ b/windows_service/README.md @@ -4,6 +4,8 @@ This check monitors the state of any Windows Service and submits a service check to Datadog. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/wlan/README.md b/wlan/README.md index 48c6c4786d38a..5b15b9f930b64 100644 --- a/wlan/README.md +++ b/wlan/README.md @@ -6,6 +6,8 @@ This check monitors Wireless LAN (WLAN) networks based on the [IEEE 802.11][1] s It collects key Wi-Fi metrics, including Access Point (AP) information such as [SSID][2] and [BSSID][3] (as tags), signal quality telemetry like [RSSI][4] and [Noise][5], transmission rate, and transitions count ([Roaming][6] and [Swapping][7] between APs, for example). These metrics help proactively identify overall wireless network issues, such as overloaded access points, as well as retrospective troubleshooting of poor network performance on individual hosts. +**Minimum Agent version:** 7.64.2 + ## Setup ### Prerequisite diff --git a/wmi_check/README.md b/wmi_check/README.md index 466cd6ebc8f06..9f54f802fce79 100644 --- a/wmi_check/README.md +++ b/wmi_check/README.md @@ -10,6 +10,8 @@ The built-in Windows WMI ecosystem offers rich, and in many cases exclusive, access to Windows and Microsoft features and products telemetry. This WMI Check allows mapping rows and columns from WMI class datasets to Datdog metrics and their tags, making it easier to extract meaningful telemetry. Additionally, it supports joining two WMI class datasets, allowing for correlations between datasets that would otherwise be impossible to achieve. +**Minimum Agent version:** 6.0.0 + ## Setup ### [Default] Agent User Privilege diff --git a/workato/README.md b/workato/README.md index 369d3a740cdc9..3a1aff2f73552 100644 --- a/workato/README.md +++ b/workato/README.md @@ -13,6 +13,8 @@ The logs are parsed and enriched for efficient searching, while the metrics prov The integration includes a dashboard that shows job execution status and duration, making it easier to monitor and understand trends and issues. +**Minimum Agent version:** 7.67.1 + ## Setup ### Generate API credentials in Workato diff --git a/yarn/README.md b/yarn/README.md index fc3267343e016..45788b7a1601b 100644 --- a/yarn/README.md +++ b/yarn/README.md @@ -14,6 +14,8 @@ This check collects metrics from your YARN ResourceManager, including (but not l `yarn.apps.` metrics are deprecated in favor of `yarn.apps._gauge` metrics because `yarn.apps` metrics are incorrectly reported as a `RATE` instead of a `GAUGE`. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation diff --git a/zeek/README.md b/zeek/README.md index bb70c5b639b84..c0567f40fef4b 100644 --- a/zeek/README.md +++ b/zeek/README.md @@ -12,6 +12,8 @@ This integration ingests the following logs: Visualize detailed insights into network connections, DNS and DHCP activity, detailed network protocol analysis, file analysis and certificates, security detection and observation, compliance monitoring through the out-of-the-box dashboards. +**Minimum Agent version:** 7.52.0 + ## Setup ### Installation diff --git a/zero_networks/README.md b/zero_networks/README.md index 2c2c21b10a4c4..0bb0938672167 100644 --- a/zero_networks/README.md +++ b/zero_networks/README.md @@ -11,6 +11,8 @@ This integration ingests the following logs: This integration collects the listed logs and channels them into Datadog for analysis. These logs are parsed and enriched through the built-in logs pipeline, enabling effortless search and analysis. The integration provides insight into audit and network-activities through the out-of-the-box dashboards. +**Minimum Agent version:** 7.61.0 + ## Setup ### Generate API credentials in Zero Networks diff --git a/zerofox_cloud_platform/README.md b/zerofox_cloud_platform/README.md index b622a1f147639..5e971d341fa59 100644 --- a/zerofox_cloud_platform/README.md +++ b/zerofox_cloud_platform/README.md @@ -7,6 +7,8 @@ This integration ingests the following logs: Integrate ZeroFox Cloud Platform with Datadog to gain insights into Alerts using pre-built dashboard visualizations. Datadog uses its built-in log pipelines to parse and enrich these logs, facilitating easy search and detailed insights. Additionally, the integration includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security. +**Minimum Agent version:** 7.69.2 + ## Setup ### Prerequisites diff --git a/zk/README.md b/zk/README.md index c44833f2125c2..d580dfcc20eb1 100644 --- a/zk/README.md +++ b/zk/README.md @@ -6,6 +6,8 @@ The ZooKeeper check tracks client connections and latencies, monitors the number of unprocessed requests, and more. +**Minimum Agent version:** 6.0.0 + ## Setup ### Installation