dd-logs
द्वारा datadog-labs
लॉग प्रबंधन - खोज, पाइपलाइन, संग्रह, और लागत नियंत्रण।
npx skills add https://github.com/datadog-labs/pup --skill dd-logsDatadog Logs
Search, process, and archive logs with cost awareness.
Prerequisites
Datadog Pup (dd-pup/pup) should already be installed:
cargo install --git https://github.com/DataDog/pup
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 is the default
pup logs search --query="@http.status_code:>=500" --from="1h"
Search Syntax
| Query | Meaning |
|---|---|
error | Full-text search |
status:error | Tag equals |
@http.status_code:500 | Attribute equals |
@http.status_code:>=400 | Numeric range |
service:api AND env:prod | Boolean |
@message:*timeout* | Wildcard |
Pipelines
Process logs before indexing:
# List pipelines
pup obs-pipelines list
# Create pipeline (JSON)
pup obs-pipelines create --file pipeline.json
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]'
| Exclude | Query |
|---|---|
| Health checks | @http.url:"/health" OR @http.url:"/ready" |
| Debug logs | status: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"]
}
Log-Based Metrics
Inspect log-based metrics:
# List existing log-based metrics
pup logs metrics list
⚠️ 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
| Problem | Fix |
|---|---|
| Logs not appearing | Check agent, pipeline filters |
| High costs | Add exclusion filters |
| Search slow | Narrow time range, use indexes |
| Missing attributes | Check grok parser |
References/Documentation
datadog-labs की और Skills
agent-install
datadog-labs
agent-install — डेटाडॉग-लैब्स/एजेंट-स्किल्स द्वारा प्रकाशित, AI एजेंटों के लिए एक इंस्टॉल करने योग्य स्किल।
official
agent-skills
datadog-labs
AI एजेंटों के लिए Datadog कौशल। आवश्यक निगरानी, लॉगिंग, ट्रेसिंग और अवलोकनीयता।
official
dd-apm
datadog-labs
एपीएम - इंस्टॉल करें, ऑनबोर्ड करें, इंस्ट्रूमेंट करें, सक्षम करें, सेट अप करें, कॉन्फ़िगर करें, ट्रेस, सेवाएँ, निर्भरताएँ, प्रदर्शन विश्लेषण। Datadog APM से संबंधित किसी भी अनुरोध के लिए उपयोग करें…
official
dd-audit
datadog-labs
ऑडिट ट्रेल जांच - किसने क्या बदला, कुंजी समझौता, लागत वृद्धि का मूल कारण, अनुपालन साक्ष्य (SOC 2/PCI), और AI गतिविधि ऑडिटिंग।
official
dd-audit-ai-activity
datadog-labs
जाँच करें कि Bits AI सहायक (MCP सर्वर) ने आपके Datadog संगठन में क्या किया है — उपयोगकर्ता द्वारा टूल कॉल, एक्सेस किए गए संसाधन, और AI शासन के लिए विसंगति फ़्लैग।
official
dd-audit-compliance-report
datadog-labs
Datadog ऑडिट ट्रेल से SOC 2 और PCI DSS के लिए ऑडिटर-तैयार अनुपालन साक्ष्य उत्पन्न करें। फ्रेमवर्क नियंत्रणों को विशिष्ट क्वेरी पैटर्न से मैप करता है और उत्पन्न करता है…
official
dd-audit-cost-spike-investigation
datadog-labs
Datadog उत्पाद उपयोग या लागत में वृद्धि की जांच करें, उपयोग मीटरिंग डेटा (कब/क्या बढ़ा) को ऑडिट ट्रेल कॉन्फ़िगरेशन परिवर्तनों (किसने क्या बदला...) से संबंधित करके।
official
dd-audit-key-compromise
datadog-labs
संभावित रूप से समझौता किए गए Datadog API कुंजी की जांच करें — कार्रवाइयों की समयरेखा, भौगोलिक/IP विवरण, कॉल किए गए एंडपॉइंट, विसंगति फ़्लैग और सुधारात्मक कदम।
official