Skip to content

Grafana 치트시트

메트릭용 오픈소스 분석·시각화 플랫폼입니다.

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

주요 기능

변수(Variables)

대시보드 변수로 동적 필터링을 구현합니다.

grafana
query: label_values(node_uname_info, job)

어노테이션(Annotations)

어노테이션으로 그래프 위에 이벤트를 표시합니다.

grafana
{
  "name": "Deploys",
  "datasource": "Prometheus",
  "expr": "changes(deploy_total[1m]) > 0"
}

알림(Alerting)

알림 채널과 함께 경보를 설정할 수 있습니다.

grafana
- Rule: avg(rate(http_requests[5m])) > 100
- For: 10m
- Notification: Slack #alerts

Was this helpful?