diff options
author | lassulus <lass@xerxes.r> | 2019-09-06 15:37:58 +0200 |
---|---|---|
committer | lassulus <lass@xerxes.r> | 2019-09-06 15:37:58 +0200 |
commit | ed97000b20623a952e41e808756ea8c8dfb666e6 (patch) | |
tree | f039f642bc03388704a66d94fc8ace402b583945 /krebs/2configs/stats | |
parent | c2773285ebf8165fd725065047df7a58da01fb42 (diff) | |
parent | fce2c4275caf7df064fb13a4280291a9aefaef1f (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/2configs/stats')
-rw-r--r-- | krebs/2configs/stats/shack-client.nix (renamed from krebs/2configs/stats/wolf-client.nix) | 12 | ||||
-rw-r--r-- | krebs/2configs/stats/shack-debugging.nix | 41 |
2 files changed, 44 insertions, 9 deletions
diff --git a/krebs/2configs/stats/wolf-client.nix b/krebs/2configs/stats/shack-client.nix index 0412eba9a..5131b0f78 100644 --- a/krebs/2configs/stats/wolf-client.nix +++ b/krebs/2configs/stats/shack-client.nix @@ -17,6 +17,8 @@ Interface "lo" Interface "vboxnet*" Interface "virbr*" + Interface "veth*" + Interface "br-*" IgnoreSelected true </Plugin> @@ -53,15 +55,7 @@ LoadPlugin network <Plugin "network"> - Server "stats.makefu.r" "25826" - </Plugin> - - LoadPlugin curl - <Plugin curl> - <Page "smarthome"> - URL "http://smarthome.shack/"; - MeasureResponseTime true - </Page> + Server "influx.shack" "25826" </Plugin> ''; }; diff --git a/krebs/2configs/stats/shack-debugging.nix b/krebs/2configs/stats/shack-debugging.nix new file mode 100644 index 000000000..b5a0cf05e --- /dev/null +++ b/krebs/2configs/stats/shack-debugging.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + +# TODO: krebs.collectd.plugins +with import <stockholm/lib>; +let + connect-time-cfg = with pkgs; writeText "collectd-connect-time.conf" '' + LoadPlugin python + <Plugin python> + ModulePath "${collectd-connect-time}/lib/${python.libPrefix}/site-packages/" + Import "collectd_connect_time" + <Module collectd_connect_time> + target "localhost:22" "google.com" "google.de" "gum.krebsco.de" "10.42.0.1:22" "heise.de" "t-online.de""10.0.1.3" "10.0.0.3:22" "10.0.0.4:22" + interval 10 + </Module> + </Plugin> + ''; + graphite-cfg = pkgs.writeText "collectd-graphite.conf" '' + LoadPlugin write_graphite + <Plugin "write_graphite"> + <Carbon> + Host "graphite.shack" + Port "2003" + Prefix "retiolum." + EscapeCharacter "_" + StoreRates false + AlwaysAppendDS false + </Carbon> + </Plugin> + ''; +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) ]; + }; + +} |