grafana / helm-charts

Apache License 2.0
1.66k stars 2.28k forks source link

Invalid configmap generation for helm chart grafana #1369

Closed AndriiKhodyriev closed 2 years ago

AndriiKhodyriev commented 2 years ago

I'm trying to create a configmap I use this values ​​file. Example :

datasources: 
  datasources.yaml:
    apiVersion: 1
    datasources:
      - name: Prometheus
        type: prometheus
        uid: prometheus
        url: http://prometheus-kube-prometheus-prometheus.monitoring:9090
      - name: Thanos
        type: prometheus
        uid: thanos
        url: http://thanos-query.monitoring:9090
      - name: Tempo
        type: tempo
        uid: tempo
        url: http://tempo-tempo-distributed-query-frontend.monitoring:3100
        jsonData:
          httpMethod: GET
          datasourceUid: loki
          lokiSearch:
            datasourceUid: loki
          serviceMap:
            datasourceUid: prometheus
          search:
            hide: false
          nodeGraph:
            enabled: true
      - name: Loki
        type: loki
        uid: loki
        url: http://loki.loki:3100
        jsonData:
          maxLine: 1000
          derivedFields:
            - datasourceUid: tempo
              matcherRegex: "traceID=(\\w+)"
              name: TraceID
              url: "$${__value.raw}"

But when creating configmap i get wrong CM Example :

datasources.yaml: | apiVersion: 1 datasources:

I did everything according to the documentation, but the second day I can not understand what is the reason for the incorrect creation.

As a result, I'm trying to do a Loki search to work with Tempo

AndriiKhodyriev commented 2 years ago

Very stupid mistake... I didn't read the documentation correctly...

Fixed values ​​file

jsonData: httpMethod: GET tracesToLogs: datasourceUid: loki mapTagNamesEnabled: false spanStartTimeShift: '1h' spanEndTimeShift: '1h' filterByTraceID: false filterBySpanID: false lokiSearch: datasourceUid: loki serviceMap: datasourceUid: prometheus search: hide: false nodeGraph: enabled: true