Solved the edge case of Loki failing at first startup due to folders not initialized.
Some checks failed
Build Nix modules (dry-run) / build-modules (push) Failing after 3m26s
Some checks failed
Build Nix modules (dry-run) / build-modules (push) Failing after 3m26s
This commit is contained in:
parent
0270bbac6f
commit
7fdee70cec
3 changed files with 62 additions and 55 deletions
|
|
@ -34,7 +34,7 @@ in {
|
|||
(choose [./modules/desktop-manager/gnome.nix ../desktop-manager/gnome.nix])
|
||||
(choose [./modules/local/hostname_username.nix ../local/hostname_username.nix])
|
||||
(choose [./modules/local/networking_local.nix ../local/networking_local.nix])
|
||||
(choose [./modules/bootloader/seabios-assigned-iso-at-birth.nix ../bootloader/seabios-assigned-iso-at-birth.nix])
|
||||
# (choose [./modules/bootloader/seabios-assigned-iso-at-birth.nix ../bootloader/seabios-assigned-iso-at-birth.nix])
|
||||
(choose [./modules/lix-default.nix ../lix-default.nix])
|
||||
(choose [./modules/toolsets/grafana_metric.nix ../toolsets/grafana_metric.nix])
|
||||
(choose [./modules/secrets-config/sops-database.nix ../secrets-config/sops-database.nix])
|
||||
|
|
|
|||
|
|
@ -77,64 +77,61 @@ in {
|
|||
#analytics.reporting_enabled = false;
|
||||
};
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
# ============== Declarative Config ================
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
# ============== Declarative Config ================
|
||||
datasources.settings.datasources = [
|
||||
# Provisioning a built-in data source
|
||||
{
|
||||
name = "Prometheus - Forgejo";
|
||||
type = "prometheus";
|
||||
url = "http://10.1.1.4:9001";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
datasources.settings.datasources = [
|
||||
# Provisioning a built-in data source
|
||||
{
|
||||
name = "Prometheus - Forgejo";
|
||||
type = "prometheus";
|
||||
url = "http://10.1.1.4:9001";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
{
|
||||
name = "Loki - Forgejo";
|
||||
type = "loki";
|
||||
url = "http://10.1.1.4:3100";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
{
|
||||
name = "Loki - Forgejo";
|
||||
type = "loki";
|
||||
url = "http://10.1.1.4:3100";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
{
|
||||
name = "Prometheus - Build Machine";
|
||||
type = "prometheus";
|
||||
url = "http://10.1.1.3:9001";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
{
|
||||
name = "Prometheus - Build Machine";
|
||||
type = "prometheus";
|
||||
url = "http://10.1.1.3:9001";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
{
|
||||
name = "Loki - Build Machine";
|
||||
type = "loki";
|
||||
url = "http://10.1.1.3:3100";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
{
|
||||
name = "Loki - Build Machine";
|
||||
type = "loki";
|
||||
url = "http://10.1.1.3:3100";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
{
|
||||
name = "Prometheus - Database";
|
||||
type = "prometheus";
|
||||
url = "http://10.1.1.251:9001";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
{
|
||||
name = "Loki - Database";
|
||||
type = "loki";
|
||||
url = "http://10.1.1.251:3100";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
];
|
||||
};
|
||||
{
|
||||
name = "Prometheus - Database";
|
||||
type = "prometheus";
|
||||
url = "http://10.1.1.251:9001";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
|
||||
{
|
||||
name = "Loki - Database";
|
||||
type = "loki";
|
||||
url = "http://10.1.1.251:3100";
|
||||
isDefault = false;
|
||||
editable = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
|
|
@ -276,7 +273,5 @@ in {
|
|||
|
||||
networking.firewall.allowedTCPPorts = [3000];
|
||||
networking.firewall.allowedUDPPorts = [3000];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,4 +136,16 @@
|
|||
|
||||
networking.firewall.allowedTCPPorts = [3100 9001];
|
||||
networking.firewall.allowedUDPPorts = [3100 9001];
|
||||
|
||||
systemd.services."loki-create-dirs" = {
|
||||
description = "Create Loki runtime/storage directories";
|
||||
after = ["network.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = '' ${pkgs.bash}/bin/bash -c "set -eu; \
|
||||
mkdir -p /var/loki /var/loki/compactor
|
||||
'';
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue