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, visualizing, and analyzing time-series data. Whether you're tracking server performance, application metrics, IoT sensor readings, or business KPIs, Grafana empowers users to build interactive, real-time dashboards that transform raw data into actionable insights. Creatin

Nov 10, 2025 - 11:59
Nov 10, 2025 - 11:59
 0

How to Create Dashboard in Grafana

Grafana is one of the most powerful and widely adopted open-source platforms for monitoring, visualizing, and analyzing time-series data. Whether you're tracking server performance, application metrics, IoT sensor readings, or business KPIs, Grafana empowers users to build interactive, real-time dashboards that transform raw data into actionable insights. Creating a dashboard in Grafana is not just about plotting graphsits about designing a coherent, intuitive, and scalable interface that enables teams to make faster, data-driven decisions.

For DevOps engineers, system administrators, data analysts, and developers, mastering the art of dashboard creation in Grafana is essential. A well-crafted dashboard can reduce mean time to detection (MTTD) and mean time to resolution (MTTR), improve system reliability, and enhance cross-functional communication. This guide provides a comprehensive, step-by-step tutorial on how to create a dashboard in Grafanafrom initial setup to advanced customizationalong with best practices, real-world examples, and essential tools to elevate your monitoring game.

Step-by-Step Guide

Step 1: Install and Set Up Grafana

Before you can create a dashboard, you need Grafana installed and running. Grafana supports multiple deployment methods, including Docker, native packages, and cloud-hosted solutions.

If youre using Docker, run the following command in your terminal:

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

For Linux systems using apt (Ubuntu/Debian):

sudo apt-get install -y apt-transport-https

sudo apt-get install -y software-properties-common wget

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -

echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

sudo apt-get update

sudo apt-get install grafana

sudo systemctl daemon-reload

sudo systemctl start grafana-server

sudo systemctl status grafana-server

Once installed, open your browser and navigate to http://localhost:3000. The default login credentials are admin/admin. Youll be prompted to change the password on first login.

Step 2: Add a Data Source

A dashboard in Grafana is only as good as the data it visualizes. Grafana supports over 50 data sources, including Prometheus, InfluxDB, Elasticsearch, MySQL, PostgreSQL, AWS CloudWatch, and more.

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. For this example, well use Prometheus, a popular open-source monitoring system.
  5. In the URL field, enter the address of your Prometheus server (e.g., http://localhost:9090).
  6. Click Save & Test. If successful, youll see a green confirmation banner.

Pro tip: Always verify connectivity by clicking Save & Test. If the connection fails, check firewall rules, authentication headers, or whether the data source is actually running.

Step 3: Create a New Dashboard

Once your data source is configured, youre ready to create your first dashboard.

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

By default, Grafana creates a new dashboard with a single panel. You can rename the dashboard by clicking the dashboard title at the top and selecting Rename.

Step 4: Add a Panel

Panels are the building blocks of a Grafana dashboard. Each panel displays a visualization based on a query to your data source.

To add a panel:

  1. Click the Add panel button in the center of the screen.
  2. In the panel editor, select your data source from the dropdown (e.g., Prometheus).
  3. In the query field, enter a metric. For example, to monitor CPU usage:
rate(node_cpu_seconds_total{mode!="idle"}[5m])

This query calculates the per-second rate of CPU time spent in non-idle states over the last 5 minutes, giving you a percentage-based CPU utilization metric.

As you type, Grafana auto-suggests available metrics. Use the Explore tab (accessible via the left sidebar) to test and refine queries before adding them to dashboards.

Step 5: Choose a Visualization Type

Grafana offers a wide variety of visualization types. The most common include:

  • Graph Line and area charts for time-series data
  • Stat Single-value metrics (e.g., current server uptime)
  • Bar gauge Horizontal or vertical bars for thresholds
  • Table Tabular data with sorting and formatting
  • Heatmap Density-based visualizations for high-volume data
  • Singlestat Deprecated, replaced by Stat

For our CPU metric, select the Graph visualization. Adjust the time range using the top-right corner controls (e.g., Last 6 hours).

Step 6: Customize Panel Appearance

Customization enhances clarity and usability. In the panel editor, navigate to the Panel options tab:

  • Unit: Set to percent (0.0-1.0) for CPU metrics.
  • Legend: Enable and set format to Avg, Min, Max to show summary values.
  • Thresholds: Add warning and critical thresholds (e.g., 70% and 90%) to color-code the graph.
  • Axis: Set Y-axis min/max to 01 for consistent scaling.
  • Tooltip: Choose All values to display all metrics on hover.

Use the Transform tab to manipulate data before visualizatione.g., rename series, apply math operations, or filter by labels.

Step 7: Add Multiple Panels

Real dashboards contain multiple panels that tell a complete story. Add panels for:

  • Memory usage: 100 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100
  • Disk I/O: rate(node_disk_read_bytes_total[5m]) and rate(node_disk_written_bytes_total[5m])
  • Network traffic: rate(node_network_receive_bytes_total[5m])
  • Uptime: up (Prometheus metric indicating if target is reachable)

Arrange panels in a logical flow: start with system health (CPU, Memory, Disk), followed by network, then application-specific metrics.

Step 8: Use Variables for Dynamic Dashboards

Static dashboards are limiting. Variables allow you to filter data dynamicallyfor example, switching between servers, environments, or services without editing the dashboard.

To create a variable:

  1. Click the dashboard settings icon (gear) ? Variables.
  2. Click New.
  3. Name: instance
  4. Type: Query
  5. Data source: Prometheus
  6. Query: label_values(instance)
  7. Click Apply.

Now, update all your panel queries to use the variable. For example:

rate(node_cpu_seconds_total{instance="$instance", mode!="idle"}[5m])

Now, when you select a different instance from the dropdown at the top of the dashboard, all panels automatically update to reflect that hosts metrics.

Step 9: Set Time Range and Refresh Interval

Every dashboard should have a default time range and refresh rate.

  • Set the default time range to Last 6 hours for operational dashboards.
  • Set auto-refresh to 30 seconds for real-time monitoring or 5 minutes for less frequent data.

These settings are found in the top-right corner of the dashboard. Use the refresh dropdown to select intervals or choose Off for manually refreshed dashboards.

Step 10: Save and Share the Dashboard

When youre satisfied with your dashboard:

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

To share:

  • Click Share ? Direct link to generate a public URL.
  • Use Export to download the JSON definition for backup or import into another Grafana instance.
  • For teams, consider saving to a shared folder or integrating with Grafanas folder and permission system.

Best Practices

Design for Clarity, Not Complexity

A dashboard is not a data dump. Avoid overcrowding panels. Limit each dashboard to 812 panels maximum. Use rows and columns to group related metrics. Follow the one screen, one story rule: each dashboard should answer a specific question (e.g., Is the API service healthy?).

Use Consistent Naming Conventions

Use clear, consistent naming for panels, variables, and dashboards. For example:

  • Panel name: CPU Usage - Production Web Server
  • Variable name: environment (not env or env_var)
  • Dashboard title: Production - API Service Health

This improves searchability and reduces confusion in large organizations with dozens of dashboards.

Apply Meaningful Thresholds and Alerts

Visual thresholds (red/yellow/green) help users instantly identify issues. Combine this with Grafanas alerting system:

  • Set alert rules on critical metrics (e.g., CPU > 90% for 5 minutes).
  • Configure notifications via email, Slack, or PagerDuty.
  • Use For clauses to avoid false positives (e.g., trigger only if condition persists).

Alerts should be actionable. Avoid alerting on metrics that require manual investigation to interpret.

Use Annotations for Context

Annotations mark significant events on your graphsdeployments, config changes, outages. Link them to your CI/CD pipeline or incident management tool.

To add an annotation:

  1. Go to Dashboard Settings ? Annotations.
  2. Click Add annotation.
  3. Set the data source to your logs or events database (e.g., Loki, Elasticsearch).
  4. Use a query like {job="deployments"} |~ "deployed" to auto-populate deployment events.

Annotations turn static graphs into historical narratives, helping teams correlate incidents with changes.

Organize with Folders and Permissions

Use folders to group dashboards by team, service, or environment (e.g., Production, Staging, Database).

Assign permissions via Grafanas RBAC system:

  • Read-only for analysts
  • Editor for DevOps engineers
  • Admin for platform teams

This prevents accidental edits and ensures accountability.

Optimize Query Performance

Slow dashboards frustrate users. Optimize your queries:

  • Use rate() and irate() for counters instead of raw values.
  • Avoid overly broad label selectors like {job=~".*"}.
  • Use sum() and by() to aggregate data on the server side.
  • Limit time ranges in queries (e.g., [10m] instead of [1h] if 10 minutes is sufficient).

Test queries in Explore mode before adding them to dashboards. Use Prometheuss query_range endpoint to monitor query latency.

Version Control Your Dashboards

Export dashboards as JSON and store them in Git. Use CI/CD pipelines to deploy changes across environments.

Example workflow:

  1. Export dashboard JSON.
  2. Commit to /dashboards/production/server-health.json.
  3. Use Grafanas REST API or provisioning system to auto-import on deployment.

This ensures consistency, auditability, and disaster recovery.

Test Across Devices and Resolutions

Dashboard users access Grafana from desktops, tablets, and even mobile devices. Use the Responsive layout option in panel settings. Test your dashboard on different screen sizes to ensure readability.

Tools and Resources

Official Grafana Documentation

The official Grafana documentation is comprehensive and regularly updated. It includes detailed guides on data sources, plugins, alerting, and provisioning.

Grafana Labs Community

Join the Grafana Community Forum to ask questions, share dashboards, and learn from others. Thousands of users contribute templates, plugins, and tutorials.

Pre-Built Dashboard Templates

Grafanas Dashboard Gallery offers hundreds of free, community-contributed dashboards. Popular templates include:

  • Node Exporter Full Comprehensive server monitoring
  • Kubernetes Cluster Monitoring For Kubernetes workloads
  • PostgreSQL Dashboard Query performance and connection stats
  • NGINX Plus Web server metrics

To import a dashboard:

  1. Copy the dashboard ID (e.g., 1860 for Node Exporter Full).
  2. In Grafana, click + ? Import.
  3. Paste the ID and click Load.
  4. Select your data source and click Import.

Plugins and Extensions

Extend Grafanas functionality with plugins:

  • Graphite For legacy metrics systems
  • Loki Log aggregation and visualization
  • CloudWatch AWS monitoring integration
  • Table Panel Advanced tabular displays
  • Worldmap Panel Geospatial data visualization

Install plugins via the CLI:

grafana-cli plugins install grafana-worldmap-panel

Restart Grafana after installing plugins.

Provisioning for Automation

For enterprise deployments, use provisioning to automate dashboard and data source creation. Create YAML or JSON files in the /etc/grafana/provisioning/ directory.

Example data source provisioning file (datasources.yaml):

apiVersion: 1

datasources:

- name: Prometheus

type: prometheus

url: http://prometheus:9090

access: proxy

isDefault: true

Example dashboard provisioning file (dashboards.yaml):

apiVersion: 1

providers:

- name: 'Production'

orgId: 1

folder: ''

type: file

disableDeletion: false

editable: true

options:

path: /var/lib/grafana/dashboards/production

Place your dashboard JSON files in the specified path, and Grafana auto-imports them on startup.

Monitoring Stack Integration

For a complete observability stack, integrate Grafana with:

  • Prometheus Metrics collection
  • Alertmanager Alert routing
  • Loki Log aggregation
  • Tempo Distributed tracing

This combinationoften called the Grafana Stackprovides full-stack observability with a unified UI.

Real Examples

Example 1: Web Server Health Dashboard

Dashboard Name: Production Web Server - Health

Panels:

  • Stat: Uptime (query: up{job="web-server"})
  • Graph: HTTP Request Rate (query: rate(http_requests_total[5m]))
  • Graph: HTTP Error Rate (query: rate(http_requests_total{status=~"5.."}[5m]))
  • Bar Gauge: Average Response Time (query: avg(http_response_time_seconds{job="web-server"}))
  • Table: Top 5 Slowest Endpoints (query: topk(5, avg(http_response_time_seconds{job="web-server"}) by (endpoint)))

Variables: instance (to filter by server), environment (prod/staging)

Alerts: Trigger if error rate > 5% for 2 minutes.

Annotations: Auto-populated from CI/CD deployment logs.

Example 2: Database Performance Dashboard

Dashboard Name: PostgreSQL - Query Performance

Panels:

  • Graph: Active Connections (query: pg_stat_activity_count)
  • Graph: Queries per Second (query: rate(pg_stat_statements_calls_total[5m]))
  • Heatmap: Query Duration Distribution (query: histogram_quantile(0.95, rate(pg_query_duration_seconds_bucket[5m])))
  • Stat: Cache Hit Ratio (query: (pg_stat_bgwriter_blks_checkpoints + pg_stat_bgwriter_blks_clean) / (pg_stat_bgwriter_blks_checkpoints + pg_stat_bgwriter_blks_clean + pg_stat_bgwriter_blks_written))
  • Table: Top 10 Slowest Queries (query: topk(10, pg_stat_statements_total_time / pg_stat_statements_calls))

Alerts: Trigger if cache hit ratio drops below 85%.

Example 3: E-Commerce Transaction Dashboard

Dashboard Name: E-Commerce - Order Processing

Panels:

  • Stat: Orders per Minute (query: rate(orders_total[1m]))
  • Graph: Revenue per Hour (query: sum(rate(revenue_total[5m])) by (currency))
  • Bar Gauge: Cart Abandonment Rate (query: 1 - (sessions_with_checkout / sessions_with_cart))
  • Table: Top Failed Payment Methods (query: topk(5, rate(payment_failed_total[5m]) by (method)))
  • Stat: Average Order Value (query: avg(order_value))

Variables: region (US, EU, APAC), product_category

Annotations: Synced with marketing campaign launch dates.

FAQs

Can I create a dashboard in Grafana without coding?

Yes. Grafanas UI allows you to create dashboards entirely through point-and-click interfaces. You can select metrics from dropdowns, choose visualizations, and apply formatting without writing a single line of query language. However, to unlock advanced functionalitysuch as dynamic variables, complex aggregations, or custom transformationsyoull need to write queries in PromQL, SQL, or the query language of your data source.

How do I make my dashboard responsive on mobile devices?

Grafana dashboards are responsive by default. However, for optimal mobile viewing:

  • Use fewer panels per row.
  • Prefer stat panels and single-line graphs over complex multi-series graphs.
  • Set panel heights to Auto to allow dynamic resizing.
  • Test using Chrome DevTools mobile view mode.

Can I import dashboards from other tools like Kibana or Datadog?

Theres no direct import tool, but you can manually recreate them. Export your data from the source system, then recreate the queries and visualizations in Grafana. Some users write scripts to convert Kibana JSON to Grafana JSON. Alternatively, use Grafanas API to automate dashboard creation based on exported configurations.

How often should I update my dashboards?

Update dashboards when:

  • Application architecture changes (e.g., new microservices)
  • Metrics or labels are deprecated
  • Team feedback indicates confusion or missing data
  • Performance issues arise from slow queries

Establish a quarterly review cycle for all dashboards to ensure relevance and efficiency.

Is Grafana free to use?

Yes. Grafana Community Edition is open-source and free to use for any purpose. Grafana Labs also offers a commercial version, Grafana Enterprise, which includes advanced features like SSO, RBAC, audit logs, and premium support. For most users, the Community Edition is sufficient.

How do I secure my Grafana dashboards?

Implement these security practices:

  • Enable authentication (LDAP, SAML, OAuth2).
  • Restrict dashboard access using folder-level permissions.
  • Disable anonymous access in grafana.ini ([auth.anonymous] ? enabled = false).
  • Use HTTPS with a valid TLS certificate.
  • Regularly update Grafana to patch security vulnerabilities.

Can Grafana visualize non-time-series data?

Yes. While Grafana excels at time-series data, it can visualize static or tabular data using the Table, Bar Gauge, and Pie Chart panels. Data sources like MySQL, PostgreSQL, and BigQuery can feed non-time-series data into Grafana. Use transformations to pivot, filter, or aggregate data as needed.

Whats the difference between a panel and a dashboard?

A panel is a single visualizationlike a graph, stat, or tablethat displays one set of data. A dashboard is a collection of multiple panels arranged together to present a cohesive view of a system or process. One dashboard can contain many panels; each panel belongs to one dashboard.

Conclusion

Creating a dashboard in Grafana is more than a technical taskits a strategic skill that bridges data and decision-making. From installing Grafana and connecting to your first data source, to designing intuitive panels and automating deployments with provisioning, every step you take improves your teams ability to monitor, react, and innovate.

The real power of Grafana lies not in its features, but in how you use them. A well-designed dashboard turns noise into clarity, latency into insight, and alerts into action. By following the best practices outlined hereprioritizing clarity, consistency, and automationyoull build dashboards that dont just look good, but actually drive performance.

Start small: create one dashboard for a critical service. Refine it over time. Share it with your team. Iterate based on feedback. As your expertise grows, so will your impact. Grafana is not just a toolits a platform for observability culture. And now, with this guide, youre equipped to lead the way.