跳到正文
cccskills
免费在 GitHub 公开

obz-prometheus

Prometheus provider for obz. Covers all 6 metric commands using standard PromQL. This skill should be used when the user mentions "Prometheus", "PromQL", "obz metric -p prom", or needs to query metrics from a Prometheus server.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

obz-prometheus: Prometheus Provider

Quick Reference

FieldValue
Aliasesprom, prometheus
SignalMetric
Query languagePromQL
AuthBearer token or Basic auth
Provider flagsNone
Supported cmdsquery, list, info, labels, label-values, series

Supported Commands

All six core metric commands work with this provider:

obz metric query        # Run an instant or range PromQL query
obz metric list         # List available metric names
obz metric info         # Show metadata for a specific metric
obz metric labels       # List all known label names
obz metric label-values # List values for a given label
obz metric series       # List matching time series

Authentication

Configure auth in config.yaml under providers.<name>.auth. Supports bearer token, basic auth, or no auth.

# config.yaml
providers:
  prom:
    endpoint: http://localhost:9090
    auth:
      token: ${env:PROM_TOKEN}

For basic auth:

    auth:
      username: admin
      password: ${env:PROM_PASS}

Then query with just -p:

obz metric query -p prom -q 'up'

PromQL Guide

Prometheus uses standard PromQL. Unlike VictoriaMetrics, there are no MetricsQL extensions like keep_metric_names or range_normalize.

Common Patterns

rate(http_requests_total[5m])
sum by (job) (up)
histogram_quantile(0.99, rate(http_duration_seconds_bucket[5m]))
avg_over_time(cpu_usage[1h])

Duration Units

PromQL supports ms, s, m, h, d, w, y. Note that d always means exactly 24h and w means 7d, with no calendar awareness.

Examples

Instant query:

obz metric query -p prom -q 'up' --from now-1h

Range query with step:

obz metric query -p prom -q 'rate(http_requests_total[5m])' \
  --from now-1d --to now --step 5m

List metric names:

obz metric list -p prom

Find series matching a selector:

obz metric series -p prom --match '{job="api", env="prod"}'

List values of a label:

obz metric label-values -p prom job

Prometheus vs VictoriaMetrics

FeaturePrometheusVictoriaMetrics
PromQLYesYes
MetricsQL extensionsNoYes
keep_metric_namesNoYes
range_normalizeNoYes
d/w duration unitsYesYes

If you find yourself needing MetricsQL-only features, switch to the vm provider instead.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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

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

查看 alibaba 的全部技能

报告此技能的问题