From 546469e18d24252360279ea276eb9a502670c712 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 30 Oct 2015 15:28:12 +0100 Subject: shared wolf: enable collectd towards heidi --- shared/2configs/collectd-base.nix | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 shared/2configs/collectd-base.nix (limited to 'shared/2configs') diff --git a/shared/2configs/collectd-base.nix b/shared/2configs/collectd-base.nix new file mode 100644 index 000000000..b2ec40b28 --- /dev/null +++ b/shared/2configs/collectd-base.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + +# TODO: krebs.collectd.plugins +with lib; +let + connect-time-cfg = with pkgs; writeText "collectd-connect-time.conf" '' + LoadPlugin python + + ModulePath "${collectd-connect-time}/lib/${python.libPrefix}/site-packages/" + Import "collectd_connect_time" + + target "heidi.retiolum:8080" "localhost" "google.com" "google.de" "omo.retiolum" "gum.retiolum" "gum.krebsco.de" + interval 10 + + + ''; + graphite-cfg = pkgs.writeText "collectd-graphite.conf" '' + LoadPlugin write_graphite + + + Host "heidi.retiolum" + Port "2003" + Prefix "retiolum." + EscapeCharacter "_" + StoreRates false + AlwaysAppendDS false + + + ''; +in { + imports = [ ]; + + nixpkgs.config.packageOverrides = pkgs: with pkgs; { + collectd = pkgs.collectd.override { python= pkgs.python; }; + }; + services.collectd = { + enable = true; + include = [ (toString connect-time-cfg) (toString graphite-cfg) ]; + }; + +} -- cgit v1.2.3 From 31816a8e7010fab9504f2d13e786723e086d177f Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 5 Nov 2015 12:13:20 +0100 Subject: update collectd targets --- shared/2configs/collectd-base.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared/2configs') diff --git a/shared/2configs/collectd-base.nix b/shared/2configs/collectd-base.nix index b2ec40b28..3b792bf23 100644 --- a/shared/2configs/collectd-base.nix +++ b/shared/2configs/collectd-base.nix @@ -9,7 +9,7 @@ let ModulePath "${collectd-connect-time}/lib/${python.libPrefix}/site-packages/" Import "collectd_connect_time" - target "heidi.retiolum:8080" "localhost" "google.com" "google.de" "omo.retiolum" "gum.retiolum" "gum.krebsco.de" + target "localhost:22" "google.com" "google.de" "gum.retiolum:22" "gum.krebsco.de" "heidi.shack:22" "10.42.0.1:22" "heise.de" "t-online.de" interval 10 @@ -18,7 +18,7 @@ let LoadPlugin write_graphite - Host "heidi.retiolum" + Host "heidi.shack" Port "2003" Prefix "retiolum." EscapeCharacter "_" -- cgit v1.2.3