modules/prometheus: split exporters and alerts to seperate files
This commit is contained in:
parent
9b38853216
commit
5fe7ff0434
7 changed files with 317 additions and 246 deletions
17
modules/nixos/prometheus/ntfy-sh.nix
Normal file
17
modules/nixos/prometheus/ntfy-sh.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.prometheus;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.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