Giter Site home page Giter Site logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 16, 2024
Code for this is implemented.

Next task is to go through the grok patterns and add type hints to all the 
values that it makes sense to do so on.

Original comment by [email protected] on 24 Feb 2011 at 8:10

from logstash.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 16, 2024
Also needs tests.

Original comment by [email protected] on 2 Mar 2011 at 1:19

from logstash.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 16, 2024
tests written.

Original comment by [email protected] on 2 Mar 2011 at 1:31

from logstash.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 16, 2024
i tried this, when my pattern defined as:
input {
  file {
    type => "tyler-syslog"
    path => [ "/var/log/messages*"]
  }
}

filter {
  grok {
    type => "tyler-syslog"
    pattern => "\w{3} \d{2} \d{2}:%{MINUTE:min:int}:"
  }
}
output {
  stdout {
    debug => true
  }
}

And my /var/log/messages contains content as:
Mar 28 01:20:05 MyVM ntpd[2262]: time reset -15.714794 s

However the result comes out as:
{"@source"=>"file://MyVM/var/log/messages", "@tags"=>[], 
"@fields"=>{"min"=>[20]}, "@timestamp"=>"2013-03-28T01:24:48.314Z", 
"@source_host"=>"MyVM", "@source_path"=>"/var/log/messages", "@message"=>"Mar 
28 01:20:05 MyVM ntpd[2262]: time reset -15.714794 s", "@type"=>"tyler-syslog"}

Referring to the codes: grok.rb, line 362-371:
            if !value.nil? && (!value.empty? rescue true)
            # Store fields as an array unless otherwise instructed with the
            # 'singles' config option
            if !event.fields.include?(key) and @singles
              event.fields[key] = value
            else
              event.fields[key] ||= []
              event.fields[key] << value
            end
          end

Please note that, the output is: "min"=>[20], actually, i thought it should be 
"min"=>["20",20], right? Please correct me if i miss anything.

Original comment by [email protected] on 28 Mar 2013 at 3:19

from logstash.

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.