Merge pull request #104206 from Mic92/telegraf

This commit is contained in:
Jörg Thalheim 2020-11-18 21:55:07 +01:00 committed by GitHub
commit 624285d029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 13 deletions

View File

@ -21,7 +21,7 @@ in {
}; };
environmentFiles = mkOption { environmentFiles = mkOption {
type = types.nullOr (types.listOf types.path); type = types.listOf types.path;
default = []; default = [];
example = "/run/keys/telegraf.env"; example = "/run/keys/telegraf.env";
description = '' description = ''
@ -38,14 +38,11 @@ in {
description = "Extra configuration options for telegraf"; description = "Extra configuration options for telegraf";
type = settingsFormat.type; type = settingsFormat.type;
example = { example = {
outputs = { outputs.influxdb = {
influxdb = {
urls = ["http://localhost:8086"]; urls = ["http://localhost:8086"];
database = "telegraf"; database = "telegraf";
}; };
}; inputs.statsd = {
inputs = {
statsd = {
service_address = ":8125"; service_address = ":8125";
delete_timings = true; delete_timings = true;
}; };
@ -53,7 +50,6 @@ in {
}; };
}; };
}; };
};
###### implementation ###### implementation

View File

@ -6,9 +6,9 @@ import ./make-test-python.nix ({ pkgs, ...} : {
machine = { ... }: { machine = { ... }: {
services.telegraf.enable = true; services.telegraf.enable = true;
services.telegraf.environmentFiles = [pkgs.writeText "secrets" '' services.telegraf.environmentFiles = [(pkgs.writeText "secrets" ''
SECRET=example SECRET=example
'']; '')];
services.telegraf.extraConfig = { services.telegraf.extraConfig = {
agent.interval = "1s"; agent.interval = "1s";
agent.flush_interval = "1s"; agent.flush_interval = "1s";