Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
datadog-labs avatar

Dd Logs

  • 1.4k installs
  • 147 repo stars
  • Updated July 29, 2026
  • datadog-labs/agent-skills

dd-logs is a Datadog agent skill for log search, archives, processors, and cost control via pup CLI.

About

The dd-logs skill guides Datadog log search, configuration APIs, processors, and cost-aware exclusion filters via the pup CLI. Prerequisites require Datadog Pup installed with pup auth login. Token-efficient execution checks context first, runs discovery commands when values are missing, then executes the target query avoiding speculative failures. Search examples use pup logs search with status:error, service filters, attribute ranges, and boolean AND queries on @http.status_code. Configuration APIs list archives, restriction queries, and custom destinations in pup 0.42.0. Processor patterns document grok-parser, status-remapper, and attribute-remapper JSON for API log pipelines. Exclusion filters drop debug noise and high-volume sources to control indexing costs. High-volume triage groups logs by service to find the noisiest sources in the last hour. Cost control emphasizes indexing only what matters with enabled exclusion filters on debug status and verbose services. Integrates with broader Datadog agent-skills ecosystem for observability workflows during incident response and log pipeline design.

  • pup logs search supports tags, attributes, ranges, and boolean query syntax.
  • Token-efficient order: check context, discover missing values, then run target command.
  • Configuration APIs list archives, restriction queries, and custom destinations.
  • Exclusion filters drop debug and high-volume logs to control indexing cost.
  • Grok-parser, status-remapper, and attribute-remapper processor JSON examples included.

Dd Logs by the numbers

  • 1,399 all-time installs (skills.sh)
  • +64 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #158 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

dd-logs capabilities & compatibility

Capabilities
pup logs search syntax · log processor configuration · archive and destination apis · exclusion filter cost control · high volume service triage
Use cases
debugging · devops
From the docs

What dd-logs says it does

Search, process, and archive logs with cost awareness.
SKILL.md
Index only what matters
SKILL.md
npx skills add https://github.com/datadog-labs/agent-skills --skill dd-logs

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.4k
repo stars147
Security audit3 / 3 scanners passed
Last updatedJuly 29, 2026
Repositorydatadog-labs/agent-skills

How do I search Datadog logs and reduce indexing costs with exclusion filters?

Search, archive, and cost-control Datadog logs using pup CLI with token-efficient command ordering.

Who is it for?

Teams using Datadog Pup CLI for log search and pipeline configuration.

Skip if: Skip when APM traces or infrastructure metrics are the primary need without log queries.

When should I use this skill?

User searches Datadog logs, configures processors, or asks about log indexing cost control.

What you get

Targeted pup logs queries, processor configs, and exclusion rules for cost-aware log management.

  • log query results
  • archive actions
  • cost-control recommendations

By the numbers

  • Published at skill metadata version 1.0.1
  • Tagged for datadog, logs, logging, search, and dd-logs file globs

Files

SKILL.mdMarkdownGitHub ↗

Datadog Logs

Search, process, and archive logs with cost awareness.

Prerequisites

Datadog Pup should already be installed. See Setup Pup if not.

Command Execution Order (Token-Efficient)

For scoped commands, use this order:

1. Check context first (prior outputs, conversation, saved values). 2. If a required value is missing, run a discovery command first. 3. If still ambiguous, ask the user to confirm. 4. Then run the target command. 5. Avoid speculative commands likely to fail.

Quick Start

pup auth login

Search Logs

# Basic search
pup logs search --query="status:error" --from="1h"

# With filters
pup logs search --query="service:api status:error" --from="1h" --limit 100

# JSON output
pup logs search --query="@http.status_code:>=500" --from="1h"

Search Syntax

QueryMeaning
errorFull-text search
status:errorTag equals
@http.status_code:500Attribute equals
@http.status_code:>=400Numeric range
service:api AND env:prodBoolean
@message:*timeout*Wildcard

Configuration APIs

Available log configuration commands in pup 0.42.0:

# List log archives
pup logs archives list

# List log restriction queries
pup logs restriction-queries list

# List custom log destinations
pup logs custom-destinations list

Common Processors

{
  "name": "API Logs",
  "filter": {"query": "service:api"},
  "processors": [
    {
      "type": "grok-parser",
      "name": "Parse nginx",
      "source": "message",
      "grok": {"match_rules": "%{IPORHOST:client_ip} %{DATA:method} %{DATA:path} %{NUMBER:status}"}
    },
    {
      "type": "status-remapper",
      "name": "Set severity",
      "sources": ["level", "severity"]
    },
    {
      "type": "attribute-remapper",
      "name": "Remap user_id",
      "sources": ["user_id"],
      "target": "usr.id"
    }
  ]
}

Exclusion Filters (Cost Control)

Index only what matters:

{
  "name": "Drop debug logs",
  "filter": {"query": "status:debug"},
  "is_enabled": true
}

High-Volume Exclusions

# Find noisiest log sources
pup logs search --query="*" --from="1h" | jq 'group_by(.service) | map({service: .[0].service, count: length}) | sort_by(-.count)[:10]'
ExcludeQuery
Health checks@http.url:"/health" OR @http.url:"/ready"
Debug logsstatus:debug
Static assets@http.url:*.css OR @http.url:*.js
Heartbeats@message:*heartbeat*

Archives

Store logs cheaply for compliance:

# List archives
pup logs archives list

# Archive config (S3 example)
{
  "name": "compliance-archive",
  "query": "*",
  "destination": {
    "type": "s3",
    "bucket": "my-logs-archive",
    "path": "/datadog"
  },
  "rehydration_tags": ["team:platform"]
}

Rehydrate (Restore)

# No `pup logs rehydrate` command in pup 0.42.0.
# Use Datadog UI/API for rehydration workflows.

Log-Based Metrics

Create metrics from logs (cheaper than indexing):

# List log-based metrics
pup logs metrics list

# Get one metric by ID
pup logs metrics get api.errors.count

Cardinality warning: Group by bounded values only.

Sensitive Data

Scrubbing Rules

{
  "type": "hash-remapper",
  "name": "Hash emails",
  "sources": ["email", "@user.email"]
}

Never Log

# In your app - sanitize before sending
import re

def sanitize_log(message: str) -> str:
    # Remove credit cards
    message = re.sub(r'\b\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}\b', '[REDACTED]', message)
    # Remove SSNs
    message = re.sub(r'\b\d{3}-\d{2}-\d{4}\b', '[REDACTED]', message)
    return message

Troubleshooting

ProblemFix
Logs not appearingCheck agent, pipeline filters
High costsAdd exclusion filters
Search slowNarrow time range, use indexes
Missing attributesCheck grok parser

References/Documentation

Related skills

How it compares

Use dd-logs for Datadog-native log operations from agents; use generic shell log grepping when Datadog Pup and account access are unavailable.

FAQ

How do I authenticate?

Run pup auth login after installing Datadog Pup.

How to filter by HTTP status?

Use @http.status_code:>=500 or exact attribute queries.

How to reduce log volume costs?

Enable exclusion filters on debug status and noisy services.

Is Dd Logs safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDmonitoringsupport

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.