nix-config/hosts/public-access-proxy/stats.nix

15 lines
319 B
Nix

{ pkgs, ... }:
{
c3d2.hq.statistics.enable = true;
services.collectd.plugins.exec = ''
Exec "collectd" "${pkgs.ruby}/bin/ruby" "${./haproxy-stats.rb}"
'';
# add a socket that is world-accessible
services.haproxy.config = ''
global
stats socket /run/haproxy/haproxy-stats.sock mode 666
'';
}