mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-09-08 00:44:05 +02:00
- Out of date bits (e.g. regarding the way to export the dashboard from Grafana and the way to extend the `remote_write` regex when adding new dashboards to `dashboards.archlinux.org`) - Wrong filenames (e.g. missing `.yml` at the end of the playbooks filenames) - Missing a few details (e.g. about the way to extend the `remote_write` regex and deploy dashboards when adding new dashboard to `dashboards.archlinux.org`)
1.6 KiB
1.6 KiB
Grafana
Our Grafana is hosted on https://monitoring.archlinux.org and is accessible only to DevOps Staff.
A public accessible instance is hosted on https://dashboards.archlinux.org with selected metrics using prometheus "remote write" feature.
Dashboards and datasources are automatically provisioned by Grafana with Grafana's built-in provisioning configuration.
Adding a new Dashboard
A new dashboard can be configured in our Grafana instance to try it out and if satisfactory checked in to Git as following:
- Export the dashboard to json (top right, Export => Export as code => Download file).
- Save the json file in
roles/grafana/files/dashboards. - Git add the file and run
ansible-playbook playbooks/monitoring.archlinux.org.yml -t grafana.
Adding new metrics to dashboards.archlinux.org
Metrics can be added to the public grafana instance if they are already collected on monitoring.archlinux.org:
- Verify that the metrics are allowed to be made public and check with another DevOps member.
- Create a symlink in
roles/grafana/files/public-dashboardsto the dashboard inroles/grafana/files/dashboards. - Edit
roles/prometheus/defaults/main.ymland extend theprometheus_remote_write_relabel_configsblock with the job name matching the prometheus config fromroles/prometheus/templates/prometheus.yml.j2. - Run
ansible-playbook playboks/monitoring.archlinux.org.yml -t prometheusto update theremote_writeconfiguration. - Run
ansible-playbook playboks/dashboards.archlinux.org.yml -t grafanato deploy the dashboard todashboards.archlinux.org.