modules/prometheus: add blackbox exporter
This commit is contained in:
parent
5fe7ff0434
commit
daeeb211a2
6 changed files with 105 additions and 14 deletions
|
@ -3,15 +3,15 @@ let
|
|||
cfg = config.custom.prometheus;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = lib.mkIf (cfg.enable && cfg.exporters.ntfy-sh.enable) {
|
||||
services.ntfy-sh.settings.enable-metrics = true;
|
||||
services.prometheus.scrapeConfigs = [
|
||||
(lib.mkIf cfg.exporters.ntfy-sh.enable {
|
||||
{
|
||||
job_name = "ntfy-sh";
|
||||
static_configs = [
|
||||
{ targets = [ "ntfy.xinyang.life" ]; }
|
||||
];
|
||||
})
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue