Giter Site home page Giter Site logo

Comments (10)

mirdhyn avatar mirdhyn commented on September 16, 2024 1

PR #12 is introducing filters! I only implemented add_field for now but more are coming!

from gogstash.

tsaikd avatar tsaikd commented on September 16, 2024

I'm not sure what kind of filter is necessary when collecting log.
In my use case, ENV variable in output module is satisfied for me.
If you need to preprocess log, you can output to redis and intergrate with logstash.
And this project is welcome for PR.
No rule yet. I will review all PR.

from gogstash.

cleesmith avatar cleesmith commented on September 16, 2024

This is a typical Logstash filter used for syslogs (mostly for the geolocation of an IP address):

filter {
      date {
        match => [ "timestamp", "ISO8601" ]
        target => "@timestamp"
      }

      if [client_ip] {
        geoip {
         source => "client_ip"
         add_tag => [ "geoip" ]
        }
      }

      if [timestamp] {
        ruby { code => "event['log_timestamp'] = event['@timestamp'].strftime('%Y-%m-%d')"}
      }
    }
  }
}

I thought gogstash was a replacement for Logstash?
Thanks.

from gogstash.

tsaikd avatar tsaikd commented on September 16, 2024

It's hard to implement all logstash filters.
I will assess the geoip filter.

I hope gogstash can replace logstash :)
But it's easier to only ship log.

from gogstash.

cleesmith avatar cleesmith commented on September 16, 2024

Understood, after all, Logstash has been around for many years.
There's also Filebeat for shipping logs in Go.
I recently created a new beat for shipping Snort/Suricata's alert+event+packet logs.
Elastic Beats are very new, but it is easy to create new ones using libbeat.

from gogstash.

vjeantet avatar vjeantet commented on September 16, 2024

Hello

I wrote some basic logstash filters you may find there : https://github.com/veino/processors

from gogstash.

tsaikd avatar tsaikd commented on September 16, 2024

seems no document? 😕

from gogstash.

vjeantet avatar vjeantet commented on September 16, 2024

Hello @tsaikd, no documents as of today, i plan to document them on the coming weeks.

I put a link here to give inspiration and share my work. :)

I implemented a logstash clone with theses filters you may find here : https://github.com/vjeantet/logstack

I think the 2 projects could try to share the same "processors"/plugins what do you think ?

from gogstash.

tsaikd avatar tsaikd commented on September 16, 2024

It looks like using the logstash config format?
Good idea, hope to see more documents and example.

from gogstash.

tsaikd avatar tsaikd commented on September 16, 2024

some filters implemented, e.g. https://github.com/tsaikd/gogstash/tree/master/filter
check README for more information.

from gogstash.

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.