Comments (1)
Hey there,
Sorry for the long delay in responding. This plugin relies on fluent-plugin-kubernetes_metadata_filter to append metadata. It figures out which pod a log line belongs to based on its container name. We can readily get any info associated with a pod.
It's not impossible to go from a pod to a deployment but it might be more api intensive than other metadata requirements:
- Find the pod's replicaset (e.g.
kubectl get pod <pod> -o 'jsonpath={ .metadata.ownerReferences[?(.kind == "ReplicaSet")].name }'
) - Find the replicaset's deployment (
kubectl get rs <rs> -o 'jsonpath={ .metadata.ownerReferences[?(.kind == "Deployment")].name }'
)
I suspect the fluent-plugin-kubernetes_metadata_filter will not be too keen on watching replicasets in addition to pods/namespaces so the PR there to make this optional but off by default might be fairly large/time-consuming.
If you're willing to standardize across your deployments, you can write a label out to your template
and refer to it via %{label:<key>}
:
https://github.com/SumoLogic/fluentd-kubernetes-sumologic#templating-kubernetes-metadata
The labels have the additional benefit of creating conventions of passing down other things you might find useful for inclusion in metadata tags, like the tag portion of the image
.
from fluentd-kubernetes-sumologic.
Related Issues (20)
- Release as an independent GEM HOT 3
- Sourcecategories in Sumo appending numbers HOT 12
- Feature request - Migrating .conf files into configMap
- Kubernetes_meta and Kubernetes_meta_reduce break when condition is met.
- Add ability to control which metadata you want to include/exclude when reducing the metadata
- Memory usage growing constantly
- Duplicate Logs because of Redundant SourceCategories HOT 1
- emit transaction failed: error_class=NoMethodError error="undefined method `+' HOT 4
- fluentd daemonset unable to read log files under OCI OKE
- Sumologic sourceCategory not respecting sumologic.com/sourceCategory annotation HOT 2
- RBAC fluentd daemonset unable to read log files under OCI OKE
- ls: cannot access '/fluentd/etc/fluent.file.conf': No such file or directory HOT 4
- Allow ability to set annotations in the daemonSet in Helm Chart HOT 3
- Windows support HOT 1
- Worker 0 continuously restarts HOT 1
- Question: Can I reduce Kubernetes metadata but leave labels? HOT 1
- support for CRI-O logs HOT 1
- Docker build failing for v2.4.2 HOT 1
- POD metadata is not extracted to sourceName
- Memory consumption grows to max and never goes down HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentd-kubernetes-sumologic.