01
快速上手
数据源
Grafana 支持多种数据源。
grafana
Prometheus, InfluxDB, Elasticsearch, MySQL, PostgreSQL, Loki, Jaeger仪表盘 JSON
仪表盘可以序列化为 JSON。
grafana
{
"panels": [{
"type": "graph",
"title": "CPU Usage",
"datasource": "Prometheus",
"targets": [{ "expr": "rate(cpu_seconds[5m])" }]
}]
}02
核心特性
变量
仪表盘变量实现动态筛选。
grafana
query: label_values(node_uname_info, job)注释
在图表上标注事件。
grafana
{
"name": "Deploys",
"datasource": "Prometheus",
"expr": "changes(deploy_total[1m]) > 0"
}告警
通过通知渠道发送告警。
grafana
- Rule: avg(rate(http_requests[5m])) > 100
- For: 10m
- Notification: Slack #alerts这篇内容对您有帮助吗?