From e7952449b885296d2a605d02fb652870084bed01 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 --- CHANGELOG.md | 4 ++++ .../config/_otel-k8s-cluster-receiver-config.tpl | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ccd3273a..594b111314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +### Added + +- Send k8s events additionally to Splunk HEC endpoint (#202) + ## [0.35.1] - 2021-09-23 ### Added 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 }}