Julius
fa09bf933c
Add grafana and prometheus as well Remove glitch-soc, maybe I'll try mastodon sometime in the future but not now.
26 lines
598 B
Nix
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")
|
|
];
|
|
};
|
|
|
|
}
|