mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-27 06:10:53 +01:00
Init monitoring
This commit is contained in:
parent
3e9371df4c
commit
4658773aae
1 changed files with 39 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
@ -70,6 +70,44 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking.nameservers = [ "100.127.245.71" "9.9.9.9" ];
|
||||
environment.etc."resolv.conf" = with lib; with pkgs; {
|
||||
source = writeText "resolv.conf" ''
|
||||
${concatStringsSep "\n" (map (ns: "nameserver ${ns}") config.networking.nameservers)}
|
||||
options edns0
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
|
||||
services.grafana.enable = true;
|
||||
services.grafana.settings.server.http_port = 3000;
|
||||
services.victoriametrics.enable = true;
|
||||
|
||||
services.nginx.virtualHosts."monitoring.julienmalka.me" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3000";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
security.acme.certs."prometheus.luj".server = "https://ca.luj:8444/acme/acme/directory";
|
||||
services.nginx.virtualHosts."prometheus.luj" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8428";
|
||||
extraConfig = ''
|
||||
allow 100.10.10.0/8;
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue