UNPKG

openclaw-grafana-lens

Version:

OpenClaw plugin that gives AI agents full Grafana access — 18 composable tools for PromQL/LogQL/TraceQL queries, dashboard creation, alerting, SRE investigation, security monitoring, data collection pipeline management via Grafana Alloy (29 recipes), and

25 lines (24 loc) 982 B
/** * Grafana Lens — OpenClaw Extension Entry Point * * This is the main entry point for the Grafana Lens extension. * It follows the same pattern as diagnostics-otel: * * 1. Export a default OpenClawPluginDefinition * 2. In register(), set up services and tools using the Plugin API * 3. Services handle background work (metrics collection via OTLP push) * 4. Tools handle agent-invoked actions (dashboard creation) * * Architecture (self-contained — all Grafana interaction via bundled GrafanaClient): * - MetricsCollector service: subscribes to diagnostic events → pushes via OTLP * - createDashboardTool: agent tool wrapping Grafana's dashboard API * - Skill file (skills/SKILL.md): teaches the agent when to use these tools */ import type { OpenClawPluginApi } from "openclaw/plugin-sdk"; declare const plugin: { id: string; name: string; description: string; register(api: OpenClawPluginApi): void; }; export default plugin;