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

28 lines
602 B
Nix

{ pkgs, lib, config, ... }:
{
imports = [ ../modules/mqtt2prometheus ];
services = {
prometheus = {
enable = true;
listenAddress = "127.0.0.1";
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;
};
};
}