GithubHelp home page GithubHelp logo

soluto / fluent-plugin-kubernetes-log-level Goto Github PK

View Code? Open in Web Editor NEW
23.0 2.0 0.0 43 KB

Dynamic filtering of kubernetes logs according to pod labels

License: Apache License 2.0

Ruby 100.00%
soluto-open-source

fluent-plugin-kubernetes-log-level's People

Contributors

nataly87s avatar omerlh avatar yaron-idan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fluent-plugin-kubernetes-log-level's Issues

Tracing

  • Log when filtering records
  • Consider logging default value

Set default values for params

config_param :log_level_label, :string, :default => 'logging-level'
config_param :log_level_key, :string, :default => 'level'
config_param :default_logging_level, :string, :default => nil

This configuration should assign default values when the plugin is not assigned values.

Null reference when log record does not contain log_level

When the log record does not contains the expected log_level key, an exception is thrown:

2018-12-10 06:38:03 +0000 [warn]: #0 send an error event to @ERROR: error_class=NoMethodError error="undefined method `downcase' for nil:NilClass" location="/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-kubernetes-log-level-0.2.0/lib/fluent/plugin/filter_kubernetes_log_level.rb:33:in `level_to_num'" tag="<>.log" time=2018-12-10 06:38:02.810530581 +0000
2018-12-10 06:38:02.810530581 +0000 <>.log: {"log":"\n","stream":"stdout","time":"2018-12-10T06:38:02.810530581Z","docker":{"container_id":"d1946ab4a7234a790fc19e6869c7564af79f64add99bef3121b03b0dff0c9a47"},"kubernetes":{"container_name":"<>","namespace_name":"<>","pod_name":"<>","pod_id":"6dca4421-fc45-11e8-a0b5-000d3a596a78","labels":{"app":"<>","logging-level":"debug","logging-level-key":"Level","pod-template-hash":"3870667959","release":"<>"},"host":"<>","master_url":"<>","namespace_id":"e3aa7d6b-fba8-11e8-b28a-000d3a5964d7"},"level":"no_level"}

Plugin version - 0.2.0.
Look like the changes in 0.2.1 solved this issue - level.is_a return 0 for nil objects.

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.