modules: remove prometheus folder + other changes

This commit is contained in:
notohh 2024-01-17 08:53:19 -05:00
parent d1b1358fbc
commit 6a51075486
Signed by: notohh
GPG key ID: BD47506D475EE86D
6 changed files with 13 additions and 27 deletions

View file

@ -1,7 +1,7 @@
{inputs, ...}: { {inputs, ...}: {
imports = [ imports = [
inputs.nh.nixosModules.default inputs.nh.nixosModules.default
./prometheus ./prometheus.nix
./security.nix ./security.nix
./users.nix ./users.nix
./nix.nix ./nix.nix
@ -11,5 +11,4 @@
./sops.nix ./sops.nix
./time.nix ./time.nix
]; ];
services.tailscale.enable = true;
} }

View file

@ -8,7 +8,9 @@
overlays = [inputs.nur.overlay]; overlays = [inputs.nur.overlay];
config = { config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = lib.optional (pkgs.obsidian.version == "1.5.3") "electron-25.9.0"; permittedInsecurePackages = [
"electron-25.9.0"
];
}; };
}; };

View file

@ -2,37 +2,35 @@ _: {
networking.firewall.allowedTCPPorts = [9090]; networking.firewall.allowedTCPPorts = [9090];
services.prometheus = { services.prometheus = {
enable = true; enable = true;
globalConfig = {
scrape_interval = "15s";
evaluation_interval = "15s";
};
scrapeConfigs = [ scrapeConfigs = [
{ {
job_name = "prometheus"; job_name = "prometheus";
scrape_interval = "15s";
static_configs = [{targets = ["localhost:9090"];}]; static_configs = [{targets = ["localhost:9090"];}];
} }
{ {
job_name = "node"; job_name = "node";
scrape_interval = "15s";
static_configs = [{targets = ["localhost:9100"];}]; static_configs = [{targets = ["localhost:9100"];}];
} }
{ {
job_name = "traefik"; job_name = "traefik";
scrape_interval = "15s";
static_configs = [{targets = ["100.104.42.96:8080"];}]; static_configs = [{targets = ["100.104.42.96:8080"];}];
} }
{
job_name = "redis_exporter";
scrape_interval = "15s";
static_configs = [{targets = ["100.94.214.100:9002"];}];
}
{ {
job_name = "postgres"; job_name = "postgres";
scrape_interval = "15s";
static_configs = [{targets = ["100.94.214.100:9003"];}]; static_configs = [{targets = ["100.94.214.100:9003"];}];
} }
{ {
job_name = "blocky"; job_name = "blocky";
scrape_interval = "15s";
static_configs = [{targets = ["100.73.192.45:4000"];}]; static_configs = [{targets = ["100.73.192.45:4000"];}];
} }
{
job_name = "redis_exporter";
static_configs = [{targets = ["100.94.214.100:9002"];}];
}
]; ];
exporters = { exporters = {
node = { node = {

View file

@ -1,7 +0,0 @@
_: {
services.prometheus.exporters.postgres = {
enable = true;
openFirewall = true;
port = 9003;
};
}

View file

@ -1,7 +0,0 @@
_: {
services.prometheus.exporters.redis = {
enable = true;
openFirewall = true;
port = 9002;
};
}

View file

@ -10,6 +10,7 @@
fstrim = { fstrim = {
enable = true; enable = true;
}; };
tailscale.enable = true;
}; };
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";