diff options
author | lassulus <lass@lassul.us> | 2017-02-06 19:13:59 +0100 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2017-02-09 10:06:19 +0100 |
commit | 73f72eeaf128104328b5e53257e3ca92c8441df5 (patch) | |
tree | cf1e5047359d13cc85a226b034fe7968d57eb9db /lass | |
parent | 8d5484a79763cc4d4f4feebc5cb1fa27d3d44764 (diff) |
l 3: remove obsolete telegraf module
Diffstat (limited to 'lass')
-rw-r--r-- | lass/3modules/default.nix | 1 | ||||
-rw-r--r-- | lass/3modules/telegraf.nix | 84 |
2 files changed, 0 insertions, 85 deletions
diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix index f97b041ac..f4a2b4565 100644 --- a/lass/3modules/default.nix +++ b/lass/3modules/default.nix @@ -9,6 +9,5 @@ _: ./usershadow.nix ./xresources.nix ./kapacitor.nix - ./telegraf.nix ]; } diff --git a/lass/3modules/telegraf.nix b/lass/3modules/telegraf.nix deleted file mode 100644 index 0b3be2d69..000000000 --- a/lass/3modules/telegraf.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ config, lib, pkgs, ... }: - -with builtins; -with lib; - -let - cfg = config.lass.telegraf; - - out = { - options.lass.telegraf = api; - config = mkIf cfg.enable imp; - }; - - api = { - enable = mkEnableOption "telegraf"; - dataDir = mkOption { - type = types.str; - default = "/var/lib/telegraf"; - }; - user = mkOption { - type = types.str; - default = "telegraf"; - }; - outputs = mkOption { - type = types.str; - default = '' - [outputs.influxdb] - urls = ["http://localhost:8086"] - database = "telegraf_db" - user_agent = "telegraf" - ''; - }; - inputs = mkOption { - type = with types; listOf str; - default = [ - '' - [cpu] - percpu = false - totalcpu = true - drop = ["cpu_time"] - '' - ]; - }; - interval = mkOption { - type = types.str; - default = "10s"; - }; - config = mkOption { - type = types.str; - #TODO: find a good default - default = '' - [agent] - interval = "${cfg.interval}" - - [outputs] - - ${cfg.outputs} - - ${concatStringsSep "\n" cfg.inputs} - - ''; - description = "configuration telegraf is started with"; - }; - }; - - configFile = pkgs.writeText "telegraf.conf" cfg.config; - - imp = { - - systemd.services.telegraf = { - description = "telegraf"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - restartIfChanged = true; - - serviceConfig = { - Restart = "always"; - ExecStart = "${pkgs.telegraf}/bin/telegraf -config ${configFile}"; - }; - }; - }; - -in out |