diff options
author | lassulus <lassulus@lassul.us> | 2017-09-20 12:15:51 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-09-20 12:15:51 +0200 |
commit | dcde03342c040ca00f2b80ca4d1c3bb68844b105 (patch) | |
tree | 2c5463c193c7dd6124c4dfc756fb23ab88e846b2 /makefu/2configs/stats/telegraf/europastats.nix | |
parent | 821e59baca98b5caba65c6e7c7e4d6671593a69e (diff) | |
parent | ad06126dcedfd5f28a3b64f2df2f32428f933a08 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/stats/telegraf/europastats.nix')
-rw-r--r-- | makefu/2configs/stats/telegraf/europastats.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/makefu/2configs/stats/telegraf/europastats.nix b/makefu/2configs/stats/telegraf/europastats.nix new file mode 100644 index 000000000..9249280c5 --- /dev/null +++ b/makefu/2configs/stats/telegraf/europastats.nix @@ -0,0 +1,43 @@ +{ pkgs, ...}: +let + pkg = with pkgs.python3Packages;buildPythonPackage rec { + rev = "be31da7"; + name = "europastats-${rev}"; + propagatedBuildInputs = [ + requests2 + docopt + ]; + src = pkgs.fetchgit { + url = "http://cgit.euer.krebsco.de/europastats"; + inherit rev; + sha256 = "0qj18vgj9nm6aisyqhk3iz3rf8xp7mn5jc6sfylcaw588a9sjfvc"; + }; + }; +in { + services.telegraf.extraConfig.inputs.exec = [ + { + commands = [ "${pkg}/bin/europa-attractions"]; + timeout = "1m"; + data_format = "json"; + name_override = "europawaiting"; + interval = "1m"; + tag_keys = [ + "status" + "type" + "name" + ]; + } + { + commands = [ "${pkg}/bin/europa-weather"]; + timeout = "20s"; + data_format = "json"; + name_override = "europaweather"; + interval = "10m"; + tag_keys = [ + "type" + "name" + "offset" + ]; + } + ]; +} |