Comments (6)
麻烦先仅配置jsonDecode,然后配置dev sink,打印一下输出看下
from loggie.
麻烦先仅配置jsonDecode,然后配置dev sink,打印一下输出看下
好的,在loggie pod看到日志如下:
{"level":"info","time":"2022-03-22T02:35:43Z","caller":"/go/src/loggie.io/loggie/pkg/sink/dev/sink.go:98","message":"event: {"fields":{"app":"nginx","containername":"nginx","logconfig":"nginx","namespace":"default","nodename":"10.10.20.8","podname":"nginx-6799fc88d8-td4sc","topic":"nginx-access"},"body":"{"log":"10.2.2.0 - - [22/Mar/2022:02:35:41 +0000] \"GET / HTTP/1.1\" 200 615 \"-\" \"curl/7.29.0\" \"-\"\n","stream":"stdout","time":"2022-03-22T02:35:41.641575846Z"}"}"}
from loggie.
我有点怀疑你的容器里实际的interceptors配置没有生效,麻烦进到loggie容器里看下:
cat /opt/loggie/pipelines/kube-loggie.yml
现在修改interceptor cr,是不会直接触发被引用的logConfig重新渲染配置,这个后面考虑会优化一下
from loggie.
我有点怀疑你的容器里实际的interceptors配置没有生效,麻烦进到loggie容器里看下:
cat /opt/loggie/pipelines/kube-loggie.yml
现在修改interceptor cr,是不会直接触发被引用的logConfig重新渲染配置,这个后面考虑会优化一下
/opt/loggie/pipeline # cat kube-loggie.yml
pipelines:
- name: default/nginx
sources:- fields:
app: nginx
containername: nginx
logconfig: nginx
namespace: default
nodename: 10.10.20.8
podname: nginx-6799fc88d8-td4sc
topic: nginx-access
name: nginx-6799fc88d8-td4sc/nginx/mylog
paths:- /var/lib/docker/containers/a56d54a98e79a4e59e0b7c78e321c29d6436195d616d48facf20b562efd165d1/a56d54a98e79a4e59e0b7c78e321c29d6436195d616d48facf20b562efd165d1-json.log
type: file
sink:
printEvents: true
type: dev
- /var/lib/docker/containers/a56d54a98e79a4e59e0b7c78e321c29d6436195d616d48facf20b562efd165d1/a56d54a98e79a4e59e0b7c78e321c29d6436195d616d48facf20b562efd165d1-json.log
- fields:
配置interceptor 之后,有delete loggie pod,因为之前发现修改logconfig后也有配置不生效的情况。 现在如何触发重新渲染配置呢?
from loggie.
应该是interceptorRef,这个我们在文档里确实有的地方写成interceptorsRef,多写了一个s,我们修改一下文档,算是文档bug。
from loggie.
应该是interceptorRef,这个我们在文档里确实有的地方写成interceptorsRef,多写了一个s,我们修改一下文档,算是文档bug。
测试OK,tks
from loggie.
Related Issues (20)
- windows版本的 可执行文件
- logconfig 在节点不更新
- Loggie传输到ES的时候支持配置别名么? HOT 1
- encoding
- 应用pod重启后,loggie无法采集 HOT 2
- source file stop failed HOT 1
- 关于日志告警的问题 HOT 3
- go test -race检测到DATA RACE
- branch main pkg/source/file/watch.go:321, your have drop the function of Pre-allocation offset
- 可以支持采集非 K8S 容器的 stdout 日志吗? HOT 1
- 老版本k8s 创建crd失败
- [Critical] HOW TO PARSE JSON LOGS USING LOGGIE HOT 2
- Regex in transformer lost key body and him value
- ack fail: “append state exist”
- Loggie, version 1.4.0, collected using the hostpath method. When the target container has multiple mounting addresses with the same prefix, only the first path is matched based on the prefix
- Use Sink's file to save log!
- retry interceptor goroutine blocking
- dropEvent not commit offset
- 支持日志解析,解析出来的字段可以并转换为数组
- windows日志采集扫描不到path
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 loggie.