yep, more dotfiles

server: plug more things to prometheus

wiro.world 4dcae650 ae3b1e41

verified
+19 -5
+19 -5
nixos/profiles/server.nix
··· 85 85 prometheus-port = 9001; 86 86 prometheus-node-exporter-port = 9002; 87 87 headscale-metrics-port = 9003; 88 + authelia-metrics-port = 9004; 88 89 in 89 90 { 90 91 imports = [ ··· 341 342 static_configs = [{ targets = [ "localhost:${toString 2019}" ]; }]; 342 343 } 343 344 { 344 - job_name = "node"; 345 + job_name = "node-exporter"; 345 346 static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; 346 347 } 348 + { 349 + job_name = "headscale"; 350 + static_configs = [{ targets = [ "localhost:${toString headscale-metrics-port}" ]; }]; 351 + } 352 + { 353 + job_name = "authelia"; 354 + static_configs = [{ targets = [ "localhost:${toString authelia-metrics-port}" ]; }]; 355 + } 356 + { 357 + job_name = "miniflux"; 358 + static_configs = [{ targets = [ "localhost:${toString miniflux-port}" ]; }]; 359 + } 347 360 ]; 348 361 349 362 exporters.node = { ··· 372 385 port = headscale-port; 373 386 settings = { 374 387 server_url = "https://${headscale-hostname}"; 375 - # TODO: prometheus scrape headscale metrics 376 388 metrics_listen_addr = "127.0.0.1:${toString headscale-metrics-port}"; 377 389 378 390 # disable TLS ··· 425 437 settings = { 426 438 server.address = "localhost:${toString authelia-port}"; 427 439 storage.local.path = "/var/lib/authelia-main/db.sqlite3"; 428 - 429 - # TODO: prometheus scrape authelia metrics 440 + telemetry.metrics = { 441 + enabled = true; 442 + address = "tcp://:${toString authelia-metrics-port}/metrics"; 443 + }; 430 444 431 445 session = { 432 446 cookies = [{ ··· 609 623 LISTEN_ADDR = "127.0.0.1:${toString miniflux-port}"; 610 624 CREATE_ADMIN = 0; 611 625 612 - # TODO: scrape metrics endpoint with prometheus 626 + METRICS_COLLECTOR = 1; 613 627 614 628 OAUTH2_PROVIDER = "oidc"; 615 629 OAUTH2_OIDC_PROVIDER_NAME = "wiro.world SSO";