line 41: field enabled not found in type aggregation.Config when start loki
2
votes
1
answer
904
views
when I am using this command to start loki:
loki --config.file=./config.yml
show error like this:
failed parsing config: ./config.yml: yaml: unmarshal errors:
line 41: field enabled not found in type aggregation.Config. Use
-config.expand-env=true
flag if you want to expand environment variables in your config file
then I tried like this:
root@iZhp33cq6mvrjo8mzatgrmZ:/etc/loki# loki --config.file=./config.yml --config.expand-env=true
failed parsing config: ./config.yml: yaml: unmarshal errors:
line 41: field enabled not found in type aggregation.Config
this is the config.yml
:
root@iZhp33cq6mvrjo8mzatgrmZ:/etc/loki# cat config.yml
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
log_level: debug
grpc_server_max_concurrent_streams: 1000
common:
instance_addr: 127.0.0.1
path_prefix: /tmp/loki
storage:
filesystem:
chunks_directory: /tmp/loki/chunks
rules_directory: /tmp/loki/rules
replication_factor: 1
ring:
kvstore:
store: inmemory
query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 100
schema_config:
configs:
- from: 2020-10-24
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
pattern_ingester:
enabled: true
metric_aggregation:
enabled: true
loki_address: localhost:3100
ruler:
alertmanager_url: http://localhost:9093
frontend:
encoding: protobuf
# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration
# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/
#
# Statistics help us better understand how Loki is used, and they show us performance
# levels for most users. This helps us prioritize features and documentation.
# For more information on what's sent, look at
# https://github.com/grafana/loki/blob/main/pkg/analytics/stats.go
# Refer to the buildReport method to see what goes into a report.
#
# If you would like to disable reporting, uncomment the following lines:
#analytics:
# reporting_enabled: false
does anyone facing the same issue? This is the loki version:
root@iZhp33cq6mvrjo8mzatgrmZ:/etc/loki# loki --version
loki, version 3.3.0 (branch: k227, revision: 19bbc448)
build user: root@bbfd3492a6b4
build date: 2024-11-19T11:25:17Z
go version: go1.23.1
platform: linux/amd64
tags: netgo
I tried to print the ascii charactor and seems no special charactor:
root@iZhp33cq6mvrjo8mzatgrmZ:~# cd /etc/loki
root@iZhp33cq6mvrjo8mzatgrmZ:/etc/loki# awk 'NR>40 && NR < 43' config.yml | od -c
0000000 e n a b l e d : t r u
0000020 e \n l o k i _ a d d r e
0000040 s s : l o c a l h o s t : 3 1
0000060 0 0 \n
0000063
Asked by Dolphin
(791 rep)
Nov 26, 2024, 02:10 PM
Last activity: Nov 27, 2024, 05:54 AM
Last activity: Nov 27, 2024, 05:54 AM