diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2019-05-06 20:45:05 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2019-05-06 20:45:05 +0200 |
| commit | b1948b378bdbd8ea3fd3cc2c59644dce8ff05268 (patch) | |
| tree | c403b9756db133308025c5d5ebec879315295d7a | |
| parent | 3a5ee092f9b686fe5d9298a7da4313c8f0dbf365 (diff) | |
| download | nixos-b1948b378bdbd8ea3fd3cc2c59644dce8ff05268.tar nixos-b1948b378bdbd8ea3fd3cc2c59644dce8ff05268.tar.gz nixos-b1948b378bdbd8ea3fd3cc2c59644dce8ff05268.tar.bz2 nixos-b1948b378bdbd8ea3fd3cc2c59644dce8ff05268.tar.xz nixos-b1948b378bdbd8ea3fd3cc2c59644dce8ff05268.zip | |
...
| -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" |
