1
0
mirror of https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git synced 2024-12-22 12:17:56 +01:00
pvv-nixos-config/hosts/ildkule/services/monitoring/prometheus/mysqld.nix

26 lines
559 B
Nix
Raw Normal View History

{ config, ... }: let
cfg = config.services.prometheus;
in {
sops.secrets."config/mysqld_exporter" = { };
services.prometheus = {
scrapeConfigs = [{
job_name = "mysql";
scheme = "http";
metrics_path = cfg.exporters.mysqld.telemetryPath;
static_configs = [
{
targets = [
"localhost:${toString cfg.exporters.mysqld.port}"
];
}
];
}];
exporters.mysqld = {
enable = true;
configFilePath = config.sops.secrets."config/mysqld_exporter".path;
};
};
}