diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2019-05-06 20:34:13 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2019-05-06 20:34:13 +0200 |
| commit | 3637a81cb5a0a5ba0da2478050994c742ee2f727 (patch) | |
| tree | 7817a403db926f46d0acdde33cbad05836cc886a | |
| parent | 8df4b383b23d235de3de0702dd6b704c7e4645e9 (diff) | |
| download | nixos-3637a81cb5a0a5ba0da2478050994c742ee2f727.tar nixos-3637a81cb5a0a5ba0da2478050994c742ee2f727.tar.gz nixos-3637a81cb5a0a5ba0da2478050994c742ee2f727.tar.bz2 nixos-3637a81cb5a0a5ba0da2478050994c742ee2f727.tar.xz nixos-3637a81cb5a0a5ba0da2478050994c742ee2f727.zip | |
Prometheus on odin
| -rw-r--r-- | odin.nix | 33 |
1 files changed, 33 insertions, 0 deletions
| @@ -504,6 +504,39 @@ | |||
| 504 | }; | 504 | }; |
| 505 | }; | 505 | }; |
| 506 | 506 | ||
| 507 | services.prometheus2 = { | ||
| 508 | enable = true; | ||
| 509 | webExternalUrl = "http://odin.asgard.yggdrasil/prometheus"; | ||
| 510 | listenAddress = "localhost:9090"; | ||
| 511 | exporters = { | ||
| 512 | node = { | ||
| 513 | enable = true; | ||
| 514 | listenAddress = "localhost"; | ||
| 515 | }; | ||
| 516 | }; | ||
| 517 | scrapeConfigs = [ | ||
| 518 | { job_name = "router"; | ||
| 519 | static_configs = [ | ||
| 520 | { targets = [ "heimdallr:9133" ]; | ||
| 521 | } | ||
| 522 | ]; | ||
| 523 | } | ||
| 524 | { job_name = "odin"; | ||
| 525 | static_configs = [ | ||
| 526 | { targets = [ "localhost:9100" ]; | ||
| 527 | } | ||
| 528 | ]; | ||
| 529 | } | ||
| 530 | { job_name = "prometheus"; | ||
| 531 | metrics_path = "/prometheus/metrics"; | ||
| 532 | static_configs = [ | ||
| 533 | { targets = [ "localhost:9090" ]; | ||
| 534 | } | ||
| 535 | ]; | ||
| 536 | } | ||
| 537 | ]; | ||
| 538 | }; | ||
| 539 | |||
| 507 | systemd.status-mail = { | 540 | systemd.status-mail = { |
| 508 | recipient = "root@odin.asgard.yggdrasil"; | 541 | recipient = "root@odin.asgard.yggdrasil"; |
| 509 | onFailure = [ "nixos-upgrade" | 542 | onFailure = [ "nixos-upgrade" |
