Skip to content

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