TOWERBY CETMIX
← Hangar / jet_template_grafana

Grafana Dashboards with Prometheus and Traefik

Deploy Grafana with a preconfigured Prometheus datasource and HTTPS access through Traefik.

↓ Download↓ 0 downloads

Summary

Category
Jet Templates
Tags
Monitoring
Authors
Cetmix OÜ
License
AGPL-3
Version
1.0.0
Call sign
jet_template_grafana

This snippet imports a Grafana Jet Template using grafana/grafana:13.2.0 and includes the Prometheus, Traefik, Docker, Fail2ban and Tower Core templates. Grafana runs once per server alongside its running Prometheus and Traefik dependencies. It stores dashboards and other Grafana data under the Jet root and provisions a default Prometheus datasource over the shared Docker network. Traefik serves Grafana over HTTPS using its Jet hostname and routes to container port 3000.

Configure and launch

  1. Import the YAML and install the Grafana template on the monitoring server. Set grafana_admin_password in Tower Keys and Secrets and choose grafana_admin_user (default admin).
  2. Set web_domain and ensure the Grafana hostname resolves to Traefik. Set Traefik's instance_certbot_email and make ports 80 and 443 reachable for HTTP-01 and HTTPS. For automatic Cloudflare DNS registration, set cloudflare_token and cloudflare_zone_id. If using an ACME DNS challenge, populate the selected provider's credentials in Tower as well (cloudflare_token, digitalocean_api_token, hetzner_api_token, or aws_dns_key_id and aws_dns_access_key).
  3. Configure the bundled Prometheus Jet's prometheus_retention and exporter port variables (node_exporter_port, cadvisor_port and postgres_exporter_port). Set prometheus_sd_postgres_legacy to a JSON array or [] for an empty list. Create the Grafana Jet targeting Running, and open its HTTPS URL.

View metrics and manage Grafana

Add dashboards that use the provisioned datasource. For new hosts, deploy the relevant exporter Jets, allow Prometheus to reach their ports and run Refresh targets on Prometheus. Use jobs node, cadvisor and postgres and select the Tower server name as the instance. If a dashboard is empty, verify scrape status in Prometheus and datasource connectivity in Grafana.

Build renders the administrator credentials into the mounted grafana.ini file. Start, Restart and a running Rebuild apply the credentials from that file to the existing Grafana instance. Rebuild replaces the container while retaining its data directory. Destroy removes the deployment and its local Grafana data.