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.gotosocial.enable) {
|
|
|
|
services.gotosocial.settings = {
|
2024-07-31 06:27:03 +00:00
|
|
|
metrics-enabled = true;
|
|
|
|
};
|
|
|
|
services.prometheus.scrapeConfigs = [
|
|
|
|
{
|
|
|
|
job_name = "gotosocial";
|
2024-08-25 09:45:58 +00:00
|
|
|
static_configs = [ { targets = [ "localhost:8080" ]; } ];
|
2024-07-31 06:27:03 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|