fix loki problems with "too many requests"

This commit is contained in:
Ingolf Wagner 2024-05-17 10:15:03 +02:00
parent 9160b34178
commit ded4be9f5d
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -38,6 +38,7 @@
services.loki = { services.loki = {
enable = true; enable = true;
# https://grafana.com/docs/loki/latest/configure/#supported-contents-and-default-values-of-lokiyaml
configuration = { configuration = {
server = { server = {
@ -112,10 +113,19 @@
}; };
}; };
}; };
# The query_range block configures the query splitting and caching in the Loki query-frontend.
query_range = {
# Perform query parallelisations based on storage sharding configuration and
# query ASTs. This feature is supported only by the chunks storage engine.
parallelise_shardable_queries = false; # false because of https://github.com/grafana/loki/issues/7649#issuecomment-1625645403
}; };
};
# user, group, dataDir, extraFlags, (configFile) # user, group, dataDir, extraFlags, (configFile)
}; };
# https://grafana.com/docs/grafana/latest/datasources/loki/#provision-the-loki-data-source
services.grafana.provision.datasources.settings = { services.grafana.provision.datasources.settings = {
apiVersion = 1; apiVersion = 1;
datasources = [ datasources = [
@ -124,6 +134,10 @@
type = "loki"; type = "loki";
uid = "loki01"; uid = "loki01";
url = "http://localhost:${toString config.services.loki.configuration.server.http_listen_port}"; url = "http://localhost:${toString config.services.loki.configuration.server.http_listen_port}";
jsonData = {
timeout = 360;
maxLines = 1000;
};
} }
]; ];
}; };