1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Fix loki config

This commit is contained in:
RGBCube 2024-01-14 14:32:37 +03:00
parent 751b1e1f15
commit 2987068836
No known key found for this signature in database

View file

@ -5,23 +5,27 @@ serverSystemConfiguration {
name = "Loki"; name = "Loki";
type = "loki"; type = "loki";
url = "http://[::]:${toString config.services.promtail.configuration.server.http_listen_port}"; url = "http://[::]:${toString config.services.promtail.configuration.server.http_listen_port}";
# url = "http://127.0.0.1:${toString config.services.promtail.configuration.server.http_listen_port}";
}]; }];
services.promtail = enabled { services.promtail = enabled {
configuration = { configuration = {
server.http_listen_port = 9002; server.http_listen_address = "[::]";
server.grpc_listen_port = 0; # server.http_listen_address = "127.0.0.1";
server.http_listen_port = 9002;
server.grpc_listen_port = 0;
positions.filename = "/tmp/promtail-positions.yml"; positions.filename = "/tmp/promtail-positions.yml";
clients = [{ clients = [{
url = "http://[::]:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push"; url = "http://[::]:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push";
# url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push";
}]; }];
scrape_configs = [{ scrape_configs = [{
job_name = "journal"; job_name = "journal";
journal.max_age = "1w"; journal.max_age = "168h";
journal.labels = { journal.labels = {
job = "journal"; job = "journal";
host = config.networking.hostName; host = config.networking.hostName;
@ -39,10 +43,12 @@ serverSystemConfiguration {
configuration = { configuration = {
auth_enabled = false; auth_enabled = false;
server.http_listen_port = 9001; server.http_listen_address = "[::]";
server.http_listen_port = 9001;
ingester = { ingester = {
lifecycler.address = "::"; lifecycler.common.interface_names = [ "ens18" ];
lifecycler.address = "[::]";
lifecycler.ring = { lifecycler.ring = {
kvstore.store = "inmemory"; kvstore.store = "inmemory";
@ -73,14 +79,14 @@ serverSystemConfiguration {
boltdb_shipper = { boltdb_shipper = {
active_index_directory = "/var/lib/loki/boltdb-shipper-active"; active_index_directory = "/var/lib/loki/boltdb-shipper-active";
cache_location = "/var/lib/loki/boltdb-shipper-cache"; cache_location = "/var/lib/loki/boltdb-shipper-cache";
cache_ttl = "1d"; cache_ttl = "24h";
shared_store = "filesystem"; shared_store = "filesystem";
}; };
}; };
limits_config = { limits_config = {
reject_old_samples = true; reject_old_samples = true;
reject_old_samples_max_age = "2w"; reject_old_samples_max_age = "336h";
}; };
chunk_store_config.max_look_back_period = "0s"; chunk_store_config.max_look_back_period = "0s";