Grafana
The Open Platform for Beautiful Analytics and Monitoring
The Open Platform for Beautiful Analytics and Monitoring
Grafana is the leading open-source platform for monitoring and observability. It allows you to query, visualize, alert on, and understand your metrics no matter where they’re stored – from Prometheus to InfluxDB, MySQL to Elasticsearch, and dozens of other data sources.
Transform your raw data into stunning, interactive dashboards that tell the story of your infrastructure, applications, and services. Whether you’re monitoring server performance, tracking application metrics, or analyzing business data, Grafana provides the tools to make sense of it all.
Used by thousands of companies worldwide – from startups to Fortune 500 enterprises – Grafana has become the de facto standard for visualization and monitoring in modern cloud-native environments.
Connect to 50+ data sources including Prometheus, InfluxDB, MySQL, PostgreSQL, Elasticsearch, CloudWatch, Azure Monitor, and more.
Create stunning, interactive visualizations with rich graph types: time series, bar charts, heatmaps, gauges, tables, and custom panels.
Define alert rules with complex conditions and get notified via email, Slack, PagerDuty, webhooks, and 20+ notification channels.
Access thousands of pre-built dashboards from the community. Import and customize them for your needs in seconds.
Extend functionality with plugins for data sources, panels, and apps. Create custom plugins or choose from hundreds available.
Free forever with an active development community. Self-host with complete control over your monitoring infrastructure.
Deploy Grafana with Docker and start visualizing your data in minutes.
Create directories to persist Grafana data:
mkdir -p ~/grafana/{data,config,plugins}
cd ~/grafana
Quick start with Docker (SQLite backend):
docker run -d --name=grafana -p 3000:3000 -v ./data:/var/lib/grafana -e "GF_SECURITY_ADMIN_PASSWORD=admin" --restart unless-stopped grafana/grafana:latest
Create docker-compose.yml for a full monitoring stack with Prometheus:
version: '3'
services:
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./data:/var/lib/grafana
- ./config:/etc/grafana
- ./plugins:/var/lib/grafana/plugins
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=your_secure_password
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource
- GF_SERVER_ROOT_URL=https://grafana.yourdomain.com
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- [email protected]
- GF_SMTP_PASSWORD=your-app-password
- [email protected]
networks:
- monitoring
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./prometheus/config:/etc/prometheus
- ./prometheus/data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
networks:
- monitoring
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
ports:
- "9100:9100"
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
networks:
- monitoring
networks:
monitoring:
driver: bridge
Create prometheus/config/prometheus.yml:
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
- job_name: 'grafana'
static_configs:
- targets: ['grafana:3000']
Launch Grafana and Prometheus together:
docker-compose up -d
Access Grafana at http://your-server-ip:3000:
adminadmin (or your custom password)Configure Prometheus as a data source:
http://prometheus:9090Default Port: 3000
Default Credentials:
admin / admin
Security: Change admin password immediately!
Tip: Import pre-built dashboards from grafana.com/dashboards
Prometheus UI:
http://your-ip:9090
The fastest way to get started is importing community dashboards:
Create a dashboard from scratch:
node_cpu_seconds_total)Create alerts to monitor critical metrics:
Query:
avg(rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100 < 20
Condition:
When value is BELOW 20 for 5 minutes
Action:
Send notification to Slack channel
Configure where alerts are sent (Alerting → Contact points):
Create dynamic dashboards with variables:
$variable_nameMark important events on graphs:
Rotate through dashboards automatically for NOC displays.
Generate and schedule PDF reports of dashboards for stakeholders.
Update Grafana to the latest version:
docker-compose pull docker-compose down docker-compose up -d
Backup Grafana data:
tar -czf grafana-backup-$(date +%Y%m%d).tar.gz ./data
Clean up old data:
docker exec -it grafana grafana-cli admin data-migration clean-annotations
Data source connection failed:
Verify network connectivity. For Docker, ensure containers are on the same network. Check firewall rules.
Slow dashboard loading:
Optimize queries, reduce time range, use query caching, or increase Grafana resources.
Alerts not firing:
Check evaluation interval, verify data source is reachable, review alert rule conditions.
Plugins won't install:
Ensure plugin directory is writable. Use GF_INSTALL_PLUGINS environment variable or install manually.
Deploy Grafana and transform raw metrics into actionable insights with beautiful dashboards.
Grafana is open-source software maintained by Grafana Labs. Visit grafana.com for documentation and community resources.