跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

signoz-managing-views

Use when the user wants to create, list, get, update, rename, or delete a SigNoz saved Explorer view. Trigger on phrases like "save this query as a view", "save this filter", "bookmark this search", "list my saved views", "show me views for traces/logs/metrics/meter", "rename the X view", "update my saved view to also filter Y", "delete the X view", or any request to manage Explorer saved views — even if they don't say "view" explicitly. Also use when someone wants to share a recurring Explorer query with their team and asks how to "save" or "bookmark" it.

SigNoz · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add SigNoz/agent-skills --skill signoz-managing-views

技能说明


name: signoz-managing-views description: > Use when the user wants to create, list, get, update, rename, or delete a SigNoz saved Explorer view. Trigger on phrases like "save this query as a view", "save this filter", "bookmark this search", "list my saved views", "show me views for traces/logs/metrics/meter", "rename the X view", "update my saved view to also filter Y", "delete the X view", or any request to manage Explorer saved views, even if they don't say "view" explicitly. Also use when someone wants to share a recurring Explorer query with their team and asks how to "save" or "bookmark" it. argument-hint: <view name, sourcePage (traces/logs/metrics/meter), and filter intent>

Managing Saved Views

Create, read, update, and delete SigNoz saved Explorer views via the SigNoz MCP server. A saved view is a reusable snapshot of an Explorer query on the Logs, Traces, Metrics, or Cost Meter page: name + filters + panel type, scoped to one sourcePage. They are not dashboards and not alerts.

This skill covers the full CRUD surface in one place because the operations share the same schema, the same identity model (UUID per view), and the same prerequisite resources. The only operation with real blast radius is delete, and update has a sharp edge (full-body replace); both get explicit guards below.

Prerequisites

This skill calls SigNoz MCP server tools (signoz_create_view, signoz_list_views, signoz_get_view, signoz_update_view, signoz_delete_view, signoz_get_field_keys, signoz_get_field_values). Before running the workflow, confirm the signoz_* tools are available. If they are not, run signoz-mcp-setup first to initialize or repair the MCP connection. Do not fall back to raw HTTP calls or fabricate view payloads without the MCP tools.

When to use

Use this skill when the user wants to:

  • Create a saved view from a current or described Explorer query.
  • List / find existing views (by sourcePage, name, or category).
  • Inspect a single view's filter or panel type.
  • Update a view: rename, recategorize, or change its filter, panel type, or aggregations.
  • Delete a view that is no longer useful.

Do NOT use when the user wants to:

  • Build a dashboard panel → signoz-creating-dashboards / signoz-modifying-dashboards.
  • Run an ad-hoc Explorer query without saving it → signoz-generating-queries.
  • Create or change an alert rule → signoz-creating-alerts.

Schema reference

Read both resources BEFORE composing any create or update payload. Do not hand-compose a compositeQuery from memory. The correct schema is not the legacy builder.queryData format; it is the v5 spec described in these resources. Sending a legacy payload causes a silent HTTP 400.

Read both MCP resources by URI using your client's resource-read mechanism:

  • signoz://view/instructions: SavedView field reference, sourcePage rules, the GET-then-PUT update flow, the minimal create body.
  • signoz://view/examples: round-tripped payloads (traces list, logs list, metrics graph, and a Cost Meter graph) you can adapt verbatim.

The server returns HTTP 400 on legacy v3/v4 fields (builder, promql, unit, top-level id, queryFormulas, queryTraceOperator); the failure mode is silent for the user, so reading the resources first is mandatory, not optional.

Operation flows

Create a view

  1. Resolve sourcePage: must be exactly one of traces, logs, metrics, meter. If the user's intent is ambiguous ("save this query"), ask which Explorer they mean. It cannot be inferred from filter strings alone. Use meter for Cost Meter (usage / billing) views; it is a distinct Explorer page from metrics, even though the query runs on the metrics signal (see Step 4).

  2. Read the schema resources. Read both signoz://view/instructions and signoz://view/examples using your client's resource-read mechanism before composing any payload. Do not skip this step even if you think you know the schema; the legacy builder.queryData format is rejected with HTTP 400.

  3. Build the query using signoz-generating-queries, mandatory. Use the Skill tool to invoke signoz-generating-queries. The sub-skill handles field discovery, type checking, and live-data validation in one pass; adapting an example payload from signoz://view/examples or running a bare signoz_search_traces call skips the field-type checks and service-name resolution that catch silent 400s before they become permanent bad views. Skipping it means a malformed filter becomes a saved view that must be deleted and recreated. For a meter view, tell signoz-generating-queries it's a Cost Meter query (source=meter) so discovery hits the meter store, not the default one. Retain the exact query argument from its successful signoz_execute_builder_query validation call, then translate it explicitly:

    execution query.compositeQuery.queries
      -> saved compositeQuery.queries
    

    Build the top-level compositeQuery argument to signoz_create_view as { "queryType": "builder", "panelType": "<list|graph|table|value>", "queries": <copied queries> }. Copy the queries array losslessly, but do not copy the execution-only envelope fields schemaVersion, start, end, requestType, formatOptions, or variables; do not put a query key or a second nested compositeQuery inside the saved object. Choose panelType from the saved-view intent rather than inventing it from the execution envelope. The copied queries must retain every positive spec.limit and v5 spec.order entry losslessly. Never translate them to dashboard orderBy. Raw/list views use 100 rows (logs: timestamp/id desc; traces: timestamp desc); standalone aggregate views and formula results use 100 groups. Builder queries referenced by a formula use 10000 b

阅读完整来源 ↗