Merge pull request #104206 from Mic92/telegraf
This commit is contained in:
commit
624285d029
@ -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,17 +38,13 @@ 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 = {
|
inputs.statsd = {
|
||||||
statsd = {
|
service_address = ":8125";
|
||||||
service_address = ":8125";
|
delete_timings = true;
|
||||||
delete_timings = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -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";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user