diff options
author | makefu <github@syntax-fehler.de> | 2015-10-28 22:07:51 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2015-10-28 22:07:51 +0100 |
commit | 7fe4f6dc1726005f87026e7c492eb55f7763a777 (patch) | |
tree | 3058e9d957f02b45424638d30f17bc4893569822 /makefu/2configs | |
parent | 84ebd8c02132131d893fd9bb92ea523e59272649 (diff) | |
parent | bbd28caa40c06574653fc8364157721c562eabbb (diff) |
Merge branch 'master' of pnp:stockholm
Diffstat (limited to 'makefu/2configs')
-rw-r--r-- | makefu/2configs/collectd/collectd-base.nix | 42 | ||||
-rw-r--r-- | makefu/2configs/unstable-sources.nix | 2 |
2 files changed, 43 insertions, 1 deletions
diff --git a/makefu/2configs/collectd/collectd-base.nix b/makefu/2configs/collectd/collectd-base.nix new file mode 100644 index 000000000..7909c1be5 --- /dev/null +++ b/makefu/2configs/collectd/collectd-base.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +# graphite-web on port 8080 +# carbon cache on port 2003 (tcp/udp) +with lib; +let + connect-time-cfg = with pkgs; writeText "collectd-connect-time.cfg" '' + LoadPlugin python + <Plugin python> + ModulePath "${collectd-connect-time}/lib/${python.libPrefix}/site-packages/" + Import "collectd_connect_time" + <Module collectd_connect_time> + target "wry.retiolum" "localhost" "google.com" + interval 30 + </Module> + </Plugin> + ''; + graphite-cfg = pkgs.writeText "collectd-graphite-cfg" '' + LoadPlugin write_graphite + <Plugin "write_graphite"> + <Carbon> + Host "heidi.retiolum" + 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) ]; + }; + +} diff --git a/makefu/2configs/unstable-sources.nix b/makefu/2configs/unstable-sources.nix index 173060515..7bd5f50cb 100644 --- a/makefu/2configs/unstable-sources.nix +++ b/makefu/2configs/unstable-sources.nix @@ -5,7 +5,7 @@ krebs.build.source = { git.nixpkgs = { url = https://github.com/makefu/nixpkgs; - rev = "984d33884d63d404ff2da76920b8bc8b15471552"; + rev = "15b5bbfbd1c8a55e7d9e05dd9058dc102fac04fe"; # cherry-picked collectd }; dir.secrets = { |