### Install and Set Capabilities (Combined) Source: https://github.com/datadog/integrations-core/blob/master/go-metro/README.md A combined example showing how to install PCAP libraries and set capabilities for go-metro. ```bash # Install required libraries $ sudo apt-get install libcap # debian $ sudo apt-get install libcap2-bin # debian alternative $ sudo yum install libcap # redhat $ sudo yum install compat-libcap1 # redhat alternative # Set capabilities $ sudo setcap cap_net_raw+ep /opt/datadog-agent/bin/go-metro ``` -------------------------------- ### Manual Testing Examples Source: https://github.com/datadog/integrations-core/blob/master/nutanix/tests/docker/README.md Examples of how to manually test the Docker setup using curl commands. ```APIDOC ## Manual Testing You can manually test the Docker setup: ```bash # Start services cd nutanix/tests/docker docker-compose up -d # Wait for container to be ready docker logs -f nutanix-prism-central # Wait until you see "Starting Nutanix mock API server" # Test health check curl http://localhost:9440/console # Test clusters endpoint (page 0) curl http://localhost:9440/api/clustermgmt/v4.0/config/clusters # Test with pagination curl "http://localhost:9440/api/monitoring/v4.0/serviceability/events?$page=1" # Test with time filter curl "http://localhost:9440/api/monitoring/v4.0/serviceability/events?$filter=creationTime%20gt%202026-01-02T14:35:00Z" ``` ``` -------------------------------- ### Keycloak Start Command with Syslog Source: https://github.com/datadog/integrations-core/blob/master/keycloak/README.md Example of a complete Keycloak start command including syslog forwarding configuration for the Datadog Agent. ```shell bin/kc.[sh|bat] start --log="syslog" --log-syslog-endpoint=: --log-level=org.keycloak.events:debug --log-syslog-output=json ``` -------------------------------- ### Setup Test Environment for MapR Source: https://github.com/datadog/integrations-core/blob/master/mapr/tests/README.md Prepare CentOS 7 VMs for a MapR cluster by installing Java and downloading the MapR setup script. This is a prerequisite for installing MapR. ```bash sudo yum -y install java-1.8.0-openjdk-devel curl https://package.mapr.com/releases/installer/mapr-setup.sh -o /tmp/mapr-setup.sh ``` -------------------------------- ### Manual Docker Setup and Testing Source: https://github.com/datadog/integrations-core/blob/master/nutanix/tests/docker/README.md Manually start the Docker services, wait for the mock API server to be ready, and then use curl to test API endpoints, including pagination and time filtering. ```bash # Start services cd nutanix/tests/docker docker-compose up -d ``` ```bash # Wait for container to be ready docker logs -f nutanix-prism-central # Wait until you see "Starting Nutanix mock API server" ``` ```bash # Test health check curl http://localhost:9440/console ``` ```bash # Test clusters endpoint (page 0) curl http://localhost:9440/api/clustermgmt/v4.0/config/clusters ``` ```bash # Test with pagination curl "http://localhost:9440/api/monitoring/v4.0/serviceability/events?$page=1" ``` ```bash # Test with time filter curl "http://localhost:9440/api/monitoring/v4.0/serviceability/events?$filter=creationTime%20gt%202026-01-02T14:35:00Z" ``` -------------------------------- ### Copy Configuration File Source: https://github.com/datadog/integrations-core/blob/master/silverstripe_cms/README.md Copy the example configuration file to the agent's configuration directory. This is the first step in setting up the integration. ```sh cp /etc/datadog-agent/conf.d/silverstripe_cms.d/conf.yaml.example /etc/datadog-agent/conf.d/silverstripe_cms.d/conf.yaml ``` -------------------------------- ### Copy Configuration File Source: https://github.com/datadog/integrations-core/blob/master/sonatype_nexus/README.md Copy the example configuration file to the agent's configuration directory. ```bash cp /etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml.example /etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml ``` -------------------------------- ### Install dd-trace package for Node.js Source: https://github.com/datadog/integrations-core/blob/master/openai/README.md Install the `dd-trace` package using npm. This is required for both agentless and agent-based setups. ```shell npm install dd-trace ``` -------------------------------- ### Integration Configuration Example (conf.yaml.example) Source: https://context7.com/datadog/integrations-core/llms.txt Example of an integration's configuration file, annotated with `@param` docstrings for Agent validation against Pydantic models. Includes settings for timeouts, proxies, and metric filtering. ```yaml # nginx/datadog_checks/nginx/data/conf.yaml.example init_config: ## @param timeout - number - optional - default: 10 # timeout: 10 ## @param proxy - mapping - optional # proxy: # http: http://: # https: https://: instances: ## @param nginx_status_url - string - required - nginx_status_url: http://localhost:81/nginx_status/ ## @param use_plus_api - boolean - optional - default: false # use_plus_api: false ## @param plus_api_version - integer - optional - default: 2 # plus_api_version: 2 ## @param tls_verify - boolean - optional - default: true # tls_verify: true ## @param tags - list of strings - optional tags: - env:prod - team:platform ## @param metric_patterns - mapping - optional ## Filter metrics by inclusion/exclusion patterns # metric_patterns: # include: # - nginx.net.* # exclude: # - nginx.upstream.* ``` -------------------------------- ### Inject datadog_checks_dev changes for development installation Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/setup.md If you have unreleased changes in datadog_checks_dev that may affect ddev, run this command to get the most recent changes. This is for development installations. ```bash pipx inject -e ddev "/path/to/datadog_checks_dev" ``` -------------------------------- ### go-metro Configuration Example Source: https://github.com/datadog/integrations-core/blob/master/go-metro/README.md An example configuration file for the go-metro check, specifying network interface, tags, and target IPs/hosts. ```yaml init_config: snaplen: 512 idle_ttl: 300 exp_ttl: 60 statsd_ip: 127.0.0.1 statsd_port: 8125 log_to_file: true log_level: info instances: - interface: eth0 tags: - env:prod ips: - 45.33.125.153 hosts: - app.datadoghq.com ``` -------------------------------- ### Start Node.js app with automatic tracing enabled Source: https://github.com/datadog/integrations-core/blob/master/openai/README.md Start your Node.js application using the `-r dd-trace/init` command to automatically enable tracing when the Datadog Agent is installed. ```shell DD_SITE= DD_API_KEY= DD_LLMOBS_ENABLED=1 DD_LLMOBS_ML_APP= node -r 'dd-trace/init' .js ``` -------------------------------- ### Build Documentation as PDF Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/meta/docs.md To export the documentation site as a PDF, use the `--pdf` flag with the serve command. Note that external dependencies are required for this functionality. ```bash ddev docs serve --pdf ``` -------------------------------- ### Install and Restart Zeek Source: https://github.com/datadog/integrations-core/blob/master/zeek/README.md Run the Zeek control command to install and restart Zeek. This applies any pending configuration changes and ensures Zeek is running with the latest setup. ```shell /opt/zeek/bin/zeekctl install ``` ```shell /opt/zeek/bin/zeekctl restart ``` -------------------------------- ### Non-Started Transaction Example Source: https://github.com/datadog/integrations-core/blob/master/mysql/tests/fixtures/innodb_status_mariadb_111.txt This snippet represents an InnoDB transaction that has not yet started. It shows the lock structures and heap size associated with it. ```text ---TRANSACTION (0x78d938243680), not started 0 lock struct(s), heap size 1128, 0 row lock(s) ``` -------------------------------- ### Start KrakenD and FastAPI Services Source: https://github.com/datadog/integrations-core/blob/master/krakend/tests/docker/README.md Use this command to build and start all services in the Docker environment. Ensure you are in the correct directory. ```bash cd tests/docker docker-compose up --build -d ``` -------------------------------- ### OpenTelemetry Collector Exporter Validation Logs Source: https://github.com/datadog/integrations-core/blob/master/otel/README.md Example log messages indicating the Datadog exporter is enabled and starting correctly within the OpenTelemetry Collector. ```log Exporter is enabled. {"component_kind": "exporter", "exporter": "datadog"} Exporter is starting... {"component_kind": "exporter", "component_type": "datadog", "component_name": "datadog"} Exporter started. {"component_kind": "exporter", "component_type": "datadog", "component_name": "datadog"} Everything is ready. Begin running and processing data. ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/meta/docs.md Build and serve the documentation locally using the ddev CLI. Live reloading is enabled by default for real-time updates. ```bash ddev docs serve ``` -------------------------------- ### Configure Cluster Discovery with Limit and Include Source: https://github.com/datadog/integrations-core/blob/master/cloudera/README.md Example of how to configure cluster discovery to process a maximum of 5 clusters whose names start with 'my_cluster'. ```yaml clusters: limit: 5 include: - 'my_cluster.*' ``` -------------------------------- ### Start Integration Environment Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/tutorials/logs/http-crawler.md Spin up the integration environment using `ddev env start`. Specify the integration name, Python version, and development mode. ```bash ddev env start acme py3.11 --dev ``` -------------------------------- ### Configure Cluster Discovery with Limit, Include, and Exclude Source: https://github.com/datadog/integrations-core/blob/master/cloudera/README.md Example of how to configure cluster discovery to process a maximum of 20 clusters, including all, but excluding those starting with 'tmp_'. ```yaml clusters: limit: 20 include: - '.*' exclude: - 'tmp_.*' ``` -------------------------------- ### Envoy Secured Stats Endpoint Configuration Source: https://github.com/datadog/integrations-core/blob/master/envoy/README.md Example Envoy configuration for a secured stats endpoint. This setup routes /stats traffic to the admin endpoint while other routes receive an error. ```yaml admin: access_log_path: /dev/null address: socket_address: protocol: TCP address: 127.0.0.1 port_value: 8081 static_resources: listeners: - address: socket_address: protocol: TCP address: 0.0.0.0 port_value: 80 filter_chains: - filters: - name: envoy.http_connection_manager config: codec_type: AUTO stat_prefix: ingress_http route_config: virtual_hosts: - name: backend domains: - "*" routes: - match: prefix: /stats route: cluster: service_stats http_filters: - name: envoy.router config: clusters: - name: service_stats connect_timeout: 0.250s type: LOGICAL_DNS lb_policy: ROUND_ROBIN hosts: - socket_address: protocol: TCP address: 127.0.0.1 port_value: 8001 ``` -------------------------------- ### Install Sysmon with Configuration Source: https://github.com/datadog/integrations-core/blob/master/microsoft_sysmon/README.md Run this command from the extracted Sysmon folder in an administrator command prompt to install Sysmon with your specified XML configuration file. Replace `[]` with the path to your configuration file. ```powershell .\Sysmon -i [] ``` -------------------------------- ### Start PHP-FPM Testbed with Docker Compose Source: https://github.com/datadog/integrations-core/blob/master/php_fpm/tests/compose/README.md Run this command to start the PHP-FPM testbed containers. The PHP-FPM status page will be accessible at http://localhost/status. ```bash docker compose up -d ``` -------------------------------- ### Translate MIB to OIDs with snmptranslate Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/tutorials/snmp/how-to.md Use the `snmptranslate` CLI tool to get a list of OIDs and their labels from a MIB file installed on your system. Redirect the output to a file for easier viewing. ```console $ snmptranslate -m IF-MIB -Tz -On > out.log $ cat out.log "org" "1.3" "dod" "1.3.6" "internet" "1.3.6.1" "directory" "1.3.6.1.1" "mgmt" "1.3.6.1.2" "mib-2" "1.3.6.1.2.1" "system" "1.3.6.1.2.1.1" "sysDescr" "1.3.6.1.2.1.1.1" "sysObjectID" "1.3.6.1.2.1.1.2" "sysUpTime" "1.3.6.1.2.1.1.3" "sysContact" "1.3.6.1.2.1.1.4" "sysName" "1.3.6.1.2.1.1.5" "sysLocation" "1.3.6.1.2.1.1.6" [...] ``` -------------------------------- ### Limit Project Collection in Octopus Deploy Source: https://github.com/datadog/integrations-core/blob/master/octopus_deploy/README.md Configure the `projects` section to limit the number of projects for which data is collected. This example limits collection to 10 projects whose names start with 'test'. ```yaml projects: limit: 10 include: - 'test.*' ``` -------------------------------- ### Start py38-sandbox E2E Environment Source: https://github.com/datadog/integrations-core/blob/master/teradata/tests/README.md Command to start the py38-sandbox E2E environment. Requires a running Teradata instance and specific environment variables to be configured. ```bash ddev env start teradata py38-sandbox ``` -------------------------------- ### Perform SNMP GET Query for sysDescr Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/tutorials/snmp/how-to.md Query a specific OID (sysDescr) from an SNMP device using snmpget. Ensure Net-SNMP tools are installed and the community string matches the device configuration. ```console $ snmpget -v 2c -c public -IR 127.0.0.1:1161 system.sysDescr.0 SNMPv2-MIB::sysDescr.0 = STRING: Linux 41ba948911b9 4.9.87-linuxkit-aufs #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 SNMPv2-MIB::sysORUpTime.1 = Timeticks: (9) 0:00:00.09 ``` -------------------------------- ### Docker Environment Setup Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/ddev/test.md Uses the `docker_run` utility to set up a test environment with Docker Compose. Ensure the path to your compose file is correct. ```python from datadog_checks.dev import docker_run import pytest import os @pytest.fixture(scope='session') def dd_environment(): with docker_run(os.path.join(HERE, 'docker', 'compose.yaml')): yield ... ``` -------------------------------- ### Filter journal messages with include_matches Source: https://github.com/datadog/integrations-core/blob/master/journald/README.md Starting with Agent version 7.39.0+, you can filter messages based on key-value pairs using `include_matches` and `exclude_matches`. This example includes messages where the `_TRANSPORT` key is set to `kernel`. ```yaml logs: - type: journald path: /var/log/journal/ include_matches: - _TRANSPORT=kernel ``` -------------------------------- ### Sysmon Configuration XML Example Source: https://github.com/datadog/integrations-core/blob/master/microsoft_sysmon/README.md Create an XML file to configure Sysmon. This example includes settings for hash algorithms, revocation checking, and filtering for process creation events originating from specific user AppData directories. Refer to Sysmon documentation for more event filtering options. ```xml md5,sha256 C:\Users\*\AppData\Local\Temp\ C:\Users\*\AppData\Roaming\ ``` -------------------------------- ### Show Available Environments Source: https://github.com/datadog/integrations-core/blob/master/docs/developer/e2e.md Use the `show` command to list all available E2E test environments for a given integration. Only environments configured to run tests will be displayed. ```bash $ ddev env show postgres Available Name py3.9-9.6 py3.9-10.0 py3.9-11.0 py3.9-12.1 py3.9-13.0 py3.9-14.0  ``` ```bash $ ddev env show ``` -------------------------------- ### Kafka Consumer Configuration (Containerized) Source: https://github.com/datadog/integrations-core/blob/master/kafka_consumer/README.md Configure the Kafka consumer check for containerized environments using Autodiscovery Integration Templates. This example shows a minimal setup for connecting to Kafka and specifying consumer groups. ```yaml { "kafka_connect_str": "", "consumer_groups": { "": {} } } ```