Skip to content

Commit

Permalink
Update kubernetes container add log type (#159)
Browse files Browse the repository at this point in the history
* Update kubernetes_container to add log_type and exclude kube system pods

* Update change log for kubernetes_container v0.0.11 changes

Co-authored-by: Eric Holt <[email protected]>
  • Loading branch information
ericwholt and Eric Holt authored Jan 7, 2021
1 parent f1cafc1 commit c64e762
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.0.34] - Unreleased
### Changed
- Update `kubernetes_container` plugin ([PR159](https://github.com/observIQ/stanza-plugins/pull/159))
- Add log_type k8s.container to labels
- Exclude kube* pods
## [0.0.33] - 2021-01-07
### Changed
- Update `nginx` plugin ([PR158](https://github.com/observIQ/stanza-plugins/pull/158))
Expand Down
9 changes: 5 additions & 4 deletions plugins/kubernetes_container.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.0.10
version: 0.0.11
title: Kubernetes Container
id: kubernetes
description: Log parser for Kubernetes
Expand Down Expand Up @@ -47,12 +47,13 @@ pipeline:
include:
- '/var/log/containers/{{ $pod_name }}-*_{{ $container_name }}-*.log'
exclude:
{{ range $index, $element := .exclude }}
- '/var/log/containers/kube*'
# {{ range $index, $element := .exclude }}
- {{ $element }}
{{ end }}

# {{ end }}
start_at: '{{ $start_at }}'
labels:
log_type: 'k8s.container'
plugin_id: '{{ .id }}'
resource:
k8s.node.name: "EXPR(env('NODE_NAME'))"
Expand Down

0 comments on commit c64e762

Please sign in to comment.