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

obz-greptimedb

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.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.5 KB

SKILL.md(原文)

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

obz-greptimedb: GreptimeDB Provider

Quick Reference

FieldValue
Aliasesgreptimedb, greptime
SignalMetric
Query languagePromQL
Default port4000 (HTTP)
AuthBearer token, Basic auth, or no auth
Provider flagsNone
Configendpoint root URL, required db
Supported cmdsquery, labels, label-values, series

Supported Commands

GreptimeDB supports these metric commands:

obz metric query        # Run an instant or range PromQL query
obz metric labels       # List all known label names
obz metric label-values # List values for a given label (requires --match)
obz metric series       # List matching time series

obz metric info is not declared as supported because GreptimeDB does not currently expose the Prometheus metadata endpoint used by that command.

obz metric list is also not declared as supported. Local E2E against GreptimeDB v1.0.1 showed /label/__name__/values can return an empty list, and GreptimeDB documentation does not guarantee reliable metric-list semantics. Use obz metric series --match ... or query known metric names instead.

Quick Start

# Instant query
obz metric query -p greptimedb --endpoint http://localhost:4000 -q 'up'

# Range query (last hour, auto step)
obz metric query -p greptimedb --endpoint http://localhost:4000 \
  -q 'rate(http_requests_total[5m])' --from now-1h

# List label names
obz metric labels -p greptimedb --endpoint http://localhost:4000

# Get label values. GreptimeDB requires an explicit series selector.
obz metric label-values -p greptimedb --endpoint http://localhost:4000 job \
  --match 'up'

# Discover matching series when you know a selector.
obz metric series -p greptimedb --endpoint http://localhost:4000 \
  --match '{__name__="up"}'

Authentication

GreptimeDB supports bearer token auth, basic auth (username + password), or no auth. Configure credentials in ~/.config/obz/config.yaml:

providers:
  greptime-prod:
    provider: greptimedb
    endpoint: http://localhost:4000
    db: metrics
    auth:
      username: ${env:GREPTIME_USER}
      password: ${env:GREPTIME_PASS}

For token-based deployments:

providers:
  greptime-cloud:
    provider: greptimedb
    endpoint: https://greptime.example.com
    db: public
    auth:
      token: ${env:GREPTIME_TOKEN}

Then query with just -p:

obz metric query -p greptime-prod -q 'up'

For unauthenticated local development instances:

providers:
  greptime-local:
    provider: greptimedb
    endpoint: http://localhost:4000
    db: public

API Endpoints

GreptimeDB exposes a Prometheus-compatible HTTP API under /v1/prometheus. Configure endpoint as the root HTTP(S) URL only. It must not include any path, query string, or fragment; obz appends the API path and injects the db query parameter automatically.

Valid:

endpoint: http://localhost:4000
db: metrics

Invalid:

endpoint: http://localhost:4000?db=metrics
endpoint: http://localhost:4000/dashboard
endpoint: http://localhost:4000/v1/prometheus
endpoint: http://localhost:4000/api/v1

obz routes supported commands to these paths:

CommandEndpoint
metric query (instant)GET /v1/prometheus/api/v1/query
metric query (range)GET /v1/prometheus/api/v1/query_range
metric labelsGET /v1/prometheus/api/v1/labels
metric label-valuesGET /v1/prometheus/api/v1/label/{name}/values
metric seriesGET /v1/prometheus/api/v1/series
provider checkGET /v1/health

Database Selection

GreptimeDB routes Prometheus API requests by the db query parameter. obz requires db in the provider config and injects it into every GreptimeDB Prometheus API request. Use db: public when targeting GreptimeDB's standard public database:

providers:
  greptime-prod:
    provider: greptimedb
    endpoint: http://localhost:4000
    db: metrics

PromQL Guide

GreptimeDB supports standard PromQL. Common patterns:

# Current value of a gauge
node_memory_MemAvailable_bytes

# Per-second rate over 5 minutes
rate(http_requests_total[5m])

# Aggregation
sum by (job) (up)

# Histogram quantile
histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m]))

Provider Check

Verify connectivity:

providers:
  greptimedb:
    provider: greptimedb
    endpoint: http://localhost:4000
    db: public
obz provider check greptimedb

This issues a GET /v1/health request to confirm the GreptimeDB instance is reachable.

レビュー

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

同じリポジトリのスキル

概要と使いどころ

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日 更新

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.

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

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日 更新

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 のスキルをすべて見る

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