diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix
index 41519fe548fe..525b0b18cecf 100644
--- a/nixos/modules/services/monitoring/prometheus/default.nix
+++ b/nixos/modules/services/monitoring/prometheus/default.nix
@@ -322,12 +322,19 @@ let
The AWS Region.
'';
};
+ endpoint = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description = ''
+ Custom endpoint to be used.
+ '';
+ };
access_key = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
The AWS API key id. If blank, the environment variable
- `AWS_ACCESS_KEY_ID` is used.
+ AWS_ACCESS_KEY_ID is used.
'';
};
secret_key = mkOption {
@@ -335,7 +342,7 @@ let
default = null;
description = ''
The AWS API key secret. If blank, the environment variable
- `AWS_SECRET_ACCESS_KEY` is used.
+ AWS_SECRET_ACCESS_KEY is used.
'';
};
profile = mkOption {
@@ -368,6 +375,32 @@ let
rule.
'';
};
+ filters = mkOption {
+ type = types.nullOr (types.listOf promTypes.filter);
+ default = null;
+ description = ''
+ Filters can be used optionally to filter the instance list by other criteria.
+ '';
+ };
+ };
+ };
+
+ promTypes.filter = types.submodule {
+ options = {
+ name = mkOption {
+ type = types.str;
+ description = ''
+ See this list
+ for the available filters.
+ '';
+ };
+ value = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Value of the filter.
+ '';
+ };
};
};
@@ -545,7 +578,6 @@ let
};
};
-
in {
options = {
services.prometheus = {