diff options
author | Bas van Dijk <v.dijk.bas@gmail.com> | 2019-04-16 16:04:33 +0200 |
---|---|---|
committer | Bas van Dijk <v.dijk.bas@gmail.com> | 2019-04-16 16:04:33 +0200 |
commit | a23db5db08206e77c2861107bfaf600b8ff7f5ce (patch) | |
tree | 16991053349b174f7a0aacce7890fd1d12db1eb4 /nixos | |
parent | ad7e232f88da63802544a4b473185a5589fd9a74 (diff) | |
download | nixlib-a23db5db08206e77c2861107bfaf600b8ff7f5ce.tar nixlib-a23db5db08206e77c2861107bfaf600b8ff7f5ce.tar.gz nixlib-a23db5db08206e77c2861107bfaf600b8ff7f5ce.tar.bz2 nixlib-a23db5db08206e77c2861107bfaf600b8ff7f5ce.tar.lz nixlib-a23db5db08206e77c2861107bfaf600b8ff7f5ce.tar.xz nixlib-a23db5db08206e77c2861107bfaf600b8ff7f5ce.tar.zst nixlib-a23db5db08206e77c2861107bfaf600b8ff7f5ce.zip |
nixos/prometheus: add new ec2_sd_config options for prometheus2
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/default.nix | 38 |
1 files changed, 35 insertions, 3 deletions
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. + <literal>AWS_ACCESS_KEY_ID</literal> 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. + <literal>AWS_SECRET_ACCESS_KEY</literal> 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 <link xlink:href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html">this list</link> + 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 = { |