Quiz: Grafana¶
3 questions
L0 (1 questions)¶
1. How do you use Grafana template variables to make dashboards dynamic?
Show answer
Variables are defined in Dashboard Settings > Variables. Syntax in queries: $variable or ${variable}. Types: Query (populated from data source, e.g., label_values(up, job)), Custom (static list), Interval (time bucketing). Reference in panel queries like: rate(http_requests_total{job="$job"}[5m]). Multi-value variables use regex: {job=~"$job"} with Include All option.L1 (2 questions)¶
1. Grafana dashboard shows 'No data'. What do you check?
Show answer
1. Data source connection (Settings > Data Sources > Test).2. Time range too narrow or in the future.
3. Query syntax errors (run in Explore).
4. Metric name changed or missing labels.
2. A Grafana dashboard shows gaps in metric data. What are the common causes?
Show answer
1. Scrape target was down (Prometheus could not reach it).2. Time range includes periods before the metric existed.
3. Query uses rate() on a counter that reset (shows as gap unless using increase()).
4. Stale markers: target removed, series goes stale after 5 minutes.
5. Step/resolution mismatch: query step larger than scrape interval.
6. Null values: use 'connect null values' panel option to bridge gaps.