hackens-org-configurations/hosts/hackens-org/prometheus/default.nix

29 lines
602 B
Nix
Raw Normal View History

{ pkgs, lib, config, ... }:
{
2022-04-25 00:53:18 +02:00
imports = [ ../modules/mqtt2prometheus ];
services = {
prometheus = {
enable = true;
listenAddress = "127.0.0.1";
scrapeConfigs = [
{
2022-04-25 00:53:18 +02:00
job_name = "mqtt_listener";
scrape_interval = "120s";
static_configs = [
{
targets = [
2022-04-25 00:53:18 +02:00
"localhost:9641"
];
}
];
}
];
};
2022-04-25 00:53:18 +02:00
mqtt2prometheus = {
enable = true;
package = pkgs.callPackage (import ./mqtt2prometheus.nix) { };
config = ./config.yaml;
};
};
}