netdata again
This commit is contained in:
parent
7185fdc514
commit
6b8f0afde8
4 changed files with 12 additions and 13 deletions
|
@ -2,7 +2,7 @@
|
|||
conf = {
|
||||
ssh.enable = true;
|
||||
nginx.enable = true;
|
||||
grafana.enable = true;
|
||||
netdata.enable = true;
|
||||
mail.enable = false; # broken
|
||||
website.enable = true;
|
||||
fedi.enable = true;
|
||||
|
|
|
@ -9,11 +9,11 @@ in {
|
|||
./fonts
|
||||
./games
|
||||
./git
|
||||
./grafana
|
||||
./home
|
||||
./layout
|
||||
./mail
|
||||
./matrix
|
||||
./netdata
|
||||
./networking
|
||||
./nginx
|
||||
./niri
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
{ lib, pkgs, config, ... }: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config) conf;
|
||||
cfg = config.services.grafana.settings.server;
|
||||
in mkIf conf.grafana.enable {
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
"grafana.twoneis.site" = {
|
||||
"netdata.twoneis.site" = {
|
||||
useACMEHost = "twoneis.site";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${toString cfg.http_addr}:${toString cfg.http_port}";
|
||||
proxyPass = "http://localhost:19999";
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
|
@ -17,14 +16,14 @@ in mkIf conf.grafana.enable {
|
|||
};
|
||||
};
|
||||
|
||||
services.grafana = {
|
||||
services.netdata = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
http_addr = "127.0.0.1";
|
||||
http_port = 3001;
|
||||
domain = "grafana.twoneis.site";
|
||||
};
|
||||
package = pkgs.netdata.override { withCloudUi = true; };
|
||||
config.global = {
|
||||
"memory mode" = "ram";
|
||||
"debug log" = "none";
|
||||
"access log" = "none";
|
||||
"error log" = "syslog";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -18,7 +18,7 @@ in {
|
|||
# Generally server options
|
||||
ssh.enable = mkEnableOption "Install my public key to allow accessing this machine via ssh.";
|
||||
nginx.enable = mkEnableOption "Enable nginx. All the following options expect this to be enabled.";
|
||||
grafana.enable = mkEnableOption "Enable grafana dashboarding tool.";
|
||||
netdata.enable = mkEnableOption "Enable netdata monitoring tool.";
|
||||
mail.enable = mkEnableOption "Enable mail server.";
|
||||
website.enable = mkEnableOption "Serve website through nginx.";
|
||||
fedi.enable = mkEnableOption "Host a fedi server on this machine.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue