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

Trim cluster log tags to pod name and container name #7539

Merged
merged 1 commit into from Apr 30, 2015

Conversation

satnam6502
Copy link
Contributor

This changes updates the Fluentd to Elasticsearch collector to use a tag which has the format kubernetes.<pod-name>-<container-name> and it strips out the Docker image name and some of the previous prefix which was not useful. Once this is in I will update the corresponding collector for Cloud Logging which should result in nicer tag for searching the logs of a pod even after container restarts.

<match reform.**>
type record_reformer
enable_ruby true
tag kubernetes.${tag_suffix[3].split('-')[0..-2].join('-')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment showing what the tag is before and after this operates on it would be very helpful to future maintainers. Can you please add that in your followup PR?

@a-robinson
Copy link
Contributor

LGTM, just one request that you can add when you change the cloud logging colelctor.

a-robinson added a commit that referenced this pull request Apr 30, 2015
Trim cluster log tags to pod name and container name
@a-robinson a-robinson merged commit 58ede77 into kubernetes:master Apr 30, 2015
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.

None yet

3 participants