1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00

nixos/prometheus: add ec2_sd_configs section to scrape_configs

This commit is contained in:
Andrew Childs 2019-01-27 21:06:37 +09:00 committed by Bas van Dijk
parent f8564ae974
commit ad7e232f88

View file

@ -277,6 +277,14 @@ let
List of labeled target groups for this job.
'';
};
ec2_sd_configs = mkOption {
type = types.listOf promTypes.ec2_sd_config;
default = [];
apply = x: map _filter x;
description = ''
List of EC2 service discovery configurations.
'';
};
relabel_configs = mkOption {
type = types.listOf promTypes.relabel_config;
default = [];
@ -306,6 +314,63 @@ let
};
};
promTypes.ec2_sd_config = types.submodule {
options = {
region = mkOption {
type = types.str;
description = ''
The AWS Region.
'';
};
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.
'';
};
secret_key = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
The AWS API key secret. If blank, the environment variable
`AWS_SECRET_ACCESS_KEY` is used.
'';
};
profile = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Named AWS profile used to connect to the API.
'';
};
role_arn = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
AWS Role ARN, an alternative to using AWS API keys.
'';
};
refresh_interval = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Refresh interval to re-read the instance list.
'';
};
port = mkOption {
type = types.int;
default = 80;
description = ''
The port to scrape metrics from. If using the public IP
address, this must instead be specified in the relabeling
rule.
'';
};
};
};
promTypes.dns_sd_config = types.submodule {
options = {
names = mkOption {