Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splunk Indexing based on kubernetes namespace's #4166

Open
manikrishna558 opened this issue May 7, 2023 · 0 comments
Open

Splunk Indexing based on kubernetes namespace's #4166

manikrishna558 opened this issue May 7, 2023 · 0 comments

Comments

@manikrishna558
Copy link

Is your feature request related to a problem? Please describe.

Below is my configuration of fluentd which collect logs from kubernetes and sends to splunk based on namespace. when ever a new namespace is created in K8s we write a manual match condition . the list goes on whenever a new namespace is added.

<match **namespace_abc**>
  @type splunk_hec
  source "namespace_abc"
  sourcetype_key streaming_data
   index {{ .Values.fluentd.splunk.name| quote }}
</match>

<match namespace_xyz>
@type splunk_hec
source "namespace_abc"
sourcetype_key streaming_data
index {{ .Values.fluentd.splunk.name| quote }}

Describe the solution you'd like

How do I avoid multiple manual match entry for different namespaces each time a new namespace is being added ?
how to get namespace/pod/etc K8s information in FluentD so that I can automate it instead of matching the case manually .

Describe alternatives you've considered

so far the alternative we planned is to get the namespace lable and pass it to match statement so that we can avoid multiple match statments
<match ${NAMESPACE_VALUE_K8S}>
@type splunk_hec
source "${NAMESPACE_VALUE_K8S}"
sourcetype_key streaming_data
index {{ .Values.fluentd.splunk.name| quote }}

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant