summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/stats/telegraf/europastats.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-10-01 17:54:06 +0200
committerlassulus <lassulus@lassul.us>2017-10-01 17:54:06 +0200
commitd7f65ea679866f24e4ca52b51bd6f068a6b38195 (patch)
tree6a09e7cc2a4c9af0507bdc189652c78832a2f952 /makefu/2configs/stats/telegraf/europastats.nix
parentd973c779eb71749af464edb1ed0216b0d5317eb2 (diff)
parente62f376e6177f3efb0e0bcd3aad97a991c3b6d60 (diff)
Merge branch 'master' into staging/17.09
Diffstat (limited to 'makefu/2configs/stats/telegraf/europastats.nix')
-rw-r--r--makefu/2configs/stats/telegraf/europastats.nix43
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"
+ ];
+ }
+ ];
+}