add monitoring for celestia

This commit is contained in:
2025-03-09 16:40:25 +01:00
parent 19112159cc
commit 4559269329
4 changed files with 65 additions and 185 deletions

View File

@ -39,6 +39,7 @@ in {
sops.secrets."restic_documents_repository_password" = {};
sops.secrets."restic_images_repository_password" = {};
sops.secrets."protonvpn_wg_private_key" = {};
sops.secrets."telegraf_api_token" = {};
imports = [
./hardware-configuration.nix
@ -229,6 +230,42 @@ in {
};
};
prometheus.exporters = {
zfs.enable = true;
smartctl = {
enable = true;
devices = [
"/dev/disk/by-id/ata-Samsung_SSD_840_PRO_Series_S1ATNSAF213446M"
] ++ disks;
};
systemd.enable = true;
};
telegraf = {
enable = true;
environmentFiles = [ config.sops.secrets."telegraf_api_token".path ];
extraConfig = {
inputs = {
prometheus = {
urls = [
"http://127.0.0.1:${builtins.toString config.services.prometheus.exporters.zfs.port}"
"http://127.0.0.1:${builtins.toString config.services.prometheus.exporters.smartctl.port}"
"http://127.0.0.1:${builtins.toString config.services.prometheus.exporters.systemd.port}"
];
};
};
outputs = {
influxdb_v2 = {
urls = ["https://influx.fuckwit.dev"];
token = "\${TELEGRAF_API_TOKEN}";
organization = "fuckwit.dev";
bucket = "world";
timeout = "10s";
};
};
};
};
nginx = {
enable = true;
clientMaxBodySize = "500m";