rico0: enable loki
This commit is contained in:
parent
8f72d77a3e
commit
a437a923d8
3 changed files with 67 additions and 0 deletions
|
@ -61,6 +61,7 @@ _: {
|
|||
"blocky.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
|
||||
"frp.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
|
||||
"grafana.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
|
||||
"loki.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
|
||||
"prometheus.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
|
||||
"transmission.labs.adtya.xyz" = "10.10.10.14,fd7c:585c:c4ae::14";
|
||||
};
|
||||
|
|
|
@ -3,6 +3,7 @@ _: {
|
|||
./alertmanager.nix
|
||||
./blocky.nix
|
||||
./grafana.nix
|
||||
./loki.nix
|
||||
./prometheus.nix
|
||||
../../../shared/prometheus-exporters.nix
|
||||
];
|
||||
|
|
65
hosts/rico0/services/apps/loki.nix
Normal file
65
hosts/rico0/services/apps/loki.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
_: {
|
||||
services = {
|
||||
caddy = {
|
||||
virtualHosts."loki.labs.adtya.xyz" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy 127.0.0.1:3100
|
||||
tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key
|
||||
'';
|
||||
};
|
||||
};
|
||||
loki = {
|
||||
enable = true;
|
||||
dataDir = "/mnt/data/loki";
|
||||
configuration = {
|
||||
auth_enabled = false;
|
||||
|
||||
server = {
|
||||
http_listen_port = 3100;
|
||||
log_level = "warn";
|
||||
};
|
||||
|
||||
common = {
|
||||
ring = {
|
||||
instance_addr = "127.0.0.1";
|
||||
kvstore = {
|
||||
store = "inmemory";
|
||||
};
|
||||
};
|
||||
storage = {
|
||||
filesystem = { rules_directory = "/mnt/data/loki/rules"; };
|
||||
};
|
||||
replication_factor = 1;
|
||||
path_prefix = "/mnt/data/loki";
|
||||
};
|
||||
|
||||
schema_config = {
|
||||
configs = [
|
||||
{
|
||||
from = "2024-07-01";
|
||||
store = "tsdb";
|
||||
object_store = "filesystem";
|
||||
scheme = "v13";
|
||||
index = { prefix = "index_"; period = "24h"; };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
storage_config = {
|
||||
filesystem = {
|
||||
directory = "/mnt/data/loki/chunks";
|
||||
};
|
||||
};
|
||||
|
||||
ruler = {
|
||||
alertmanager_url = "https://alertmanager.labs.adtya.xyz";
|
||||
};
|
||||
|
||||
frontend = {
|
||||
encoding = "protobuf";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services.loki.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
|
||||
}
|
Loading…
Reference in a new issue