Grafana is an open-source analytics and monitoring platform that allows you to query, visualize, alert on, and explore your metrics, logs, and traces from any data source.
Grafana transforms time-series data into beautiful graphs and visualizations, making it the de facto standard for monitoring dashboards in modern infrastructure. It's the visualization layer for your observability stack.
Transform your metrics into beautiful, actionable insights
Key benefits:
- Universal Data Source Support: Connect to Prometheus, InfluxDB, VictoriaMetrics, PostgreSQL, and 100+ other data sources
- Beautiful Dashboards: Create stunning, interactive visualizations with minimal effort
- Powerful Alerting: Set up sophisticated alert rules and notifications
- Extensive Plugin Ecosystem: Thousands of plugins for panels, data sources, and apps
- Role-Based Access Control: Granular permissions for teams and users
- Query Builder: Intuitive interface for building complex queries without learning query languages
- Open Source: Free, community-driven, with enterprise options available
Combine data from multiple sources (Prometheus, InfluxDB, VictoriaMetrics, etc.) in a single dashboard for comprehensive monitoring.
Wide variety of visualization types:
- Time series graphs
- Heatmaps
- Histograms
- Stat panels
- Tables
- Gauge and bar gauge
- Pie charts and more
Sophisticated alerting engine with:
- Multi-dimensional alerting
- Alert rules based on queries
- Notification channels (email, Slack, Discord, PagerDuty, etc.)
- Alert silencing and grouping
Extend functionality with:
- Data source plugins (add new databases)
- Panel plugins (custom visualizations)
- App plugins (complete applications)
Create dynamic, reusable dashboards with variables for:
- Hosts
- Services
- Time ranges
- Custom values
Interactive query builder and data explorer for ad-hoc analysis without creating permanent dashboards.
Fine-grained permissions:
- Organization-level access
- Dashboard-level permissions
- Folder-based organization
| key | value |
|---|---|
| installation type | nixos service |
| service management | systemctl <COMMAND> grafana |
| web port | 10009 (internal) |
| fqdn | lampiotes.ma-cabane.eu |
| application folder | /var/lib/grafana |
| backup folder | /var/backup/grafana (PostgreSQL DB) |
| backup | see borgbackup |
The Grafana instance is configured in machines/houston/modules/grafana.nix.
Key configuration parameters:
- HTTP Port:
10009(behind Nginx reverse proxy) - Database: PostgreSQL (database name:
grafana) - Admin User:
admin - Admin Password: Auto-generated (see secrets)
- Anonymous Access: Disabled
- User Signup: Disabled
- Analytics: Disabled (reporting and update checks)
After deploying Grafana with Clan:
-
Access the URL:
https://lampiotes.ma-cabane.eu -
Log in using:
- Username:
admin - Password:
clan vars get houston grafana/admin_password
- Username:
-
Configure data sources (Prometheus, InfluxDB, etc.)
-
Import or create dashboards
Grafana is configured to work with Prometheus, which is enabled on the houston server:
services.prometheus.enable = true;To add Prometheus as a data source in Grafana:
- Go to
Configuration→Data Sources→Add data source - Select
Prometheus - Set URL to
http://localhost:9090 - Click
Save & Test
If you need to reset the admin password manually:
# On houston server
runuser grafana -s /run/current-system/sw/bin/bash
GRAFANACONFIG=$(cat $(systemctl cat grafana | grep ExecStart= | cut -d"=" -f2) | grep -o -E "\-config /nix/.*.ini" | cut -d" " -f2)
grafana cli -homepath /var/lib/grafana --config=$GRAFANACONFIG admin reset-admin-password "<NEW_PASSWORD>"Or regenerate credentials using Clan:
# Regenerate all Grafana credentials
clan vars generate houston grafana
# Get the new password
clan vars get houston grafana/admin_password
# Restart Grafana
systemctl restart grafanaTo retrieve the current admin password:
# On houston server
clan vars get houston grafana/admin_password