Last active
          January 9, 2025 19:09 
        
      - 
      
 - 
        
Save giuliohome/c8e75c47a92f878683c0bb5eebc8689c to your computer and use it in GitHub Desktop.  
    Grafana Loki
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | helm repo add grafana https://grafana.github.io/helm-charts | |
| helm repo update | |
| helm upgrade --install loki grafana/loki -n monitoring --create-namespace -f loki-values.yaml | |
| helm upgrade --install promtail grafana/promtail -n monitoring -f promtail-values.yaml | |
| helm install my-grafana grafana/grafana --namespace monitoring | |
| kubectl port-forward --namespace monitoring svc/my-grafana 3000:80 | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | loki: | |
| commonConfig: | |
| replication_factor: 1 | |
| schemaConfig: | |
| configs: | |
| - from: "2024-04-01" | |
| store: tsdb | |
| object_store: s3 | |
| schema: v13 | |
| index: | |
| prefix: loki_index_ | |
| period: 24h | |
| pattern_ingester: | |
| enabled: true | |
| limits_config: | |
| allow_structured_metadata: true | |
| volume_enabled: true | |
| ruler: | |
| enable_api: true | |
| minio: | |
| enabled: true | |
| deploymentMode: SingleBinary | |
| singleBinary: | |
| replicas: 1 | |
| # Zero out replica counts of other deployment modes | |
| backend: | |
| replicas: 0 | |
| read: | |
| replicas: 0 | |
| write: | |
| 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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | config: | |
| # publish data to loki | |
| clients: | |
| - url: http://loki-gateway/loki/api/v1/push | |
| tenant_id: 1 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Set the
X-Scope-OrgIdheader to a value like1in Loki's settings under Home > Connections > Data Sources, in theHeaderssection.