shared wolf: enable collectd towards heidi

This commit is contained in:
makefu 2015-10-30 15:28:12 +01:00
parent 6410fd0f85
commit 546469e18d
2 changed files with 42 additions and 0 deletions

View file

@ -5,6 +5,7 @@ with lib;
{
imports = [
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
../2configs/collectd-base.nix
];
krebs.build.host = config.krebs.hosts.wolf;

View file

@ -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
<Plugin python>
ModulePath "${collectd-connect-time}/lib/${python.libPrefix}/site-packages/"
Import "collectd_connect_time"
<Module collectd_connect_time>
target "heidi.retiolum:8080" "localhost" "google.com" "google.de" "omo.retiolum" "gum.retiolum" "gum.krebsco.de"
interval 10
</Module>
</Plugin>
'';
graphite-cfg = pkgs.writeText "collectd-graphite.conf" ''
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) ];
};
}