From 8dbb152546ff2607dbdda062d5d87eafa6d96f71 Mon Sep 17 00:00:00 2001 From: Ashwani Singh Date: Thu, 1 Aug 2024 09:52:23 +0530 Subject: [PATCH] Update grafana datasource --- charts/pga/templates/datasources/loki.yaml | 33 +++++++++++++++++++ .../pga/templates/datasources/prometheus.yaml | 6 ++++ charts/pga/templates/datasources/tempo.yaml | 13 ++++++++ charts/pga/templates/datasources/thanos.yaml | 6 ++++ 4 files changed, 58 insertions(+) create mode 100644 charts/pga/templates/datasources/loki.yaml diff --git a/charts/pga/templates/datasources/loki.yaml b/charts/pga/templates/datasources/loki.yaml new file mode 100644 index 00000000..8e06c56f --- /dev/null +++ b/charts/pga/templates/datasources/loki.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: kube-thanos-datasource + namespace: monitoring + labels: + grafana_datasource: "1" + app: kube-grafana + prometheus: kube +data: + kube-thanos.yaml: |- + apiVersion: 1 + datasources: + - uid: loki + orgId: 1 + name: Loki + type: loki + typeName: Loki + access: proxy + url: http://loki-logging-gateway.logging.svc + password: '' + user: '' + database: '' + basicAuth: false + isDefault: false + jsonData: + derivedFields: + - datasourceUid: tempo + matcherRegex: (?:trace_id)=(\w+) + name: TraceID + url: $${__value.raw} + readOnly: false + editable: true \ No newline at end of file diff --git a/charts/pga/templates/datasources/prometheus.yaml b/charts/pga/templates/datasources/prometheus.yaml index 6265b32d..4dea4883 100644 --- a/charts/pga/templates/datasources/prometheus.yaml +++ b/charts/pga/templates/datasources/prometheus.yaml @@ -21,4 +21,10 @@ data: jsonData: httpMethod: POST timeInterval: 30s + exemplarTraceIdDestinations: + - datasourceUid: tempo + name: TraceID + httpMethod: POST + readOnly: false + editable: true {{- end }} diff --git a/charts/pga/templates/datasources/tempo.yaml b/charts/pga/templates/datasources/tempo.yaml index 2505df07..e8b1442f 100644 --- a/charts/pga/templates/datasources/tempo.yaml +++ b/charts/pga/templates/datasources/tempo.yaml @@ -19,3 +19,16 @@ data: jsonData: handleGrafanaManagedAlerts: false implementation: prometheus + nodeGraph: + enabled: true + search: + hide: false + lokiSearch: + datasourceUid: loki + tracesToLogs: + datasourceUid: loki + filterBySpanID: false + filterByTraceID: true + mapTagNamesEnabled: false + tags: + - app \ No newline at end of file diff --git a/charts/pga/templates/datasources/thanos.yaml b/charts/pga/templates/datasources/thanos.yaml index 3f6df974..67e86e32 100644 --- a/charts/pga/templates/datasources/thanos.yaml +++ b/charts/pga/templates/datasources/thanos.yaml @@ -20,4 +20,10 @@ data: jsonData: httpMethod: POST timeInterval: 30s + exemplarTraceIdDestinations: + - datasourceUid: tempo + name: TraceID + httpMethod: POST + readOnly: false + editable: true {{- end }}