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

syslog adapter: add support for some template functions #356

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nailgun
Copy link

@nailgun nailgun commented Nov 22, 2017

This can be useful for extracting structured data from container name. For example, Kubernetes name containers in format k8s_CONTAINER_POD_NAMESPACE_UID_0 so I can now extract structured data by defining this var:

SYSLOG_STRUCTURED_DATA='kube container="{{ index (split .ContainerName "_") 1 }}" pod="{{ index (split .ContainerName "_") 2 }}" namespace="{{ index (split .ContainerName "_") 3}}"'

@michaelshobbs
Copy link
Member

tests fail. probably needs to be rebased with master

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

Successfully merging this pull request may close these issues.

2 participants