Comments (3)
Hi. Thanks for the positive feedback.
The configuration in the article presents a multi-line annotation on the pods, but you can extend the configuration to each of the type of log you want, for example you can have log4j, JSON and default logging attributes on your pods. At my workplace we have opted for only multi-line or not, where the multi-line pattern matches common Java logging frameworks. There are some who use JSON which is simply "not multi-line" where each log statement must be a single line of JSON Do note that all containers within the Pod must be logging in the same format, if you want to extend on a container basis, then the solution is more complex (but doable).
How I see it a dynamic regex is not possible with the current "concat" plugin in fluentd, as the regex is complied at configuration time. You'd need to find another plugin or roll a fork of concat for yourself.
Hope it answers your question for going forward.
BR,
Søren
from fluentd-k8s.
we are creating a centralize logging system, where multiple microservices belonging to different projects co-exist with each project having their own logging patterns. What we are trying to do is, pass annotations for regex on the pod, and somehow concatenate multiple lines based on regex that we receive from Kubernetes_metadata, we are having 1 container per pod, some services have a proxy sidecar, but those can be ignored.
One idea is to parse multiline logs in a json and forward as-is via fluentD, which i support, but that will require efforts from the dev team.
Please suggest any other ideas.
I am relatively new to working with FluentD.
from fluentd-k8s.
As mentioned, the regex is not dynamic in the "concat" module. You'd have to roll your own concat fork where it is dynamic, then you can evaluate the namespace/pod's regex when multiline splitting.
BR,
Soren
from fluentd-k8s.
Related Issues (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-k8s.