本文へ移動
cccskills
無料GitHub で公開

obz-dd

Datadog provider for obz. Supports metrics (Datadog Query Language), logs (Datadog Log Query), and traces. Requires api-key and app-key configured under auth in config.yaml. Does not support metric labels, label-values, or series commands. This skill should be used when the user mentions "Datadog", "DD", "obz -p dd", Datadog Query Language, or needs to configure Datadog provider instances with regional endpoints.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

obz-dd: Datadog Provider

Quick Reference

FieldValue
Aliasesdd, datadog
SignalsMetric, Log, Trace
Metric queryDatadog Query Language
Log queryDatadog Log Query
AuthAPI key + Application key (both required)
Default endpointhttps://api.datadoghq.com

Supported Commands

SignalCommandsNot Supported
Metricquery, list, infolabels, label-values, series
Logsearch, aggregate
Tracesearch, get, aggregate

Datadog's API doesn't expose label/series enumeration endpoints, so those three metric commands are unavailable.

Extension commands

obz log aggregate    # Aggregate logs (requires --query, optional --compute, --group-by, both repeatable)
obz trace aggregate  # Aggregate traces (same flags as log aggregate)

Authentication

Datadog requires two keys for every request. Configure them in config.yaml under providers.<name>.auth:

# config.yaml
providers:
  dd:
    endpoint: https://api.datadoghq.com
    auth:
      api-key: ${env:DD_API_KEY}
      app-key: ${env:DD_APP_KEY}

Then query with just -p:

obz metric query -p dd -q 'avg:system.cpu.user{*}' --from now-1h

Regional Endpoints

Datadog operates multiple regional sites. Set --endpoint to the correct one:

RegionEndpoint
US1 (default)https://api.datadoghq.com
US3https://api.us3.datadoghq.com
US5https://api.us5.datadoghq.com
EUhttps://api.datadoghq.eu
AP1https://api.ap1.datadoghq.com

If --endpoint is omitted, the default US1 endpoint is used.

Config File Setup

# ~/.config/obz/config.yaml
providers:
  dd-prod:
    provider: dd
    endpoint: https://api.datadoghq.com
    auth:
      api-key: ${env:DD_API_KEY}
      app-key: ${env:DD_APP_KEY}

Then:

obz metric query -p dd-prod -q 'avg:system.cpu.user{*}' --from now-1h

Datadog Query Language (Metrics)

Datadog metric queries follow the pattern:

<aggregation>:<metric_name>{<filter>}

Aggregation Functions

avg, sum, min, max, count

Tag Filters

Tags go inside curly braces, comma-separated:

avg:system.cpu.user{host:web-01}
sum:http.requests{service:api, env:prod}
avg:system.mem.used{*}

The wildcard {*} matches all hosts/tags.

Arithmetic and Functions

avg:system.cpu.user{*} + avg:system.cpu.system{*}
avg:system.cpu.user{*}.rollup(avg, 300)
per_second(sum:http.requests{*})

Space Aggregation (by/as)

avg:system.cpu.user{*} by {host}
sum:http.requests{*} by {service, env}

Common Pitfalls

  • The aggregation prefix (avg:, sum:, etc.) is required. Bare metric names like system.cpu.user{*} will fail.
  • Tag values don't use quotes: {host:web-01} not {host:"web-01"}.
  • Datadog queries are NOT PromQL. Don't use rate() or [5m] syntax.
  • .rollup() controls time aggregation. Without it, Datadog picks automatic rollup intervals.

Datadog Log Query (Logs)

Datadog log queries filter on facets and tags.

Basic Syntax

service:web
status:error
service:web status:error

Multiple terms are AND-ed by default.

Field Queries

@http.status_code:500
@duration:>1000
host:web-01

Prefixed @ fields are log attributes. Unprefixed fields are reserved tags (service, status, host, source).

Boolean and Grouping

service:web AND (status:error OR status:warn)
service:web NOT @http.url:"/health"

Wildcards

service:web-*
@http.url:"/api/*"

Common Pitfalls

  • Reserved tags (service, status, host, source) don't take the @ prefix. Custom attributes do.
  • String values with special characters need quotes: @http.url:"/api/v1/users".
  • The default combiner is AND. Explicit OR requires parentheses for correct grouping.

Examples

Metric query:

obz metric query -p dd -q 'avg:system.cpu.user{*}' --from now-1h

Metric query with tag filter and grouping:

obz metric query -p dd-prod \
  -q 'avg:system.cpu.user{env:prod} by {host}' --from now-6h

List available metrics:

obz metric list -p dd-prod

Get metric metadata:

obz metric info -p dd-prod system.cpu.user

Log search:

obz log search -p dd -q 'service:web status:error' --from now-1h

Log search with attribute filter (pre-configured):

obz log search -p dd-prod \
  -q 'service:api @http.status_code:500' --from now-30m

Trace search:

obz trace search -p dd-prod -q 'service:api' --from now-1h

Get a specific trace:

obz trace get -p dd-prod abc123def456

Aggregate log counts by service:

obz log aggregate -p dd -q 'status:error' --compute count --group-by service --from now-1h

Aggregate trace durations:

obz trace aggregate -p dd -q 'service:api' --compute 'avg:@duration' --group-by resource_name --from now-1h

EU region endpoint (set endpoint in config or override with --endpoint):

obz metric query -p dd --endpoint https://api.datadoghq.eu \
  -q 'avg:system.cpu.user{*}' --from now-1h

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

obz-core

無料

Multi-backend observability CLI for querying metrics, logs, and traces across 12 backends. This skill should be used when the user runs obz commands, constructs metric/log/trace queries, configures providers, parses obz JSON output, or troubleshoots obz errors. Covers all core commands (metric query/list/info/labels/label-values/series, log search, trace search/get), global flags, time formats, output modes, config files, and exit codes.

日本語の概要は準備中です。原文の説明を表示しています。

alibaba/obz-cli282026年7月12日 更新

Elasticsearch provider for obz. Supports log search and trace operations using Elasticsearch Query DSL (Lucene-based). Requires --index flag. This skill should be used when the user mentions "Elasticsearch", "obz -p es", or needs to search logs or traces from an Elasticsearch cluster.

日本語の概要は準備中です。原文の説明を表示しています。

alibaba/obz-cli282026年7月12日 更新

GreptimeDB provider for obz. Covers PromQL metric query, labels, label-values, and series commands via GreptimeDB's Prometheus-compatible API. Use this skill when the user mentions "GreptimeDB", "Greptime", "obz metric -p greptimedb", or needs to query metrics stored in a GreptimeDB instance.

日本語の概要は準備中です。原文の説明を表示しています。

alibaba/obz-cli282026年7月12日 更新

Jaeger provider for obz. Covers trace search, trace retrieval by ID, and extension commands for service and operation discovery. This skill should be used when the user mentions "Jaeger", "obz trace -p jg", or needs to search distributed traces from a Jaeger backend.

日本語の概要は準備中です。原文の説明を表示しています。

alibaba/obz-cli282026年7月12日 更新

obz-loki

無料

Grafana Loki provider for obz. Covers log search using LogQL, a label-based query language for log aggregation. This skill should be used when the user mentions "Loki", "Grafana Loki", "LogQL", "obz log search -p loki", or needs to search logs from a Loki instance.

日本語の概要は準備中です。原文の説明を表示しています。

alibaba/obz-cli282026年7月12日 更新

obz-mimir

無料

Grafana Mimir provider for obz. Covers all 6 metric commands using standard PromQL. Mimir is a horizontally-scalable Prometheus-compatible TSDB. This skill should be used when the user mentions "Mimir", "Grafana Mimir", "obz metric -p mimir", or needs to query metrics from a Mimir cluster.

日本語の概要は準備中です。原文の説明を表示しています。

alibaba/obz-cli282026年7月12日 更新

alibaba のスキルをすべて見る

このスキルの問題を報告する