hackens-org-configurations/hosts/hackens-org/prometheus/default.nix
2022-04-25 00:53:18 +02:00

28 lines
617 B
Nix

{ pkgs, lib, config, ... }:
{
imports = [ ../modules/mqtt2prometheus ];
networking.firewall.allowedTCPPorts = [ 9090 ];
services = {
prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "mqtt_listener";
scrape_interval = "120s";
static_configs = [
{
targets = [
"localhost:9641"
];
}
];
}
];
};
mqtt2prometheus = {
enable = true;
package = pkgs.callPackage (import ./mqtt2prometheus.nix) { };
config = ./config.yaml;
};
};
}