2024-07-31 06:27:03 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.custom.prometheus;
|
|
|
|
in
|
|
|
|
{
|
2024-07-31 07:37:42 +00:00
|
|
|
config = lib.mkIf (cfg.enable && cfg.exporters.ntfy-sh.enable) {
|
2024-07-31 06:27:03 +00:00
|
|
|
services.ntfy-sh.settings.enable-metrics = true;
|
|
|
|
services.prometheus.scrapeConfigs = [
|
2024-07-31 07:37:42 +00:00
|
|
|
{
|
2024-07-31 06:27:03 +00:00
|
|
|
job_name = "ntfy-sh";
|
2024-08-25 09:45:58 +00:00
|
|
|
static_configs = [ { targets = [ "ntfy.xinyang.life" ]; } ];
|
2024-07-31 07:37:42 +00:00
|
|
|
}
|
2024-07-31 06:27:03 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|