interview-prep

Crisp answer: Grafana is an open-source dashboard and visualisation platform. It connects to data sources (Prometheus, CloudWatch, Elasticsearch, Loki, InfluxDB) and renders metrics and logs as charts, graphs, and tables. It also supports alerting rules directly on dashboards.

What Grafana does:

Grafana does not store data — it queries data sources and visualises the results. You build dashboards from panels, each panel running a query against a data source.

Data sources Grafana supports:
  Prometheus / Thanos / VictoriaMetrics  — time-series metrics
  CloudWatch                              — AWS metrics and logs
  Elasticsearch / OpenSearch             — log search and aggregation
  Loki                                   — log aggregation (Grafana's own)
  InfluxDB                               — time-series metrics
  PostgreSQL / MySQL                     — SQL databases
  Graphite                               — legacy metrics (Mimecast uses this)
  Datadog, Splunk, Tempo, Jaeger         — many more via plugins

Panel types:

Time series:  Line/bar chart of a metric over time (most common)
Stat:         Single number — current value of a metric
Gauge:        Current value with min/max (like a speedometer)
Table:        Tabular data — good for top-N queries
Logs:         Log lines with colour coding
Heatmap:      Distribution over time (latency percentiles)
Alert list:   Current firing alerts

PromQL queries (Prometheus data source):

# CPU usage for a node
100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)

# HTTP error rate
sum(rate(http_requests_total{status=~"5.."}[5m]))
/ sum(rate(http_requests_total[5m]))

# Memory usage in bytes
container_memory_working_set_bytes{pod="my-pod"}

# 95th percentile request latency
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))

Alerting in Grafana:

Grafana has its own alerting engine (Grafana Alerting, introduced in v9). You define alert rules on panels, set thresholds, and route alerts to contact points: email, Slack, PagerDuty, OpsGenie.

Alert rule:    If avg CPU > 80% for 5 minutes → fire alert
Contact point: Send to #alerts Slack channel and PagerDuty
Silence:       Suppress alerts for a time window (maintenance)

Grafana in a Kubernetes observability stack:

kube-state-metrics         → exposes K8s object state as Prometheus metrics
node-exporter              → exposes node-level metrics (CPU, memory, disk)
Prometheus                 → scrapes both, stores time-series
Grafana                    → queries Prometheus, shows dashboards

Common dashboards used:
  - Kubernetes cluster overview (nodes, pods, CPU, memory)
  - Node exporter full (disk, network, filesystem)
  - Pod resource usage
  - Alert overview

Grafana in your homelab:

You run the full LGTM stack: Loki (logs), Grafana (dashboards), Tempo (traces), Mimir (metrics). Grafana is the single pane of glass across all four. This is a strong talking point.

What to say in the interview:

"Grafana is my primary dashboard tool — I run it in my homelab as part of the LGTM stack connected to Prometheus, Loki, and Tempo. The key thing about Grafana is it does not store data itself, it queries data sources and renders them. For Kubernetes I use the standard node-exporter and kube-state-metrics dashboards for cluster health, and custom dashboards for application metrics from Prometheus. Grafana Alerting lets you define alert rules directly on dashboard panels and route them to Slack or PagerDuty, which keeps alert configuration close to the visualisation."


My notes