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. Originally designed for visualizing time-series data, Grafana has evolved into a comprehensive dashboarding solution used by DevOps teams, SREs, data engineers, and business analysts across industries. Whether you’re tracking server metrics, application

Oct 30, 2025 - 12:28
Oct 30, 2025 - 12:28
 0

How to Create Dashboard in Grafana

Grafana is one of the most powerful and widely adopted open-source platforms for monitoring and observability. Originally designed for visualizing time-series data, Grafana has evolved into a comprehensive dashboarding solution used by DevOps teams, SREs, data engineers, and business analysts across industries. Whether you’re tracking server metrics, application performance, network traffic, or business KPIs, Grafana enables you to build intuitive, interactive, and real-time dashboards that transform raw data into actionable insights.

Creating a dashboard in Grafana is not just about plotting graphs—it’s about telling a story with your data. A well-designed dashboard helps teams detect anomalies faster, make data-driven decisions, and proactively respond to system behavior. Unlike static reports, Grafana dashboards are dynamic, customizable, and can be shared across teams with varying levels of technical expertise.

In this comprehensive guide, you’ll learn exactly how to create a dashboard in Grafana—from connecting data sources to designing visualizations, configuring alerts, and optimizing for performance. By the end of this tutorial, you’ll have the skills to build professional-grade dashboards that meet enterprise standards and drive operational excellence.

Step-by-Step Guide

Step 1: Install and Access Grafana

Before you can create a dashboard, you need access to a running Grafana instance. Grafana can be installed on Linux, macOS, Windows, or deployed via Docker, Kubernetes, or cloud platforms like AWS, Azure, or Google Cloud.

For most users, the fastest way to get started is using Docker:

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

Once the container is running, open your browser and navigate to http://localhost:3000. The default login credentials are admin/admin. You’ll be prompted to change the password on first login.

If you’re using a cloud-hosted Grafana (such as Grafana Cloud), simply log in to your account via the web interface. No installation is required—you’re ready to begin creating dashboards immediately.

Step 2: Add a Data Source

A dashboard in Grafana is only as good as the data it visualizes. Before building any panels, you must connect Grafana to a data source. Grafana supports over 50 data sources, including:

  • Prometheus
  • InfluxDB
  • MySQL, PostgreSQL, SQL Server
  • Elasticsearch
  • CloudWatch
  • Graphite
  • VictoriaMetrics
  • BigQuery

To add a data source:

  1. Click the gear icon in the left sidebar to open the Configuration menu.
  2. Select Data Sources.
  3. Click Add data source.
  4. Choose your data source type (e.g., Prometheus).
  5. Configure the connection settings. For Prometheus, enter the HTTP URL (e.g., http://prometheus:9090).
  6. Click Save & Test. If successful, you’ll see a green confirmation banner.

Pro Tip: Always test your data source connection before proceeding. A failed connection will prevent any queries from returning results in your dashboard.

Step 3: Create a New Dashboard

Once your data source is configured, you’re ready to create your first dashboard.

  1. Click the + icon in the left sidebar.
  2. Select DashboardsNew Dashboard.
  3. You’ll be taken to a blank canvas with a “Add new panel” button.

At this point, you can either start from scratch or import a pre-built dashboard from the Grafana dashboard library. For learning purposes, we recommend starting fresh to understand the underlying structure.

Step 4: Add and Configure a Panel

A panel is the building block of a Grafana dashboard. Each panel displays a single visualization—such as a graph, gauge, table, or stat—based on a query to your data source.

To add a panel:

  1. Click Add new 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, if using Prometheus, type: http_requests_total.
  4. Click the Run query button (or press Ctrl+Enter).

Once data appears, you can customize the visualization:

  • Change the visualization type using the Visualization tab: choose from Graph, Stat, Gauge, Bar Gauge, Heatmap, Table, and more.
  • Adjust time range using the picker in the top right (e.g., Last 6 hours, Last 24 hours).
  • Use the Transform tab to manipulate data: rename fields, filter rows, calculate ratios, or aggregate values.
  • Customize the panel title and description in the General tab.

Example: To visualize request latency over time, use the query:

rate(http_request_duration_seconds_sum[5m]) / rate(http_request_duration_seconds_count[5m])

This calculates the average request duration per second over a 5-minute window using Prometheus histogram metrics.

Step 5: Customize Panel Appearance

Visual clarity is critical for effective dashboards. Use the following options to enhance readability:

  • Unit: Select appropriate units (e.g., seconds, bytes, percent) from the dropdown to format numbers correctly.
  • Color: Use color thresholds to highlight critical values (e.g., red for >90% CPU usage).
  • Legend: Enable or disable the legend. Use “Hide legend” for simple stat panels.
  • Axis: Adjust Y-axis min/max values to avoid misleading scaling. Use “Left/Right” axis for dual metrics (e.g., requests and errors).
  • Tooltip: Choose “Shared” or “Single” tooltip behavior for multi-series graphs.

For time-series graphs, enable “Stacking” to show cumulative values, or use “Fill” to add area under the line for better visual impact.

Step 6: Duplicate and Organize Panels

Once you’ve created one effective panel, duplicate it to build similar visualizations quickly.

To duplicate:

  • Click the panel title → Copy panel.
  • Paste it into the same dashboard or a new one.
  • Edit the query and title to reflect new metrics.

Organize panels logically:

  • Group related metrics together (e.g., all CPU-related panels in one row).
  • Use row panels to create sections: click Add row above a panel to create a collapsible container.
  • Arrange panels in a grid layout for consistency. Use the drag-and-drop interface to reorder panels.

Step 7: Add Variables for Interactivity

Static dashboards are useful, but dynamic dashboards that adapt to user input are far more powerful. Grafana variables allow users to filter data on the fly—without editing the dashboard.

Common variable types:

  • Query: Pull values dynamically from your data source (e.g., list of hostnames from Prometheus labels).
  • Custom: Manually define a list of values (e.g., “Dev”, “Staging”, “Prod”).
  • Text box: Allow free-form input (e.g., search for a specific log message).
  • Dashboard: Reference values from other dashboards.

To create a variable:

  1. Click the dashboard settings icon (gear) → Variables.
  2. Click New.
  3. Name your variable (e.g., instance).
  4. Set type to Query.
  5. Enter a query: label_values(instance) for Prometheus.
  6. Set Refresh to “On Dashboard Load” or “On Time Range Change”.
  7. Click Apply.

Now, use the variable in your panel queries:

rate(http_requests_total{instance="$instance"}[5m])

This will dynamically filter results based on the selected instance from the dropdown menu at the top of the dashboard.

Step 8: Set Up Alerts

Dashboards are most valuable when they don’t just show data—they help you act on it. Grafana’s alerting system lets you trigger notifications when metrics exceed thresholds.

To create an alert:

  1. In a panel, click the Alert tab.
  2. Click Create alert.
  3. Define the condition: e.g., “When average of query A is greater than 80% for 5 minutes.”
  4. Set evaluation frequency (e.g., every 15s).
  5. Configure notification channels: email, Slack, PagerDuty, webhook, etc.
  6. Click Save.

Alerts appear as warning or error icons on the panel. You can view all active alerts by clicking Alerting in the left sidebar.

Step 9: Save and Share the Dashboard

Once your dashboard is complete:

  1. Click Save in the top right.
  2. Enter a name (e.g., “Production Server Metrics”) and optionally a folder.
  3. Click Save again.

To share:

  • Click the Share button.
  • Generate a direct link or embed code.
  • Set permissions: “Viewer”, “Editor”, or “Admin” access.
  • Export as JSON for backup or import into another Grafana instance.

Pro Tip: Use folders to organize dashboards by team, environment, or project (e.g., “Monitoring/Production”, “Analytics/Marketing”).

Step 10: Schedule and Automate Dashboard Updates

For dashboards that need to refresh automatically (e.g., real-time trading data or IoT sensor feeds), configure auto-refresh:

  • Click the time range picker in the top right.
  • Select a refresh interval: 5s, 10s, 30s, 1m, 5m, etc.

For advanced automation, use Grafana’s API to programmatically update dashboards:

curl -X POST -H "Content-Type: application/json" \

-H "Authorization: Bearer YOUR_API_KEY" \

http://localhost:3000/api/dashboards/db \

-d '{"dashboard": {...}, "overwrite": true}'

This is especially useful for CI/CD pipelines that deploy infrastructure changes and automatically update monitoring dashboards.

Best Practices

Design for Clarity, Not Complexity

A dashboard should communicate information instantly. Avoid cluttering it with too many panels or overly complex visualizations. Follow the “one metric per panel” rule where possible. If multiple metrics are related, use a single graph with multiple series instead of separate panels.

Use consistent colors, fonts, and spacing. Apply a color scheme that aligns with your organization’s branding or industry standards (e.g., red = critical, green = healthy).

Use Meaningful Titles and Descriptions

Every panel should have a clear, descriptive title. Avoid vague names like “Graph 1” or “CPU Usage.” Instead, use: “HTTP Request Rate by Endpoint – Last 24h”.

Add descriptions to explain the metric’s purpose, units, and expected behavior. This helps new team members understand the dashboard without needing training.

Optimize Query Performance

Expensive queries can slow down your dashboard and strain your data source. Follow these tips:

  • Use rate() or irate() instead of raw counters in Prometheus.
  • Avoid wildcard queries like metric_name{job="*"} unless necessary.
  • Limit time ranges to what’s needed (e.g., 1h instead of 7d for real-time dashboards).
  • Use aggregation (e.g., sum(), avg()) at the query level rather than relying on Grafana transformations.

Test query performance in the Explore tab before adding to dashboards.

Implement Role-Based Access Control (RBAC)

Not all users need full access. Use Grafana’s RBAC system to assign roles:

  • Viewer: Can only view dashboards.
  • Editor: Can edit dashboards and create new ones.
  • Admin: Full access to configuration, users, and data sources.

Organize dashboards into folders and assign folder-level permissions to control access by team or department.

Use Templates and Reusable Components

Instead of rebuilding similar dashboards for each server or service, create template dashboards with variables and clone them. Save frequently used panels as “reusable panels” or export them as JSON snippets for future use.

Consider using Grafana’s Library Panels feature (available in Grafana 9+) to store and share standardized visualizations across teams.

Monitor Dashboard Performance

Large dashboards with many panels and slow queries can become unresponsive. Use Grafana’s built-in performance monitoring:

  • Check the browser’s developer console for slow queries.
  • Use the “Dashboard Stats” panel to see load times.
  • Enable Grafana’s logging to track slow panel renders.

Split large dashboards into multiple smaller ones. A single dashboard with more than 15 panels may become difficult to manage.

Document Your Dashboards

Even the best dashboard can be useless if no one understands it. Maintain documentation:

  • Include a README.md file in your dashboard folder.
  • Link to runbooks or incident response procedures.
  • Specify who owns the metric and how to respond to alerts.

Consider using Grafana’s Annotations to mark significant events (e.g., deployments, outages) directly on graphs.

Tools and Resources

Official Grafana Documentation

The official Grafana documentation is the most authoritative source for learning new features, configuration options, and troubleshooting. Bookmark it for quick reference.

Grafana Dashboard Library

The Grafana Dashboard Library hosts over 10,000 community-contributed dashboards. Search for templates by data source (e.g., “Prometheus Node Exporter”) and import them directly into your instance.

Popular templates include:

  • Node Exporter Full – Comprehensive server metrics (CPU, memory, disk, network).
  • MySQL Overview – Database performance and replication status.
  • Kubernetes Cluster Monitoring – Pod, node, and resource usage.
  • NGINX Dashboard – Request rates, response codes, and upstream health.

Import a dashboard by clicking “Import” and entering the dashboard ID (e.g., 1860 for Node Exporter Full).

Third-Party Plugins

Extend Grafana’s functionality with plugins:

  • Worldmap Panel – Visualize geospatial data.
  • Graphite Tags – Enhanced querying for Graphite metrics.
  • Alertmanager – Integrate with Prometheus Alertmanager for advanced alert routing.
  • JSON Data Source – Pull data from REST APIs.

Install plugins via the Grafana CLI:

grafana-cli plugins install grafana-worldmap-panel

Then restart Grafana and enable the plugin in the configuration.

APIs and Automation Tools

For enterprise-scale deployments, automate dashboard creation using:

  • Grafana HTTP API – Create, update, and delete dashboards programmatically.
  • Terraform Grafana Provider – Define dashboards as infrastructure code.
  • Ansible – Deploy Grafana configurations across multiple environments.
  • JSON Schema Validation – Validate dashboard JSON before import.

Example Terraform snippet:

resource "grafana_dashboard" "example" {

config_json = file("${path.module}/dashboard.json")

}

Learning Resources

  • Grafana YouTube Channel – Official tutorials and feature walkthroughs.
  • DevOps Institute – Courses on observability and Grafana best practices.
  • Community Forumcommunity.grafana.com for troubleshooting and tips.
  • Books: “Observability Engineering” by Charity Majors et al. includes practical Grafana use cases.

Real Examples

Example 1: Web Server Performance Dashboard

Goal: Monitor HTTP traffic, error rates, and latency for a public-facing web application.

Panels:

  1. HTTP Request Rate – Line graph: rate(http_requests_total[5m]) (grouped by status code).
  2. Error Rate (4xx/5xx) – Stat panel: sum(rate(http_requests_total{status=~"4..|5.."}[5m])).
  3. Average Latency – Graph: rate(http_request_duration_seconds_sum[5m]) / rate(http_request_duration_seconds_count[5m]).
  4. Response Size – Bar gauge: avg(http_response_size_bytes).
  5. Top Endpoints – Table: topk(5, sum(rate(http_requests_total[5m])) by (endpoint)).

Variables: instance (server hostname), status (filter by 2xx, 4xx, 5xx).

Alerts: Trigger if error rate > 1% for 5 minutes; notify Slack channel.

Example 2: Database Health Monitor

Goal: Track PostgreSQL performance and connection health.

Panels:

  1. Active Connections – Stat: pg_stat_activity_count.
  2. Query Throughput – Graph: rate(pg_stat_statements_calls[1m]).
  3. Slow Queries – Table: pg_stat_statements_total_time > 1000 (queries taking over 1 second).
  4. Replication Lag – Gauge: pg_replication_lag_seconds.
  5. Cache Hit Ratio – Stat: 1 - (pg_stat_bgwriter_blks_read / pg_stat_bgwriter_blks_hit).

Variables: database (select specific DB), schema.

Alerts: Trigger if replication lag > 30s or cache hit ratio < 90%.

Example 3: Business KPI Dashboard

Goal: Track daily sales, user signups, and conversion rates from a MySQL database.

Panels:

  1. Daily Revenue – Stat: sum(revenue) from orders where date = today().
  2. New Users – Graph: count(users) group by day.
  3. Conversion Rate – Gauge: signups / visits * 100.
  4. Top Products – Pie chart: sum(sales) by product_id.
  5. Geographic Distribution – Worldmap: count(users) by country.

Variables: time_period (Day, Week, Month), region.

Alerts: Trigger if daily revenue drops > 20% compared to previous day.

FAQs

Can I create a dashboard without a data source?

No. Grafana requires at least one configured data source to populate panels. However, you can use the “Demo” data source (available in Grafana Cloud) to experiment with sample metrics without setting up your own infrastructure.

How do I update a dashboard after importing it?

When you import a dashboard, it becomes a copy. To update it, edit the panels as needed and click Save. To overwrite the original template, use the “Overwrite” option during import.

Can I use Grafana with non-time-series data?

Yes. While Grafana excels at time-series data, it can also visualize tabular data from SQL databases, REST APIs, or JSON sources. Use the Table, Stat, or Bar Gauge visualizations for static or aggregated data.

Why is my dashboard loading slowly?

Slow dashboards are usually caused by:

  • Expensive queries (e.g., unbounded time ranges, wildcards).
  • Too many panels (over 20).
  • Low-performance data source (e.g., querying a slow MySQL instance).
  • Large result sets with unaggregated data.

Optimize queries, reduce panel count, or use caching (e.g., Thanos or Cortex for Prometheus).

How do I share a dashboard with someone who doesn’t have Grafana access?

You can generate a public link by enabling “Anonymous Access” in Grafana’s configuration and setting the dashboard to “Public.” Alternatively, export the dashboard as JSON and import it into their instance.

Can I schedule dashboard exports?

Yes. Use the Grafana API to export dashboards on a schedule via cron jobs or automation tools. Combine this with cloud storage (e.g., S3) for backup and version control.

What’s the difference between a panel and a row?

A panel is a single visualization (graph, stat, table). A row is a container that groups multiple panels together. Rows can be collapsed for better organization and are useful for sectioning dashboards by topic.

Is Grafana free to use?

Yes. Grafana Community Edition is open-source and free for any use. Grafana Enterprise adds advanced features like SSO, audit logs, and enterprise support—but the core dashboarding functionality remains free.

How do I troubleshoot “No data” in my panel?

Check these:

  • Is the data source connected? (Test connection in Data Sources).
  • Is the query syntax correct? (Use Explore tab to test).
  • Is the time range appropriate? (Data may not exist in selected window).
  • Are labels or filters too restrictive? (Try removing them temporarily).

Conclusion

Creating a dashboard in Grafana is a blend of technical skill and thoughtful design. It’s not enough to simply plot numbers—you must structure your data, choose the right visualizations, and anticipate the needs of your audience. Whether you’re monitoring infrastructure, analyzing business metrics, or debugging application performance, Grafana empowers you to turn raw data into clarity.

This guide has walked you through the entire process—from installing Grafana and connecting data sources, to building interactive panels, configuring alerts, and applying enterprise best practices. You’ve seen real-world examples and learned how to leverage tools and resources to accelerate your workflow.

Remember: the best dashboards are those that are maintained, updated, and used. Don’t build a dashboard and forget it. Regularly review its performance, solicit feedback from users, and refine it over time. As your systems evolve, so should your monitoring.

Start small. Build one dashboard this week. Then another. Soon, you’ll have a comprehensive observability ecosystem that not only informs decisions but prevents incidents before they happen. Grafana isn’t just a tool—it’s a mindset. And with the knowledge you’ve gained here, you’re now equipped to lead that transformation.