Giter Site home page Giter Site logo

telegraf-bug-9129's Introduction

How to build this image

docker build -t local/bug-telegraf .

Test the error

First build the image.

Then, run it and wait for it to finish. No input data will be gathered:

$ docker run --rm local/bug-telegraf
2021-04-14T10:00:45Z I! Starting Telegraf 1.18.1
2021-04-14T10:00:45Z D! [agent] Initializing plugins
2021-04-14T10:00:45Z D! [agent] Starting service inputs
2021-04-14T10:00:55Z D! [agent] Stopping service inputs
2021-04-14T10:00:55Z D! [agent] Input channel closed
2021-04-14T10:00:55Z D! [agent] Stopped Successfully

If you run it as root the data will be gathered

$ docker run --rm -u root local/bug-telegraf
2021-04-14T10:01:20Z I! Starting Telegraf 1.18.1
2021-04-14T10:01:20Z D! [agent] Initializing plugins
2021-04-14T10:01:20Z D! [agent] Starting service inputs
2021-04-14T10:01:20Z D! [inputs.tail] Tail added for "/var/log/apache2/error_log"
> example,host=3ad8cb8da05c,path=/var/log/apache2/error_log,result=ok value=1i 1618394480887032445
> example,host=3ad8cb8da05c,path=/var/log/apache2/error_log,result=ok value=2i 1618394480887041009
> example,host=3ad8cb8da05c,path=/var/log/apache2/error_log,result=ok value=3i 1618394480887049527
> example,host=3ad8cb8da05c,path=/var/log/apache2/error_log,result=error value=3i 1618394480887053096
2021-04-14T10:01:30Z D! [agent] Stopping service inputs
2021-04-14T10:01:30Z D! [inputs.tail] Tail removed for "/var/log/apache2/error_log"
2021-04-14T10:01:30Z D! [agent] Input channel closed
2021-04-14T10:01:30Z D! [agent] Stopped Successfully

How to diagnose the container

If you need to drop to a container inside the shell you can:

# As "telegraf" user
docker run -it --rm --entrypoint bash local/bug-telegraf

# As "root" user
docker run -it --rm --entrypoint bash -u root local/bug-telegraf

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.