From b1948b378bdbd8ea3fd3cc2c59644dce8ff05268 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 6 May 2019 20:45:05 +0200 Subject: ... --- odin.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/odin.nix b/odin.nix index 9b75f934..87cc9096 100644 --- a/odin.nix +++ b/odin.nix @@ -495,6 +495,7 @@ "/motion/cat-food.mjpeg".proxyPass = "http://localhost:8080/"; "/motion/living-room.mjpeg".proxyPass = "http://localhost:8081/"; "/prometheus".proxyPass = "http://prometheus"; + "/grafana".proxyPass = "http://grafana"; }; }; @@ -505,6 +506,9 @@ "prometheus" = { servers."${config.services.prometheus.listenAddress}" = {}; }; + "grafana" = { + servers."localhost:${toString config.services.grafana.port}" = {}; + }; }; }; @@ -545,6 +549,19 @@ ]; }; + services.grafana = { + enable = true; + addr = "localhost"; + domain = "odin.asgard.yggdrasil"; + port = 9089; + protocol = "http"; + rootUrl = "%(protocol)s://%(domain)s:%(http_port)s/grafana"; + smtp = { + enable = true; + fromAddress = "grafana@odin.asgard.yggdrasil"; + }; + }; + systemd.status-mail = { recipient = "root@odin.asgard.yggdrasil"; onFailure = [ "nixos-upgrade" -- cgit v1.2.3