仪表板生成器 dashboard-generator

仪表板生成器技能是一个自动化工具,用于为Grafana和DataDog等监控平台快速创建和配置监控仪表板。该技能支持从JSON/YAML定义生成完整的仪表板布局,包括面板配置、告警规则集成、变量模板化和版本控制。主要功能包括:多平台仪表板生成、面板模板化、告警集成、可观测性实施、性能监控和弹性架构支持。适用于DevOps团队、SRE工程师和系统管理员,帮助实现系统监控自动化和可视化。关键词:仪表板生成,监控工具,Grafana,DataDog,告警集成,可观测性,DevOps,性能监控,面板配置,自动化部署。

DevOps 0 次安装 0 次浏览 更新于 2/26/2026

name: dashboard-generator description: 为Grafana和DataDog生成监控仪表板,并集成告警功能 allowed-tools:

  • Bash
  • Read
  • Write
  • Glob

仪表板生成器技能

概述

根据JSON/YAML定义生成Grafana和DataDog的监控仪表板,包含面板配置和告警规则集成。

能力

  • 从JSON/YAML生成Grafana仪表板
  • 创建DataDog仪表板
  • 面板配置和模板
  • 告警规则集成
  • 变量模板化
  • 注释支持
  • 仪表板版本控制
  • 行和面板布局

目标流程

  • 可观测性实施
  • 性能优化
  • 弹性模式

输入模式

{
  "type": "object",
  "required": ["dashboards"],
  "properties": {
    "dashboards": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "type": { "type": "string", "enum": ["service", "infrastructure", "business", "slo"] },
          "metrics": { "type": "array" },
          "panels": { "type": "array" }
        }
      }
    },
    "platform": {
      "type": "string",
      "enum": ["grafana", "datadog", "cloudwatch"],
      "default": "grafana"
    },
    "options": {
      "type": "object",
      "properties": {
        "datasource": {
          "type": "string",
          "default": "prometheus"
        },
        "refreshInterval": {
          "type": "string",
          "default": "30s"
        },
        "timeRange": {
          "type": "string",
          "default": "6h"
        },
        "includeAlerts": {
          "type": "boolean",
          "default": true
        },
        "variables": {
          "type": "array"
        }
      }
    }
  }
}

输出模式

{
  "type": "object",
  "properties": {
    "dashboards": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "uid": { "type": "string" },
          "json": { "type": "object" },
          "path": { "type": "string" }
        }
      }
    },
    "alerts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "condition": { "type": "string" },
          "threshold": { "type": "number" }
        }
      }
    },
    "variables": {
      "type": "array"
    }
  }
}

使用示例

{
  kind: 'skill',
  skill: {
    name: 'dashboard-generator',
    context: {
      dashboards: [
        {
          name: 'API服务概览',
          type: 'service',
          metrics: ['http_requests_total', 'http_request_duration_seconds'],
          panels: [
            { type: 'graph', title: '请求速率' },
            { type: 'stat', title: '错误率' }
          ]
        }
      ],
      platform: 'grafana',
      options: {
        datasource: 'prometheus',
        includeAlerts: true
      }
    }
  }
}