diff options
| author | seth <[email protected]> | 2023-08-05 03:27:45 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-08-05 03:29:57 -0400 |
| commit | 328cc0182336b8b394702b02c4e0f6255a7174a2 (patch) | |
| tree | 7b1b5b9a7ae95bafd7a1606420d13f634be5ed09 /hosts/p-body/victoriametrics.nix | |
| parent | 1b8d2d2ba704aedcdc6cad0faca7c8b689d314a8 (diff) | |
hosts!: prometheus -> victoria metrics
Diffstat (limited to 'hosts/p-body/victoriametrics.nix')
| -rw-r--r-- | hosts/p-body/victoriametrics.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/hosts/p-body/victoriametrics.nix b/hosts/p-body/victoriametrics.nix new file mode 100644 index 0000000..dec893e --- /dev/null +++ b/hosts/p-body/victoriametrics.nix @@ -0,0 +1,26 @@ +{config, ...}: let + mkScrapes = let + mkConfig = client: { + job_name = "${client}"; + static_configs = [ + { + targets = [ + "${client}:${toString config.services.prometheus.exporters.node.port}" + ]; + } + ]; + }; + in + builtins.map mkConfig; +in { + services = { + victoriametrics.enable = true; + + vmagent = { + enable = true; + prometheusConfig = { + scrape_configs = mkScrapes ["p-body" "atlas"]; + }; + }; + }; +} |
