i think metrics are done?
This commit is contained in:
parent
382371b7dd
commit
1f38029c28
3 changed files with 27 additions and 1 deletions
|
@ -24,6 +24,12 @@ in {
|
||||||
staticSites = {
|
staticSites = {
|
||||||
"v2.reidlab.online".dataDir = "/var/www/v2.reidlab.online";
|
"v2.reidlab.online".dataDir = "/var/www/v2.reidlab.online";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
metrics = {
|
||||||
|
enable = true;
|
||||||
|
domain = "analytics.reidlab.online";
|
||||||
|
port = 2342;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ in {
|
||||||
enable = mkEnableOption "enable grafana with loki, prometheus, and promtail";
|
enable = mkEnableOption "enable grafana with loki, prometheus, and promtail";
|
||||||
domain = mkOption {
|
domain = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "grafana.reidlab.online";
|
default = "analytics.reidlab.online";
|
||||||
};
|
};
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
|
|
20
modules/services/promtail.yml
Normal file
20
modules/services/promtail.yml
Normal 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"
|
Loading…
Add table
Add a link
Reference in a new issue