Comments (7)
@sami9gag I'm not certain what you are eluding to here; that is the point of this plugin. It adds pod metadata to a log entry that is specific to the pod.
from fluent-plugin-kubernetes_metadata_filter.
@jcantrill Hmm.. maybe my explanation wasn't quite clear. In the current form the plugin takes the log name and parses the source pod from the log name. Then it fetches the pod metadata for that pod and adds it to the log entry.
What I'm suggesting is a feature that always takes the current pod (the pod that is running fluentd) and adds that information to the log entry.
from fluent-plugin-kubernetes_metadata_filter.
@sami9gag that seems useful if you have multiple fluentd instances deployed assigning each to some 'application' The way this plugin is used, at least in OpenShift, is to deploy one fluentd instance per node and it is responsible for all the container logs on that node. This keeps users needing to know anything about the logging infrastructure.
from fluent-plugin-kubernetes_metadata_filter.
@jcantrill Right and that is what we are doing for the most parts as well. But there are certain legacy applications that can't really handle writing to stdout/stderr for docker to capture the output. Instead we have to resort to a set of tricks to capture the logs, but that also means that we lose all context from the logs.
from fluent-plugin-kubernetes_metadata_filter.
To try and help get some traction on this, would it be possible to add your syslog as a source, like the container logs are defined?
You could then tag it kubernetes.* and the filter would catch it?
from fluent-plugin-kubernetes_metadata_filter.
That's a good idea, but in practice it's not really a viable option.
Input in that example is actually JSON formatted and contains some fields that the parser depends on. In my case I'm in practice using Log4J to pass the data to fluentd, so in order to add the required fields I would need to modify the log4j component to do a query to kubernetes master and then pass the data to fluentd.
With that it would actually make more sense to add the parsing to log4j and pass the data directly to our central fluentd bypassing the sidecar fluentd instance completely. But that would solve just one of our use cases.
The reason why it works with the current rule, is that the logger that is writing the log already has all the information and can simply write it to the logfile. If there is an easy way of getting the information from within a pod without talking to the master, then we might be able to use a generic passthrough process that adds the information (without that much additional overhead).
from fluent-plugin-kubernetes_metadata_filter.
not sure, but I believe this use case is supported in current versions of the plugin
from fluent-plugin-kubernetes_metadata_filter.
Related Issues (20)
- Remove deprecated journal functionality
- Optimize cache to use event time
- Stop marshaling and unmarshaling meta
- fix dumping of stats and allow configuration to disable it
- [info]: [filter_kube_metadata] Exception encountered parsing namespace watch event. The connection might have been closed. Sleeping for 1 seconds and resetting the namespace watcher.error reading from socket: Connection reset by peer HOT 2
- watch_retry_interval & watch_retry_exponential_backoff_base are not documented HOT 1
- is a changelog maintained anywhere? HOT 2
- Failure while installing fluent-plugin-kubernetes_metadata_filter plugin version 2.10.0 HOT 4
- 410 Gone encountered. Restarting pod watch to reset resource versions HOT 7
- gemfile.lock fluentd version in v2.13.0 HOT 2
- Compatibility with Ruby >= 3 ? HOT 1
- Support Fluentd 1.16.0 HOT 1
- How to debug problem if kubernetes_metadata not add any metadata from k8s? HOT 1
- undefined method `get_namespaces' for k8s client HOT 2
- v2.x release with fluentd 1.16.x support HOT 3
- pod-id filled with null bytes HOT 1
- New version of the plugin HOT 1
- can add "Controlled By" field to meta HOT 1
- Elasticsearch k8s labels issue HOT 3
- Logs with exception connection to api server HOT 5
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 fluent-plugin-kubernetes_metadata_filter.