Code Monkey home page Code Monkey logo

fluent-bit-lua-splunk's Introduction

fluent-bit-lua-splunk

This script will help to map dynamic index to the events in fluent Bit using Lua

The sample function can be called as filter in FluentBit

            [FILTER]
                Name      lua
                Match     kube.*
                script rename_index.lua
                Protected_mode true
                call index_map

This will create a sample payload like below:-

[11183] kube.var.log.containers.fluent-bit-cbn2p_logging_fluent-bit-d151bbaeb9825e25b397ffb48dd532563767ff654ea755f3346c3542b14847ec.log: [1604829094.828177427, {"event"=>{"log"=>"", "cluster_id"=>"dev-mls01", "stream"=>"stdout", "time"=>"2020-11-08T09:51:31.86148052Z", "kubernetes"=>{"pod_name"=>"fluent-bit-cbn2p", "labels"=>{"app"=>"mls-fluentbit"}, "namespace_name"=>"logging", "container_image"=>"/fluent/fluent-bit:1.6.0", "container_name"=>"fluent-bit", "host"=>"istio2-vmss00000l"}}, "index"=>"dummy_logging", "sourcetype"=>"_json"}] ", "cluster_id"=>"dev-mls01", "stream"=>"stdout", "time"=>"2020-11-08T09:51:34.828177427Z", "kubernetes"=>{"pod_name"=>"fluent-bit-cbn2p", "labels"=>{"app"=>"mls-fluentbit"}, "namespace_name"=>"logging", "container_image"=>"fluent/fluent-bit:1.6.0", "container_name"=>"fluent-bit", "host"=>"istio2-vmss00000l"}}, "index"=>"dummy_logging", "sourcetype"=>"_json"}]

delete labels will be used to delete the selected labels from the logs.

fluent-bit-lua-splunk's People

Contributors

akshaydubey29 avatar

Stargazers

 avatar

Watchers

 avatar  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.