Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metric_aggregation_enabled and metric_aggregation settings do not work in Loki 3.1.2 #15567

Open
hoonyworld opened this issue Dec 31, 2024 · 0 comments · May be fixed by #15568
Open

metric_aggregation_enabled and metric_aggregation settings do not work in Loki 3.1.2 #15567

hoonyworld opened this issue Dec 31, 2024 · 0 comments · May be fixed by #15568

Comments

@hoonyworld
Copy link

hoonyworld commented Dec 31, 2024

Describe the bug

In Loki 3.1.2, the metric_aggregation_enabled and metric_aggregation configuration options are not working as expected. When these settings are included in the cmd/loki/loki-local-config.yaml file and Loki is started using docker-compose, the following error occurs:

failed parsing config: /etc/loki/local-config.yaml: yaml: unmarshal errors:
  line 32: field metric_aggregation_enabled not found in type validation.plain
  line 48: field metric_aggregation not found in type pattern.Config. Use `-config.expand-env=true` flag if you want to expand environment variables in your config file

To Reproduce
Steps to reproduce the behavior:

  1. Use Loki 3.1.2(latest) version.
  2. Include the following configuration in loki-local-config.yaml
limits_config:
  metric_aggregation_enabled: true

pattern_ingester:
  enabled: true
  metric_aggregation:
    loki_address: localhost:3100
  1. Start Loki with docker-compose.
  2. Observe the following error message
failed parsing config: /etc/loki/local-config.yaml: yaml: unmarshal errors:
  line 32: field metric_aggregation_enabled not found in type validation.plain
  line 48: field metric_aggregation not found in type pattern.Config. Use `-config.expand-env=true` flag if you want to expand environment variables in your config file

Expected behavior
I expected that enabling metric_aggregation_enabled: true would activate metric aggregation functionality in Loki. Additionally, the metric_aggregation configuration under pattern_ingester should work as intended for log aggregation.

Environment:

  • Infrastructure: Ubuntu 24, Docker
  • Deployment tool: Docker Compose

Screenshots, Promtail config, or terminal output

  • Here is the relevant section of the loki-local-config.yaml file:
auth_enabled: false

server:
  http_listen_port: 3100
  log_level: info

common:
  instance_addr: 127.0.0.1
  path_prefix: /var/loki
  storage:
    filesystem:
      chunks_directory: /var/loki/chunks
      rules_directory: /var/loki/rules
  replication_factor: 1
  ring:
    kvstore:
      store: inmemory

query_range:
  results_cache:
    cache:
      embedded_cache:
        enabled: true
        max_size_mb: 100

limits_config:
  metric_aggregation_enabled: true

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:
    loki_address: localhost:3100

ruler:
  alertmanager_url: http://localhost:9093

frontend:
  encoding: protobuf
  • The following error appears when Loki attempts to start
Image
@hoonyworld hoonyworld changed the title metric_aggregation_enabled and metric_aggregation settings do not work in Rocky 3.3.2 metric_aggregation_enabled and metric_aggregation settings do not work in Loki 3.3.2 Dec 31, 2024
@hoonyworld hoonyworld changed the title metric_aggregation_enabled and metric_aggregation settings do not work in Loki 3.3.2 metric_aggregation_enabled and metric_aggregation settings do not work in Loki 3.1.2 Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant