Merge pull request #104206 from Mic92/telegraf
This commit is contained in:
commit
624285d029
|
@ -21,7 +21,7 @@ in {
|
|||
};
|
||||
|
||||
environmentFiles = mkOption {
|
||||
type = types.nullOr (types.listOf types.path);
|
||||
type = types.listOf types.path;
|
||||
default = [];
|
||||
example = "/run/keys/telegraf.env";
|
||||
description = ''
|
||||
|
@ -38,17 +38,13 @@ in {
|
|||
description = "Extra configuration options for telegraf";
|
||||
type = settingsFormat.type;
|
||||
example = {
|
||||
outputs = {
|
||||
influxdb = {
|
||||
urls = ["http://localhost:8086"];
|
||||
database = "telegraf";
|
||||
};
|
||||
outputs.influxdb = {
|
||||
urls = ["http://localhost:8086"];
|
||||
database = "telegraf";
|
||||
};
|
||||
inputs = {
|
||||
statsd = {
|
||||
service_address = ":8125";
|
||||
delete_timings = true;
|
||||
};
|
||||
inputs.statsd = {
|
||||
service_address = ":8125";
|
||||
delete_timings = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,9 +6,9 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
|
||||
machine = { ... }: {
|
||||
services.telegraf.enable = true;
|
||||
services.telegraf.environmentFiles = [pkgs.writeText "secrets" ''
|
||||
services.telegraf.environmentFiles = [(pkgs.writeText "secrets" ''
|
||||
SECRET=example
|
||||
''];
|
||||
'')];
|
||||
services.telegraf.extraConfig = {
|
||||
agent.interval = "1s";
|
||||
agent.flush_interval = "1s";
|
||||
|
|
Loading…
Reference in a new issue