Giter Site home page Giter Site logo

Comments (6)

ethfoo avatar ethfoo commented on June 7, 2024

麻烦先仅配置jsonDecode,然后配置dev sink,打印一下输出看下

from loggie.

xiaojiayu404 avatar xiaojiayu404 commented on June 7, 2024

麻烦先仅配置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.

ethfoo avatar ethfoo commented on June 7, 2024

我有点怀疑你的容器里实际的interceptors配置没有生效,麻烦进到loggie容器里看下:

cat /opt/loggie/pipelines/kube-loggie.yml

现在修改interceptor cr,是不会直接触发被引用的logConfig重新渲染配置,这个后面考虑会优化一下

from loggie.

xiaojiayu404 avatar xiaojiayu404 commented on June 7, 2024

我有点怀疑你的容器里实际的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

配置interceptor 之后,有delete loggie pod,因为之前发现修改logconfig后也有配置不生效的情况。 现在如何触发重新渲染配置呢?

from loggie.

ethfoo avatar ethfoo commented on June 7, 2024

应该是interceptorRef,这个我们在文档里确实有的地方写成interceptorsRef,多写了一个s,我们修改一下文档,算是文档bug。

from loggie.

xiaojiayu404 avatar xiaojiayu404 commented on June 7, 2024

应该是interceptorRef,这个我们在文档里确实有的地方写成interceptorsRef,多写了一个s,我们修改一下文档,算是文档bug。

测试OK,tks

from loggie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.