Skip to content

Commit

Permalink
nixos/prometheus: add fallback_scrape_protocol and scrape_protocols o…
Browse files Browse the repository at this point in the history
…ptions (NixOS#361223)
  • Loading branch information
fpletz authored Dec 2, 2024
2 parents 53f3c92 + 1649adc commit 89a3c7e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nixos/modules/services/monitoring/prometheus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ let
};
};

# https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
promTypes.scrape_config = types.submodule {
options = {
authorization = mkOption {
Expand All @@ -299,6 +300,15 @@ let
globally configured default.
'';

scrape_protocols = mkOpt (types.listOf types.str) ''
The protocols to negotiate during a scrape with the client.
'';

fallback_scrape_protocol = mkOpt types.str ''
Fallback protocol to use if a scrape returns blank, unparseable, or otherwise
invalid Content-Type.
'';

metrics_path = mkDefOpt types.str "/metrics" ''
The HTTP resource path on which to fetch metrics from targets.
'';
Expand Down

0 comments on commit 89a3c7e

Please sign in to comment.