Comments (4)
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.
Also needs tests.
Original comment by [email protected]
on 2 Mar 2011 at 1:19
from logstash.
tests written.
Original comment by [email protected]
on 2 Mar 2011 at 1:31
from logstash.
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)
- Support watching files with inotify HOT 3
- Show list of agents, event statistics, and status HOT 1
- Histogram should be smart about the interval chosen. HOT 1
- Duplicate metadata when drilling into logs on logstash-web
- JRuby? HOT 3
- Allow dynamic outputs (for sharding/partitioning) HOT 4
- logstashed died after mass file rotation? HOT 1
- support amqp vhosts HOT 1
- jls-grok libffi dependency installs requires version unsupported with Ruby 1.8.x HOT 3
- Grok parsing results in all fields being arrays HOT 5
- Crash in grok (jruby) HOT 1
- Memory usage in jruby under high load HOT 3
- Make 'logstash-bug' tool similar to send-pr or perlbug
- Corrupt data coming out of logstash grok filter HOT 2
- /usr/lib/libgrok.so: undefined symbol: tccmpint32 (LoadError) HOT 5
- Current gem (logstash-0.2.20110331121235) can't parse URI query strings HOT 2
- grok not linking to tokyocabinet HOT 11
- Adding some flexibility into Logstash HOT 2
- Feature Request - Syslog Hostname Resolution HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash.