# Source: grafana/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana
  namespace: jx-observability
  labels:
    helm.sh/chart: grafana-6.17.4
    app.kubernetes.io/name: grafana
    app.kubernetes.io/instance: grafana
    app.kubernetes.io/version: "8.2.2"
    app.kubernetes.io/managed-by: Helm
    gitops.jenkins-x.io/pipeline: 'namespaces'
  annotations:
    meta.helm.sh/release-name: 'grafana'
data:
  plugins: grafana-piechart-panel 1.6.1,briangann-datatable-panel 1.0.3
  grafana.ini: |
    [analytics]
    check_for_updates = false
    reporting_enabled = false
    [dashboards]
    default_home_dashboard_path = /tmp/dashboards/jenkins-x.json
    [grafana_net]
    url = https://grafana.net
    [log]
    mode = console
    [paths]
    data = /var/lib/grafana/
    logs = /var/log/grafana
    plugins = /var/lib/grafana/plugins
    provisioning = /etc/grafana/provisioning
    [server]
    domain = grafana-jx-observability.20.62.181.82.nip.io
    root_url = http://grafana-jx-observability.20.62.181.82.nip.io
    serve_from_sub_path = true
  datasources.yaml: |
    apiVersion: 1
    datasources:
    - access: proxy
      jsonData:
        derivedFields:
        - datasourceUid: tempo
          matcherRegex: (?:[Tt]race[-_]?[Ii][Dd])[\\]?["]?[=:][ ]?[\\]?["]?(\w+)
          name: TraceID
          url: $${__value.raw}
      name: Loki
      type: loki
      uid: loki
      url: http://loki.jx-observability:3100
      version: 1
    - access: proxy
      httpMethod: POST
      jsonData:
        exemplarTraceIdDestinations:
        - datasourceUid: tempo
          name: TraceID
      name: Prometheus
      type: prometheus
      uid: prometheus
      url: http://prometheus-server.jx-observability
      version: 1
    - access: proxy
      jsonData:
        tracesToLogs:
          datasourceUid: loki
      name: Tempo
      type: tempo
      uid: tempo
      url: http://tempo.jx-observability:3100
      version: 1
  notifiers.yaml: |
    delete_notifiers: []
    notifiers:
    - is_default: true
      name: prometheus-alertmanager
      org_id: 1
      settings:
        url: http://prometheus-alertmanager.jx-observability
      type: prometheus-alertmanager
      uid: prometheus-alertmanager
