Improve Loki config
This commit is contained in:
parent
fa7852d5a5
commit
54ec8c85d3
1 changed files with 30 additions and 65 deletions
|
@ -55,20 +55,6 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
rsyslogd = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
ruleset(name="remote"){
|
|
||||||
action(type="omfwd" Target="localhost" Port="1514" Protocol="tcp" Template="RSYSLOG_SyslogProtocol23Format" TCP_Framing="octet-counted")
|
|
||||||
}
|
|
||||||
|
|
||||||
module(load="imudp")
|
|
||||||
input(type="imudp" port="514" ruleset="remote")
|
|
||||||
|
|
||||||
module(load="imtcp")
|
|
||||||
input(type="imtcp" port="514" ruleset="remote")
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
influxdb2 = {
|
influxdb2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -270,59 +256,20 @@ in {
|
||||||
loki = {
|
loki = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configuration = {
|
configuration = {
|
||||||
server.http_listen_port = 3100;
|
|
||||||
server.grpc_listen_port = 9096;
|
|
||||||
auth_enabled = false;
|
auth_enabled = false;
|
||||||
ingester = {
|
server = {
|
||||||
lifecycler = {
|
http_listen_port = 3100;
|
||||||
address = "192.168.1.27";
|
grpc_listen_port = 9096;
|
||||||
ring = {
|
};
|
||||||
kvstore = {
|
common = {
|
||||||
store = "inmemory";
|
instance_addr = "0.0.0.0";
|
||||||
};
|
path_prefix = "/tmp/loki";
|
||||||
replication_factor = 1;
|
storage.filesystem = {
|
||||||
};
|
chunks_directory = "/tmp/loki/chunks";
|
||||||
|
rules_directory = "/tmp/loki/rules";
|
||||||
};
|
};
|
||||||
chunk_idle_period = "1h";
|
replication_factor = 1;
|
||||||
max_chunk_age = "1h";
|
ring.kvstore.store = "inmemory";
|
||||||
chunk_target_size = 999999;
|
|
||||||
chunk_retain_period = "30s";
|
|
||||||
};
|
|
||||||
schema_config = {
|
|
||||||
configs = [
|
|
||||||
{
|
|
||||||
from = "2022-06-06";
|
|
||||||
store = "boltdb-shipper";
|
|
||||||
object_store = "filesystem";
|
|
||||||
schema = "v13";
|
|
||||||
index = {
|
|
||||||
prefix = "index_";
|
|
||||||
period = "24h";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
storage_config = {
|
|
||||||
boltdb_shipper = {
|
|
||||||
active_index_directory = "/var/lib/loki/boltdb-shipper-active";
|
|
||||||
cache_location = "/var/lib/loki/boltdb-shipper-cache";
|
|
||||||
cache_ttl = "24h";
|
|
||||||
};
|
|
||||||
|
|
||||||
filesystem = {
|
|
||||||
directory = "/var/lib/loki/chunks";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
limits_config = {
|
|
||||||
reject_old_samples = true;
|
|
||||||
reject_old_samples_max_age = "168h";
|
|
||||||
allow_structured_metadata = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
table_manager = {
|
|
||||||
retention_deletes_enabled = false;
|
|
||||||
retention_period = "0s";
|
|
||||||
};
|
};
|
||||||
compactor = {
|
compactor = {
|
||||||
working_directory = "/var/lib/loki";
|
working_directory = "/var/lib/loki";
|
||||||
|
@ -332,6 +279,24 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
query_range.results_cache.cache.embedded_cache = {
|
||||||
|
enabled = true;
|
||||||
|
max_size_mb = 100;
|
||||||
|
};
|
||||||
|
schema_config.configs = [
|
||||||
|
{
|
||||||
|
from = "2025-05-13";
|
||||||
|
store = "tsdb";
|
||||||
|
object_store = "filesystem";
|
||||||
|
schema = "v13";
|
||||||
|
index = {
|
||||||
|
prefix = "index_";
|
||||||
|
period = "24h";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ruler.alertmanager_url = "http://localhost:9093";
|
||||||
|
analytics.reporting_enabled = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
promtail = {
|
promtail = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue