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
19
modules/nixos/prometheus/gotosocial.nix
Normal file
19
modules/nixos/prometheus/gotosocial.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.prometheus;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.exporters.gotosocial.enable {
|
||||
services.gotosocial.settings = lib.mkIf cfg.exporters.gotosocial.enable {
|
||||
metrics-enabled = true;
|
||||
};
|
||||
services.prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "gotosocial";
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:8080" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue