Git Product home page Git Product logo

kraken-logging-fluentd-daemonset's Introduction

Fluentd DaemonSet

Dependencies for the Fluentd DaemonSet for Kubernetes logging. The docker image for this repo is located at: quay.io/samsung_cnct/fluentd_daemonset. Currently this component reads Docker logs from var/log/containers, filters Kubernetes metadata and writes to a zookeeper/Kafka component.

Bootstrap

kubectl create -f fluentd-daemonset.yaml

Plugins

Kubernetes Metadata Filter

This filter adds the following data into the body of the log.

  • namespace
  • pod id
  • pod name
  • labels
  • host
  • container name
  • docker container id

For more information on the filter or to see a list of configuration options: https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter

Named Logfile Filter for non-standard logfile collection

This filter will add the filename and filepath to the event metadata. Requires setup of shared-logging-directory: https://github.com/samsung-cnct/shared-logging-directory

Monitor Resource Consumption in Container

There is an optional script in the init directory to monitor resource usage for Fluentd running in your cluster. By modifying your Dockerfile the script will pull CPU and memory consumption constantly. To use the script, replace the last line in the Dockerfile with:

CMD ["/start.sh"]

Rebuild your docker image and redeploy the daemonset with new docker image. The script will run, you can stress-test your logging system and when you want to examine the data you can pipe the logs from your daemonsets into a file (on your local machine) with:

$ kubectl logs fluentd-daemon-example >> logs.dat

Grep the file for your metrics with:

$ grep "\[metrics\]" <logs.dat> | cut -d" " -f2,3 > <clean.dat>

You will have two columns, CPU & MEM, which you can graph or pinpoint peak usage related to your stress testing.

GNUPLOT is an easy way to quickly visualize the data. Start GNUPLOT (install if necessary) and run:

gnuplot> plot '<clean.dat>' using 1 with lines for CPU usage gnuplot> plot '<clean.dat>' using 2 with lines for MEM usage

kraken-logging-fluentd-daemonset's People

Contributors

coffeepac avatar davidewatson avatar dstorck avatar leahnp avatar notjames avatar

Watchers

 avatar

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.