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