diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-10-24 11:42:28 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-10-24 11:42:28 +0200 |
commit | e43fdf341072e4a0150324196fc7af8f383860ec (patch) | |
tree | e90a9b225c3b8f770911f3ec4b41328ff1f66d8b /modules/private/monitoring/status.nix | |
parent | 70712d466fd52ebd48c5ddda2556ac36f04677a0 (diff) | |
download | Nix-e43fdf341072e4a0150324196fc7af8f383860ec.tar.gz Nix-e43fdf341072e4a0150324196fc7af8f383860ec.tar.zst Nix-e43fdf341072e4a0150324196fc7af8f383860ec.zip |
Add netdata configuration
Diffstat (limited to 'modules/private/monitoring/status.nix')
-rw-r--r-- | modules/private/monitoring/status.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/private/monitoring/status.nix b/modules/private/monitoring/status.nix index 4f5f4bb..4ca0327 100644 --- a/modules/private/monitoring/status.nix +++ b/modules/private/monitoring/status.nix | |||
@@ -28,11 +28,34 @@ | |||
28 | recommendedOptimisation = true; | 28 | recommendedOptimisation = true; |
29 | recommendedGzipSettings = true; | 29 | recommendedGzipSettings = true; |
30 | recommendedProxySettings = true; | 30 | recommendedProxySettings = true; |
31 | upstreams."netdata".servers = { "127.0.0.1:19999" = {}; }; | ||
32 | upstreams."netdata".extraConfig = '' | ||
33 | keepalive 64; | ||
34 | ''; | ||
31 | virtualHosts."status.immae.eu" = { | 35 | virtualHosts."status.immae.eu" = { |
32 | acmeRoot = config.myServices.certificates.webroot; | 36 | acmeRoot = config.myServices.certificates.webroot; |
33 | useACMEHost = name; | 37 | useACMEHost = name; |
34 | forceSSL = true; | 38 | forceSSL = true; |
35 | locations."/".proxyPass = "http://unix:/run/naemon-status/socket.sock:/"; | 39 | locations."/".proxyPass = "http://unix:/run/naemon-status/socket.sock:/"; |
40 | |||
41 | locations."= /netdata".return = "301 /netdata/"; | ||
42 | locations."~ /netdata/(?<ndpath>.*)".extraConfig = '' | ||
43 | proxy_redirect off; | ||
44 | proxy_set_header Host $host; | ||
45 | |||
46 | proxy_set_header X-Forwarded-Host $host; | ||
47 | proxy_set_header X-Forwarded-Server $host; | ||
48 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
49 | proxy_http_version 1.1; | ||
50 | proxy_pass_request_headers on; | ||
51 | proxy_set_header Connection "keep-alive"; | ||
52 | proxy_store off; | ||
53 | proxy_pass http://netdata/$ndpath$is_args$args; | ||
54 | |||
55 | gzip on; | ||
56 | gzip_proxied any; | ||
57 | gzip_types *; | ||
58 | ''; | ||
36 | }; | 59 | }; |
37 | }; | 60 | }; |
38 | security.acme.certs."${name}" = { | 61 | security.acme.certs."${name}" = { |