i think metrics are done?

This commit is contained in:
Reid 2024-05-08 22:24:40 -07:00
parent 382371b7dd
commit 1f38029c28
3 changed files with 27 additions and 1 deletions

View file

@ -24,6 +24,12 @@ in {
staticSites = {
"v2.reidlab.online".dataDir = "/var/www/v2.reidlab.online";
};
metrics = {
enable = true;
domain = "analytics.reidlab.online";
port = 2342;
};
};
};

View file

@ -8,7 +8,7 @@ in {
enable = mkEnableOption "enable grafana with loki, prometheus, and promtail";
domain = mkOption {
type = types.str;
default = "grafana.reidlab.online";
default = "analytics.reidlab.online";
};
port = mkOption {
type = types.int;

View file

@ -0,0 +1,20 @@
server:
http_listen_port: 28183
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://127.0.0.1:3100/loki/api/v1/push
scrape_configs:
- job_name: journal
journal:
max_age: 12h
labels:
job: systemd-journal
host: nixos-server-reid
relabel_configs:
- source_labels: ["__journal__systemd_unit"]
target_label: "unit"