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

Loki Rules is not honoring s3 prefix #14657

Open
pvishwa3 opened this issue Oct 30, 2024 · 2 comments
Open

Loki Rules is not honoring s3 prefix #14657

pvishwa3 opened this issue Oct 30, 2024 · 2 comments

Comments

@pvishwa3
Copy link

Describe the bug
We installed the loki with S3 as storage with object_prefix /loki-logs . all the logs are flowing into path. but when i try to create the rule its store as <<bucket_name>>/rules/fake

below is my configuration

helm:
parameters:
- name: loki.auth_enabled
value: 'false'
- name: loki.storage.type
value: s3
- name: loki.storage.bucketNames.chunks
value: {{ .Values.loki.bucket }}
- name: loki.storage.bucketNames.ruler
value: {{ .Values.loki.bucket }}
- name: loki.storage.bucketNames.admin
value: {{ .Values.loki.bucket }}
- name: loki.storage.s3.s3
value: s3://{{ .Values.loki.bucket }}
- name: loki.storage.s3.endpoint
value: s3.{{ .Values.loki.aws_region }}.amazonaws.com
- name: loki.storage.s3.region
value: {{ .Values.loki.aws_region }}
- name: loki.storage.s3.accessKeyId
value: {{ .Values.loki.aws_accessKey }}
- name: loki.storage.s3.secretAccessKey
value: {{ .Values.loki.aws_secretKey }}
- name: loki.storage.s3.s3ForcePathStyle
value: 'false'
- name: loki.storage.s3.insecure
value: 'false'
values: |-
loki:
auth_enabled: false
storage_config:
object_prefix: loki-logs
schemaConfig:
configs:
- from: 2024-04-01
store: tsdb
object_store: s3
schema: v13
index:
prefix: loki_index_
period: 24h

      ingester:
          chunk_encoding: snappy
      tracking:
          enabled: true
      querier:
          max_concurrent: 4
    
    deploymentMode: SimpleScalable
    backend:
      replicas: 3
    read:
      replicas: 3
      legacyReadTarget: false
    write:
      replicas: 3
    minio:
      enabled: false
    singleBinary:
      replicas: 0  
    ingester:
      replicas: 0
    querier:
      replicas: 0
    queryFrontend:
      replicas: 0
    queryScheduler:
        replicas: 0
    distributor:
      replicas: 0
    compactor:
      replicas: 0
    indexGateway:
      replicas: 0
    bloomCompactor:
      replicas: 0
    bloomGateway:
      replicas: 0        

To Reproduce
Steps to reproduce the behavior:

  1. Install the loki chart with s3 prefix
  2. Create rules using the lok api

Expected behavior
A loki rule will be created without errir

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm

Screenshots, Promtail config, or terminal output

@JStickler
Copy link
Contributor

Are your rules not being created? Or is the problem that "its store as <<bucket_name>>/rules/fake"?
Because if you're running in single tenant mode, then Loki sets the tenant ID to fake, so this is expected behavior.

@pvishwa3
Copy link
Author

Rules are creating. but the rules are not storing the configured prefix.

Ex : I configured the object_prefix like <<bucket_name>>/loki-logs . the rules are storing under the <<bucket_name>>/rules . we would like store under the <<bucket_name>>/loki-logs/rules like that.

Logs are storing under the <<bucket_name>>/loki-logs but not rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants