WIP: Add metrics
This commit is contained in:
parent
8dc5e13363
commit
8dfdaa899f
22 changed files with 479 additions and 26 deletions
31
configuration/services/metrics/victoriametrics.nix
Normal file
31
configuration/services/metrics/victoriametrics.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{config, ...}: {
|
||||
services.victoriametrics = let
|
||||
scrapeConfigFromExporters = conf: conf // {inherit (config.services.prometheus.exporters.${conf.name}) listenAddress port;};
|
||||
scrapeConfigFromLocalExporters = conf: conf // {inherit (config.services.prometheus.local-exporters.${conf.name}) listenAddress port;};
|
||||
in {
|
||||
enable = true;
|
||||
vmagent-scraping.static_configs =
|
||||
[
|
||||
{
|
||||
name = "gitea";
|
||||
listenAddress = "127.0.0.1";
|
||||
port = 3000;
|
||||
}
|
||||
{
|
||||
name = "coturn";
|
||||
listenAddress = "127.0.0.1";
|
||||
port = 9641;
|
||||
}
|
||||
]
|
||||
++ (map scrapeConfigFromLocalExporters [
|
||||
{name = "prometheus-fail2ban-exporter";}
|
||||
])
|
||||
++ (map scrapeConfigFromExporters [
|
||||
{name = "domain";}
|
||||
{name = "node";}
|
||||
{name = "nginx";}
|
||||
{name = "nginxlog";}
|
||||
{name = "systemd";}
|
||||
]);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue