How to Create Dashboard in Grafana

How to Create Dashboard in Grafana Grafana is one of the most powerful and widely adopted open-source platforms for monitoring and observability. Whether you're tracking server performance, application metrics, network traffic, or IoT sensor data, Grafana empowers you to visualize complex datasets through intuitive, interactive dashboards. Creating a dashboard in Grafana is not just about plotting

Nov 6, 2025 - 10:31
Nov 6, 2025 - 10:31
 1

How to Create Dashboard in Grafana

Grafana is one of the most powerful and widely adopted open-source platforms for monitoring and observability. Whether you're tracking server performance, application metrics, network traffic, or IoT sensor data, Grafana empowers you to visualize complex datasets through intuitive, interactive dashboards. Creating a dashboard in Grafana is not just about plotting graphsits about transforming raw metrics into actionable insights that drive decision-making, improve system reliability, and optimize operational efficiency.

In todays data-driven environments, organizations rely on real-time visibility into their infrastructure and applications. Traditional logging and alerting systems often fall short without a centralized, visual interface. Grafana bridges this gap by integrating seamlessly with a wide range of data sourcesPrometheus, InfluxDB, Elasticsearch, PostgreSQL, MySQL, AWS CloudWatch, and moreallowing users to build custom dashboards tailored to their unique monitoring needs.

This comprehensive guide walks you through every step of creating a dashboard in Grafana, from initial setup to advanced customization. Whether youre a beginner taking your first steps into observability or an experienced DevOps engineer looking to refine your workflow, this tutorial will equip you with the knowledge and techniques to build professional, high-performance dashboards that deliver real business value.

Step-by-Step Guide

Step 1: Install and Set Up Grafana

Before you can create a dashboard, you need a running instance of Grafana. Grafana can be installed on Linux, macOS, Windows, or deployed via Docker and Kubernetes. For most users, the easiest method is using Docker.

To install Grafana using Docker, open your terminal and run:

docker run -d -p 3000:3000 --name=grafana grafana/grafana

This command downloads the latest Grafana image and starts a container exposing port 3000. Once the container is running, navigate to http://localhost:3000 in your browser. The default login credentials are admin for both username and password. Youll be prompted to change the password on first login.

If you prefer a native installation, visit the official Grafana downloads page (grafana.com/download) and follow the instructions for your operating system. For cloud deployments, Grafana Labs offers managed Grafana instances via Grafana Cloud, which eliminates the need for infrastructure management.

Step 2: Add a Data Source

A dashboard in Grafana is only as good as the data it visualizes. The first step in building a dashboard is connecting it to a data source. Grafana supports over 60 data sources, including time-series databases, SQL databases, cloud providers, and log systems.

To add a data source:

  1. Log in to your Grafana instance.
  2. Click the gear icon in the left sidebar to open the Configuration menu.
  3. Select Data Sources.
  4. Click Add data source.
  5. Choose your preferred data source from the list. For this guide, well use Prometheus as its the most common companion to Grafana.

After selecting Prometheus, youll be presented with a configuration form. The most critical field is URL. If Prometheus is running locally, enter http://localhost:9090. If Prometheus is on a remote server, use its IP address or domain name. You can leave other settings at default unless authentication is required.

Click Save & Test. If successful, youll see a green confirmation message: Data source is working. If not, verify that Prometheus is running and accessible from Grafanas network.

Step 3: Create a New Dashboard

Once your data source is configured, youre ready to create a dashboard. There are two primary ways to create one:

  • From scratch (recommended for custom dashboards)
  • By importing a pre-built template (ideal for quick starts)

To create a dashboard from scratch:

  1. Click the + icon in the left sidebar.
  2. Select Dashboards, then New Dashboard.
  3. Youll be taken to an empty dashboard with a panel placeholder labeled Add a new panel.

Alternatively, you can click New Dashboard from the main dashboard list page. This opens the same empty canvas.

Step 4: Add and Configure Panels

Panels are the building blocks of every Grafana dashboard. Each panel displays a single visualizationsuch as a graph, gauge, table, or statbased on a query to your data source.

To add a panel:

  1. Click Add panel.
  2. In the panel editor, select your data source from the dropdown (e.g., Prometheus).
  3. In the query editor, enter a metric query. For example, to monitor CPU usage, type: rate(node_cpu_seconds_total{mode!="idle"}[5m]) * 100. This calculates the percentage of CPU time spent in non-idle states over the last 5 minutes.
  4. Click the Apply button to render the visualization.

By default, Grafana displays a time-series graph. You can change the visualization type by clicking the panel title and selecting Visualization. Options include:

  • Graph (time-series)
  • Stat (single value)
  • Gauge (circular meter)
  • Table (tabular data)
  • Heatmap (density visualization)
  • Bar gauge (horizontal bar chart)
  • Singlestat (deprecated but still usable)

Each visualization type has its own set of configuration options. For example, a Stat panel allows you to set thresholds, color schemes, and unit formatting. A Gauge panel lets you define min/max values and critical warning ranges.

Step 5: Customize Panel Appearance

Visual clarity is essential for effective dashboards. Grafana provides extensive customization options to tailor the look and feel of each panel.

Under the Panel options tab, you can:

  • Set the panel title to clearly describe the metric (e.g., Node CPU Usage - Last 1 Hour)
  • Adjust the height and width of the panel
  • Enable or disable grid lines, legends, and tooltips
  • Configure color schemes based on value ranges (e.g., green for healthy, red for critical)
  • Set thresholds with alerts (e.g., trigger warning at 80% CPU usage)

For time-series graphs, navigate to the Metrics tab and use the Alias field to rename your metric for better readability. For example, change rate(node_cpu_seconds_total{mode="system"}[5m]) to System CPU for clarity.

You can also add annotations to mark significant events, such as deployments or outages. Go to Annotations in the panel editor and link to a data source like Prometheus or Elasticsearch to automatically tag events on your graph.

Step 6: Organize Panels with Grid Layout

Once youve added multiple panels, arranging them logically improves usability. Grafana uses a flexible grid system to position panels.

To rearrange panels:

  1. Hover over a panels top-right corner and click the drag handle (six dots).
  2. Drag the panel to your desired location.
  3. Use the resize handles on the bottom-right corner to adjust panel size.

For consistent alignment, enable the grid by clicking the Dashboard settings icon (gear) and selecting Grid. You can choose between 12-column, 24-column, or custom grid layouts.

Group related panels together. For example, place all CPU-related metrics in one row, memory metrics in another, and disk I/O in a third. This creates a logical flow that users can scan quickly.

Step 7: Add Variables for Dynamic Dashboards

Static dashboards are useful, but dynamic dashboards adapt to changing environmentsmaking them far more powerful. Grafana variables allow you to create filters that update all panels in real time.

To add a variable:

  1. Click the Dashboard settings icon (gear).
  2. Select Variables.
  3. Click Add variable.

Common variable types include:

  • Query: Pulls values from your data source (e.g., list of all hostnames from Prometheus)
  • Custom: Manually define a list of options (e.g., Production, Staging)
  • Interval: Automatically generates time ranges
  • DataSource: Lets users switch between data sources

For example, create a query variable named instance with the query: label_values(node_uname_info, instance). This fetches all unique hostnames from the node_uname_info metric.

Once created, the variable appears as a dropdown at the top of your dashboard. Now, when you select a specific host from the dropdown, all panels using that variable will automatically update to show data for that instance only.

To use the variable in a panel query, wrap it in $variable_name. For example: rate(node_cpu_seconds_total{instance="$instance",mode!="idle"}[5m]) * 100.

Step 8: Set Time Range and Refresh Intervals

Every dashboard must define a default time range. Click the time picker in the top-right corner to select:

  • Relative time (e.g., Last 15 minutes, Last 6 hours)
  • Absolute time (e.g., Jan 1, 2024 00:00 to Jan 1, 2024 23:59)
  • Custom range

For real-time monitoring, set the refresh interval under the dashboard settings. Options range from 5 seconds to 1 day. For high-frequency metrics like network traffic, use 1030 seconds. For less volatile data like database query counts, 15 minutes is sufficient.

Be mindful of performance. Too frequent refreshes on large datasets can overload your data source. Always balance real-time needs with system resource constraints.

Step 9: Save and Share Your Dashboard

When your dashboard is complete:

  1. Click Save in the top navigation bar.
  2. Enter a meaningful name (e.g., Production Server Metrics - CPU, Memory, Disk)
  3. Optionally, add a description and tags for easier discovery.

Once saved, you can share the dashboard in multiple ways:

  • Direct link: Click the share icon to generate a URL. You can include variables and time ranges in the link.
  • Export JSON: Download the dashboard as a JSON file to import into another Grafana instance.
  • Embed: Generate an iframe code to embed the dashboard in internal wikis or web portals.
  • Snapshot: Create a static image of the dashboard at a specific point in time, useful for reports or post-mortems.

Step 10: Use Dashboard Templates and Community Libraries

Instead of building every dashboard from scratch, leverage the Grafana community. Grafana Labs maintains a public library of over 1,000 pre-built dashboards at grafana.com/grafana/dashboards.

For example, search for Node Exporter Full to find a comprehensive dashboard for Linux server metrics. To import:

  1. Click the dashboard you want.
  2. Copy the dashboard ID (e.g., 1860).
  3. In Grafana, click + ? Import.
  4. Paste the ID and click Load.
  5. Select your data source (e.g., Prometheus) and click Import.

These templates are professionally designed and include best practices for panel layout, variable usage, and visualization types. They serve as excellent learning tools and production-ready starting points.

Best Practices

Design for Clarity, Not Complexity

One of the most common mistakes in dashboard design is overcrowding. A dashboard with 20+ panels overwhelms users and obscures critical insights. Follow the one screen, one story principle: each dashboard should answer a specific questione.g., Is our API service performing well? or Are our database queries slowing down?

Use grouping and collapsible rows to organize related metrics. Grafana supports row panels, which can be collapsed to hide sections. Use them to separate concerns: Infrastructure, Applications, Network, and Alerts.

Use Consistent Naming and Units

Ensure all metric names, panel titles, and axis labels follow a consistent format. Use standard units (e.g., % for percentages, seconds for latency, MB/s for throughput). Avoid abbreviations unless universally understood (e.g., CPU, RAM).

Apply color consistently: green = good, yellow = warning, red = critical. Use color palettes that are accessible to color-blind users. Grafana offers built-in accessibility modes under Dashboard settings ? Theme.

Optimize Query Performance

Expensive queries slow down dashboard rendering and strain your data source. Avoid using wildcards (*) in large label sets. Instead, use label matchers like job="api-server" to narrow results.

Use rate() and irate() functions appropriately. For counters like request totals, always use rate() over a 515 minute window to smooth out spikes. Avoid querying raw counters without aggregation.

Limit time ranges in queries. For example, instead of up[1d], use up[5m] if you only need recent status. Combine with Grafanas time range variables to ensure queries adapt to user-selected periods.

Implement Alerting at the Dashboard Level

Dashboards are for observation; alerts are for action. Use Grafanas alerting system to trigger notifications when metrics breach thresholds.

To create an alert:

  1. In a panel, scroll to the Alert tab.
  2. Click Create alert.
  3. Define conditions (e.g., When average value > 80 for 5 minutes)
  4. Set notification channels (email, Slack, PagerDuty, etc.)
  5. Save the alert.

Alerts should be actionable. Avoid noise alerts that trigger too frequently. Use suppression rules and grouping to consolidate similar alerts. Always include a description explaining what the alert means and how to respond.

Version Control and Documentation

Dashboard configurations are stored as JSON. Store your dashboard JSON files in a version control system like Git. This allows you to track changes, roll back to previous versions, and collaborate across teams.

Include documentation alongside your dashboards: a README.md file explaining what each panel measures, how to interpret the data, and who to contact if issues arise. Use Grafanas description field or link to an internal wiki.

Test Across Devices and Resolutions

Dashboards are viewed on desktops, tablets, and large monitors. Use Grafanas responsive layout to ensure panels reflow appropriately. Test your dashboard on different screen sizes. Avoid fixed-width panels unless necessary.

For large screens, consider using multiple rows with wide panels. For mobile viewing, prioritize key metrics and use collapsible sections.

Limit Data Source Load with Aggregation

When querying large datasets (e.g., 10,000+ time series), use aggregation functions like sum(), avg(), or count() to reduce cardinality. For example, instead of plotting every containers memory usage, plot the average memory usage per pod.

Use Grafanas Group by and Reduce options in the panel editor to perform server-side aggregation, reducing data transfer and rendering load.

Tools and Resources

Essential Data Sources for Grafana Dashboards

While Grafana can connect to many data sources, these are the most commonly used in production environments:

  • Prometheus: The de facto standard for monitoring Kubernetes and microservices. Ideal for time-series metrics.
  • InfluxDB: High-performance time-series database, popular in IoT and industrial monitoring.
  • Elasticsearch: Used for log aggregation and full-text search. Combine with Grafana to visualize log patterns and error rates.
  • PostgreSQL / MySQL: For business metrics stored in relational databases (e.g., user signups, transaction volumes).
  • AWS CloudWatch: Monitor AWS resources like EC2, RDS, Lambda, and S3.
  • Graphite: Legacy but still widely used in enterprise environments.
  • OpenTelemetry: Emerging standard for telemetry data collection; integrates natively with Grafana via Tempo (traces) and Loki (logs).

Exporter Tools to Collect Metrics

To feed data into Grafana, you often need exporterssmall services that collect metrics from applications or systems and expose them in a format Grafana can read.

  • Node Exporter: Collects host-level metrics (CPU, memory, disk, network) from Linux/Unix systems.
  • Blackbox Exporter: Monitors HTTP endpoints, TCP connections, and ICMP ping responses.
  • MySQL Exporter: Exposes database performance metrics like queries per second, connections, and replication lag.
  • Redis Exporter: Monitors Redis memory usage, commands, and client connections.
  • Process Exporter: Tracks individual processes and their resource consumption.
  • Kube-state-metrics: Provides Kubernetes cluster-level metrics (pods, deployments, nodes).

Third-Party Integrations

Grafana integrates with many external tools to enhance functionality:

  • Slack: Send alert notifications to channels.
  • PagerDuty: Escalate critical alerts to on-call teams.
  • Microsoft Teams: Similar to Slack for enterprise environments.
  • SMTP / Email: Basic alert delivery for teams without chat platforms.
  • Webhooks: Trigger custom scripts or CI/CD pipelines on alert events.
  • LDAP / SAML: Centralized authentication for enterprise security.

Community Resources

Never build in isolation. Leverage the Grafana community to accelerate your work:

Learning Path for Advanced Users

Once youve mastered the basics, deepen your expertise with:

  • Grafana Loki: Log aggregation system designed to work with Grafana.
  • Grafana Tempo: Distributed tracing system for end-to-end latency analysis.
  • Grafana Mimir: Scalable, long-term Prometheus storage solution.
  • Grafana Alloy: Unified telemetry collector replacing multiple exporters.
  • JSON Panel API: Build custom visualizations using JavaScript and React.
  • Plugin Development: Create your own data source or visualization plugin.

Real Examples

Example 1: Web Server Performance Dashboard

Goal: Monitor the health of a web application serving 10,000+ requests per minute.

Panels:

  • HTTP Request Rate Graph: sum(rate(http_requests_total[5m])) by (status_code) Shows 2xx, 4xx, 5xx trends.
  • Average Latency Graph: avg(http_request_duration_seconds_bucket) by (le) Uses histogram buckets to calculate P95 latency.
  • Active Connections Stat: nginx_connections_active Displays current open connections.
  • Error Rate Gauge: sum(rate(http_requests_total{status_code=~"4..|5.."}[5m])) Triggers warning above 1%.
  • Upstream Health Table: up metric from Prometheus, grouped by job Shows which backend services are down.

Variables:

  • instance List of all web server hosts.
  • status_code Custom list: 2xx, 4xx, 5xx.

Alerts:

  • Trigger if 5xx rate > 2% for 5 minutes ? Notify dev team via Slack.
  • Trigger if active connections > 90% of max ? Scale up web servers.

Example 2: Kubernetes Cluster Monitoring Dashboard

Goal: Track resource usage and health of a Kubernetes cluster with 50+ nodes.

Panels:

  • Cluster CPU Usage Graph: sum(rate(container_cpu_usage_seconds_total{container!="POD",namespace!="kube-system"}[5m])) by (node)
  • Memory Pressure Graph: sum(container_memory_usage_bytes{container!="POD"}) by (node)
  • Pod Restart Rate Graph: sum(rate(kube_pod_container_status_restarts_total[5m])) by (namespace)
  • Node Status Stat: kube_node_status_condition{condition="Ready"} == 1 Shows number of ready nodes.
  • Network I/O Graph: sum(rate(container_network_transmit_bytes_total[5m])) by (pod)
  • Storage Usage Gauge: node_filesystem_usage_bytes Per node.

Variables:

  • namespace Query: label_values(kube_pod_info, namespace)
  • node Query: label_values(node_uname_info, instance)

Alerts:

  • Node not ready for > 2 minutes ? Notify platform team.
  • Pod restarts > 5 per hour per namespace ? Trigger investigation.
  • Memory usage > 85% on any node ? Scale cluster or optimize workloads.

Example 3: Business Analytics Dashboard

Goal: Track user growth and engagement for a SaaS product using data from PostgreSQL.

Panels:

  • Active Users (DAU/MAU) Stat: SELECT COUNT(DISTINCT user_id) FROM events WHERE event_time > now() - interval '1 day'
  • Signups by Day Graph: SELECT date_trunc('day', created_at), COUNT(*) FROM users GROUP BY 1 ORDER BY 1
  • Revenue Trends Graph: SELECT date_trunc('day', created_at), SUM(amount) FROM payments GROUP BY 1 ORDER BY 1
  • Conversion Rate Stat: SELECT (COUNT(*) FILTER (WHERE status = 'paid')) * 100.0 / COUNT(*) FROM signups
  • Top Features Used Table: SELECT event_name, COUNT(*) FROM events GROUP BY 1 ORDER BY 2 DESC LIMIT 10

Variables:

  • time_range Custom: Last 7 days, Last 30 days, Last 90 days
  • product Custom: Web App, Mobile App, API

This dashboard is shared with product and marketing teams to guide feature prioritization and campaign planning.

FAQs

Can I create a dashboard in Grafana without a data source?

No. Grafana requires at least one configured data source to populate panels with data. However, you can create an empty dashboard template and save it for later use. Once a data source is added, you can attach queries to existing panels.

How do I share a dashboard with someone who doesnt have Grafana access?

You can generate a snapshota static image of your dashboard at a specific moment. Go to the dashboard, click the share icon, select Snapshot, and click Create. Youll receive a public URL that anyone can view without logging in. Snapshots expire after 24 hours by default but can be made permanent.

Can I use Grafana to monitor non-technical systems like sales or HR?

Yes. Grafana can connect to any data source that exposes structured dataSQL databases, REST APIs, CSV files, or even Google Sheets via plugins. For example, you can visualize monthly sales figures from a PostgreSQL table or employee attendance rates from an HR system.

Why is my dashboard loading slowly?

Slow loading is usually caused by:

  • High-cardinality queries (too many unique time series)
  • Large time ranges (e.g., 30 days of 1-second resolution data)
  • Unoptimized data source performance
  • Too many panels refreshing simultaneously

Fix it by reducing query scope, using aggregation, increasing scrape intervals, or upgrading your data source hardware.

Can I automate dashboard creation in Grafana?

Yes. Grafana provides a full HTTP API for creating, updating, and importing dashboards. You can use tools like curl, Terraform, or Ansible to automate dashboard deployment as part of your CI/CD pipeline. Dashboards can be stored as JSON in Git and deployed automatically to staging and production environments.

Whats the difference between a panel and a row in Grafana?

A panel is a single visualization (graph, stat, table). A row is a container that groups multiple panels together. Rows can be collapsed to hide sections, making dashboards more navigable. Rows themselves dont display datatheyre organizational tools.

Does Grafana support real-time dashboards?

Yes. With refresh intervals set to 530 seconds and data sources like Prometheus or InfluxDB, Grafana delivers near real-time visualization. For true streaming data (e.g., live stock prices), use WebSocket-based data sources or integrate with Kafka via plugins.

How do I secure my Grafana dashboards?

Enable authentication (LDAP, SAML, GitHub, Google), restrict dashboard permissions (Viewer, Editor, Admin), disable public access, and use HTTPS. Never expose Grafana to the public internet without a reverse proxy and authentication layer.

Conclusion

Creating a dashboard in Grafana is more than a technical taskits a strategic capability that transforms how teams understand, respond to, and improve their systems. From monitoring server health to tracking business KPIs, Grafanas flexibility, scalability, and rich visualization ecosystem make it indispensable in modern observability stacks.

By following the step-by-step guide in this tutorial, youve learned not only how to build a dashboard, but how to build a meaningful oneorganized, performant, and aligned with real operational needs. Youve explored best practices for clarity and efficiency, leveraged community resources to accelerate development, and seen real-world examples that demonstrate the power of visual data.

As you continue your journey, remember: the best dashboards are those that answer questions before theyre asked. Invest time in understanding your users needs, optimize for performance, and iterate based on feedback. Whether youre managing a single server or a global microservices architecture, Grafana gives you the tools to see clearly, act confidently, and lead with data.

Start small. Build iteratively. Share widely. And let your dashboards become the heartbeat of your operations.