commit 10c089fbbea9e54c19fa3f0e0c7d529866ff581c Author: Felix Albrigtsen Date: Thu Nov 24 21:22:09 2022 +0100 Initial readme diff --git a/README.md b/README.md new file mode 100644 index 0000000..fa2bb0e --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# Prometheus homelab monitoring stack + +## Server components: +- Prometheus +- Grafana +- Grafana Loki +- Prometheus +- Prometheus-snmp-exporter +- Grafana-matrix-forwarder + +## Configured client components: +- Promtail +- Node exporter + + +## Todo: + +- Split nixos config into several files +- Replace grafana-matrix-forwarder with something sensible +- Move secrets + + + +## Install + +- Copy/symlink `var_prometheus` to `/var/prometheus` +- Create the file /var/prometheus/GRAFANASECRETS (If using matrix) +- Move `prometheus.nix` somewhere sensible and include it in your `configuration.nix` +- Enable nginx in your configuration + +### Forwarding alerts to matrix + +Grafana prefers to push alerts using webhooks. Matrix does not have builtin-support for this. I want to move to [Matrix-Webhook](https://matrix.org/docs/projects/bot/matrix-webhook/), but for now I am using [Grafana to matrix forwarder](https://gitlab.com/hectorjsmith/grafana-matrix-forwarder). + +Create the file `/var/prometheus/GRAFANASECRETS` and populate it with `MATRIX_USER`, `MATRIX_PASSWORD` and `MATRIX_HOMESERVER`. Note that these "secrets" will be visible in your nix store and even in your systemd service.