Skip to content

Advanced Dashboard Features

Grafana dashboards can be extended with dynamic variables, contextual navigation via row links, and custom alerting rules to enhance observability workflows. These features enable tailored monitoring experiences, reduce manual configuration, and improve incident response efficiency.


Variables for Dynamic Filtering

Variables allow users to interact with dashboards by filtering data dynamically. They are especially useful for selecting specific services, environments, or time ranges.

Example: Service Dropdown Variable

http_requests_total

Variable Types

  • Constant: Fixed values (e.g., prod, staging)
  • Query: Dynamic values from Prometheus (e.g., service names)
  • Regex: Pattern-based filtering (e.g., prod-.*)

Usage in Panels

Use variables in queries by prefixing them with $ (e.g., http_requests_total{job="$job"}).


Row links let users jump between panels or external resources based on data in a row. This is ideal for drilling down into specific metrics or triggering workflows.

{
  "type": "absolute",
  "url": "http://grafana.example.com/d/abc123/service-metrics?var-job=$job"
}
  • Absolute: Direct URL to another dashboard or external site
  • Relative: Navigate within the same dashboard
  • Regex: Match patterns in row data to construct URLs

Configuration

  1. Edit a row → "Row link" → Select link type
  2. Use $-prefixed variables in the URL

Dashboard-Specific Alerting Rules

Alerting rules tied to a dashboard ensure metrics relevant to that view are monitored. These rules can trigger notifications via Slack, email, or PagerDuty.

Example: High Latency Alert

- alert: HighLatency
  expr: avg_over_time(http_request_latency_seconds{job="$job"}[5m]) > 0.5
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: "High latency in {{ $labels.job }}"
    description: "Average latency exceeds 0.5s"

Configuration Steps

  1. Open dashboard → "Alerting" tab
  2. Add a new rule → Select "Dashboard" as the rule scope
  3. Define conditions, thresholds, and notification channels

Key takeaways

  • Variables make dashboards reusable by dynamically filtering data.
  • Row links enable seamless navigation between related metrics or external systems.
  • Dashboard-specific alerts ensure critical metrics are monitored without polluting global alerting configurations.