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

feat: Allow using templates in indexFormat for OpenSearch sink #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jarnfast
Copy link

This PR adds the capability to use templates when constructing the indexFormat for OpenSearch sinks.

The change is backwards compatible with the existing time formatting directives - this is ensured by the added tests.

Given an example configuration:

receivers:
  - name: "by-namespace"
    opensearch:
      hosts:
        - http://localhost:9200
      indexFormat: "kube-events-{{ .InvolvedObject.Namespace }}-{2006-01-02}"

An event originating from kube-system will end up in a index named kube-events-kube-system-<go formatted date>.

Closes #155

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

Successfully merging this pull request may close these issues.

Supporting Kubernetes event properties in OpenSearch index format
2 participants