From 049d6b7c30b8ebadc3257ddb41a0e334b96e84c9 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 23 Sep 2021 21:52:11 -0700 Subject: [PATCH] Send k8s events additionally to Splunk HEC endpoint We want k8s events to be available in Splunk Log Observer additionally to IMM --- .../config/_otel-k8s-cluster-receiver-config.tpl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl index 711d9dcb9e..bb1adabdd5 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-k8s-cluster-receiver-config.tpl @@ -91,6 +91,14 @@ exporters: access_token: ${SPLUNK_ACCESS_TOKEN} timeout: 10s + {{- if and .Values.logsEnabled .Values.otelK8sClusterReceiver.k8sEventsEnabled }} + splunk_hec: + endpoint: {{ include "splunk-otel-collector.ingestUrl" . }}/v1/log + token: "${SPLUNK_ACCESS_TOKEN}" + sourcetype: kube:events + source: kubelet + {{- end }} + service: extensions: [health_check] pipelines: @@ -119,6 +127,10 @@ service: - batch - resource - resourcedetection - exporters: [signalfx] + exporters: + - signalfx + {{- if .Values.logsEnabled }} + - splunk_hec + {{- end }} {{- end }} {{- end }}