nixos/middleman: Add nginx netdata monitoring
This commit is contained in:
parent
f01fa8f6b1
commit
6ae99062fd
@ -170,9 +170,23 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
netdata = {
|
||||||
|
enable = true;
|
||||||
|
configDir = {
|
||||||
|
"go.d/nginxvts.conf" = pkgs.writeText "netdata-nginxvts.conf" ''
|
||||||
|
jobs:
|
||||||
|
- name: local
|
||||||
|
url: http://localhost/status/format/json
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableReload = true;
|
enableReload = true;
|
||||||
|
additionalModules = with pkgs.nginxModules; [
|
||||||
|
vts
|
||||||
|
];
|
||||||
|
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
clientMaxBodySize = "0";
|
clientMaxBodySize = "0";
|
||||||
@ -231,6 +245,8 @@
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-Protocol $scheme;
|
proxy_set_header X-Forwarded-Protocol $scheme;
|
||||||
proxy_set_header X-Scheme $scheme;
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
|
||||||
|
vhost_traffic_status_zone;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -63,6 +63,21 @@ in
|
|||||||
wellKnown
|
wellKnown
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
"localhost" = {
|
||||||
|
forceSSL = false;
|
||||||
|
onlySSL = false;
|
||||||
|
locations = {
|
||||||
|
"/status".extraConfig = ''
|
||||||
|
access_log off;
|
||||||
|
allow 127.0.0.1;
|
||||||
|
allow ::1;
|
||||||
|
deny all;
|
||||||
|
|
||||||
|
vhost_traffic_status_display;
|
||||||
|
vhost_traffic_status_display_format html;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
"sso.${lib.my.pubDomain}" = {
|
"sso.${lib.my.pubDomain}" = {
|
||||||
locations."/".proxyPass = config.my.nginx-sso.includes.endpoint;
|
locations."/".proxyPass = config.my.nginx-sso.includes.endpoint;
|
||||||
@ -71,7 +86,7 @@ in
|
|||||||
|
|
||||||
"netdata-colony.${lib.my.pubDomain}" =
|
"netdata-colony.${lib.my.pubDomain}" =
|
||||||
let
|
let
|
||||||
hosts = [ "vm" "fw" "ctr" "jackflix-ctr" ];
|
hosts = [ "vm" "fw" "ctr" "http" "jackflix-ctr" ];
|
||||||
matchHosts = concatStringsSep "|" hosts;
|
matchHosts = concatStringsSep "|" hosts;
|
||||||
in
|
in
|
||||||
mkMerge [
|
mkMerge [
|
||||||
|
Loading…
Reference in New Issue
Block a user