monitoring #1

Merged
Ittihadyya merged 24 commits from monitoring into trunk 2024-12-20 18:16:41 +02:00
2 changed files with 38 additions and 2 deletions
Showing only changes of commit f93018a4cf - Show all commits

View file

@ -30,6 +30,9 @@
admin_user = builtins.concatStringsSep "" ["$__file" "{${config.sops.secrets.grafana_admin_account.path}}"];
admin_password = builtins.concatStringsSep "" ["$__file" "{${config.sops.secrets.grafana_admin_pass.path}}"];
secret_key = builtins.concatStringsSep "" ["$__file" "{${config.sops.secrets.grafana_secret_key.path}}"];
disable_gravatar = true;
cookie_secure = true;
};
server = {
root_url = "https://grf.collective-conciousness.monster";
@ -38,7 +41,10 @@
http_port = 6700;
};
# smtp = {};
# users = {};
users = {
allow_org_create = true;
default_theme = "system";
};
};
/*

View file

@ -1,11 +1,41 @@
{
universal.modules = [
{
services.prometheus.exporters = {
node = {
enable = true;
enabledCollectors = ["systemd"];
port = 6703;
};
varnish.enable = true;
};
}
];
glucose.modules = [
{
lib,
molecules,
...
}: let
ip = i: "10.24.1.${toString i}";
ips = builtins.mapAttrs (lib.const ip) molecules;
ips' = builtins.mapAttrs (name: ip: "${ip}:6703") ips;
in {
services.prometheus = {
enable = true;
port = 6750;
enableReload = true;
scrapeConfigs = [
{
job_name = "devices";
static_configs = [
{
targets = ips';
}
];
}
];
};
}
];