跳到正文
cccskills
免费在 GitHub 公开

obz-vl

VictoriaLogs provider for obz. Supports log search using LogsQL, a purpose-built query language with _msg, _time, and _stream filters plus pipes for transformation. This skill should be used when the user mentions "VictoriaLogs", "LogsQL", "obz log search -p vl", or needs to search logs from a VL backend.

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

查看安装方法

包含的文件(1)

  • SKILL.md5.0 KB

SKILL.md(原文)

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

obz-vl: VictoriaLogs Provider

Quick Reference

FieldValue
Aliasesvl, victorialogs
SignalLog
Query languageLogsQL
AuthBearer token, Basic auth, or none
Provider flags--account-id, --project-id
Supported cmdslog search, field-names, field-values, hits, stats

Supported Commands

Core log commands

obz log search         # Search log entries using LogsQL

Extension commands

obz log field-names    # List available field names (optional --query filter)
obz log field-values   # List values for a field (requires --field)
obz log hits           # Show log volume over time (optional --step)
obz log stats          # Run stats aggregation (requires --query)

Authentication

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

# config.yaml
providers:
  vl:
    endpoint: http://localhost:9428
    auth:
      token: ${env:VL_TOKEN}

Then query with just -p:

obz log search -p vl -q 'error' --from now-1h

Provider-Specific Flags

FlagTypeRequiredDescription
--account-idStringNoMulti-tenant AccountID
--project-idStringNoMulti-tenant ProjectID

These flags are only needed when querying a multi-tenant VictoriaLogs cluster.

obz log search -p vl --account-id 12 --project-id 34 \
  -q 'error' --from now-1h

Config File Setup

# ~/.config/obz/config.yaml
providers:
  prod-vl:
    provider: vl
    endpoint: https://vl.prod.example.com
    account-id: "12"
    project-id: "34"
    auth:
      token: ${env:VL_TOKEN}

Then:

obz log search -p prod-vl -q 'error' --from now-1h

LogsQL Guide

LogsQL queries are built from filters combined with AND/OR/NOT operators and optional pipes for post-processing.

Built-in Fields

  • _msg contains the log message body
  • _time holds the timestamp
  • _stream identifies the log stream (typically {key="value"} pairs)

Filter Types

Word filter (matches exact word in _msg):

error

Phrase filter (matches exact phrase):

"connection refused"

Prefix filter (matches word prefix):

err*

Regex filter:

_msg:re("error|warn")

Field filter (match on a specific field):

level:error
host:web-01

Stream filter (filter by log stream labels):

_stream:{job="api", instance="web-01"}

Time filter (usually set via --from/--to flags instead):

_time:[2024-01-01, 2024-01-02)

Combining Filters

AND (implicit when space-separated):

error _stream:{job="api"}

Explicit AND/OR/NOT:

(error OR warn) AND _stream:{job="api"} NOT "health check"

Pipes

Pipes transform results after filtering:

error | stats by (host) count() as errors
error | sort by (_time) desc | limit 50
error | fields _time, _msg, host
error | uniq by (host)

Common Pitfalls

  • Bare words match against _msg by default. To match a specific field, use field:value syntax.
  • Stream filters use curly braces: _stream:{job="api"}. Don't forget the _stream: prefix.
  • Regex filters require the re() wrapper: _msg:re("pattern").
  • Pipes use | as separator. The filter portion comes first, pipes after.

Examples

Simple word search:

obz log search -p vl -q 'error' --from now-1h

Stream-scoped search:

obz log search -p vl -q 'error AND _stream:{job="api"}' --from now-1h

Regex filter on message:

obz log search -p vl -q '_msg:re("timeout|refused")' --from now-6h

Field filter with pipe:

obz log search -p vl \
  -q 'level:error | stats by (host) count() as errors' --from now-1d

Multi-tenant query:

obz log search -p vl --account-id 12 --project-id 34 \
  -q '"connection reset"' --from now-30m

List field names:

obz log field-names -p vl --from now-1h

List values for a field:

obz log field-values -p vl --field level --from now-1h

Log volume histogram:

obz log hits -p vl -q 'error' --from now-1h --step 5m

Stats aggregation:

obz log stats -p vl -q 'error | stats by (service) count() as errors' --from now-1h

评价

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

评论

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

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

提交后会立即公开。请勿填写邮箱、电话等个人信息。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 的全部技能

报告此技能的问题