strato-infra/nixos/machines/prometheus/default.nix
Julius fa09bf933c
Update to nixpkgs 22.05
Add grafana and prometheus as well
Remove glitch-soc, maybe I'll try mastodon sometime in the future
but not now.
2022-06-06 19:19:45 +02:00

26 lines
598 B
Nix

{ config, pkgs, ... }:
let
logSouce = name: target: {
job_name = name;
static_configs = [{ targets = [ target ]; }];
};
in {
imports = [ ../../common ../../common/lxc.nix ];
networking.hostName = "prometheus";
system.stateVersion = "21.11";
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 9001 ];
services.prometheus = {
enable = true;
port = 9001;
scrapeConfigs = [
(logSouce "asraphiel" "asraphiel.dev:9100")
(logSouce "nginx_status_page" "nginx.lxd:9113")
(logSouce "nginx_logs" "nginx.lxd:9117")
];
};
}