diff options
-rw-r--r-- | odin.nix | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -495,6 +495,7 @@ | |||
495 | "/motion/cat-food.mjpeg".proxyPass = "http://localhost:8080/"; | 495 | "/motion/cat-food.mjpeg".proxyPass = "http://localhost:8080/"; |
496 | "/motion/living-room.mjpeg".proxyPass = "http://localhost:8081/"; | 496 | "/motion/living-room.mjpeg".proxyPass = "http://localhost:8081/"; |
497 | "/prometheus".proxyPass = "http://prometheus"; | 497 | "/prometheus".proxyPass = "http://prometheus"; |
498 | "/grafana".proxyPass = "http://grafana"; | ||
498 | }; | 499 | }; |
499 | }; | 500 | }; |
500 | 501 | ||
@@ -505,6 +506,9 @@ | |||
505 | "prometheus" = { | 506 | "prometheus" = { |
506 | servers."${config.services.prometheus.listenAddress}" = {}; | 507 | servers."${config.services.prometheus.listenAddress}" = {}; |
507 | }; | 508 | }; |
509 | "grafana" = { | ||
510 | servers."localhost:${toString config.services.grafana.port}" = {}; | ||
511 | }; | ||
508 | }; | 512 | }; |
509 | }; | 513 | }; |
510 | 514 | ||
@@ -545,6 +549,19 @@ | |||
545 | ]; | 549 | ]; |
546 | }; | 550 | }; |
547 | 551 | ||
552 | services.grafana = { | ||
553 | enable = true; | ||
554 | addr = "localhost"; | ||
555 | domain = "odin.asgard.yggdrasil"; | ||
556 | port = 9089; | ||
557 | protocol = "http"; | ||
558 | rootUrl = "%(protocol)s://%(domain)s:%(http_port)s/grafana"; | ||
559 | smtp = { | ||
560 | enable = true; | ||
561 | fromAddress = "grafana@odin.asgard.yggdrasil"; | ||
562 | }; | ||
563 | }; | ||
564 | |||
548 | systemd.status-mail = { | 565 | systemd.status-mail = { |
549 | recipient = "root@odin.asgard.yggdrasil"; | 566 | recipient = "root@odin.asgard.yggdrasil"; |
550 | onFailure = [ "nixos-upgrade" | 567 | onFailure = [ "nixos-upgrade" |