shack/influx: enable collectd receiver
This commit is contained in:
parent
18badcd7c6
commit
86592a7233
|
@ -1,9 +1,12 @@
|
||||||
# hostname: influx.shack
|
{pkgs, ... }: # hostname: influx.shack
|
||||||
let
|
let
|
||||||
port = 8086;
|
port = 8086;
|
||||||
|
collectd-port = 25826;
|
||||||
|
db = "collectd_db";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [ port ]; # for legacy applications
|
networking.firewall.allowedTCPPorts = [ port ]; # for legacy applications
|
||||||
|
networking.firewall.allowedUDPPorts = [ collectd-port ];
|
||||||
services.nginx.virtualHosts."influx.shack" = {
|
services.nginx.virtualHosts."influx.shack" = {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString port}/";
|
proxyPass = "http://localhost:${toString port}/";
|
||||||
|
@ -14,6 +17,17 @@ in
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
http.bind-address = "0.0.0.0:${toString port}";
|
http.bind-address = "0.0.0.0:${toString port}";
|
||||||
http.log-enabled = false;
|
http.log-enabled = false;
|
||||||
|
http.write-tracing = false;
|
||||||
|
http.suppress-write-log = true;
|
||||||
|
data.trace-logging-enabled = false;
|
||||||
|
data.query-log-enabled = false;
|
||||||
|
monitoring.enabled = false;
|
||||||
|
collectd = [{
|
||||||
|
enabled = true;
|
||||||
|
typesdb = "${pkgs.collectd}/share/collectd/types.db";
|
||||||
|
database = db;
|
||||||
|
bind-address = ":${toString collectd-port}";
|
||||||
|
}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user