Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default grok patterns path

I have installed Logstash on Ubuntu Server 14. Where can I find the default grok patterns that Logstash uses when filtering logs ? Thanks.

like image 561
Aymen Chetoui Avatar asked Aug 10 '15 13:08

Aymen Chetoui


3 Answers

I have also installed ELK stack on Ubuntu 14.04. The location of patterns that grok uses is in the following directory

/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-patterns-core-2.0.5/patterns/

which includes the following default patterns

aws                   firewalls             junos                 mongodb               rails
bacula                grok-patterns         linux-syslog          nagios                redis
bro                   haproxy               mcollective           output.txt            ruby
exim                  java                  mcollective-patterns  postgresql            test.sh

Or you can just search for the patterns as follows:

find / -name patterns

This will show you the directory of patterns you are looking for.

like image 149
Himanshu Chauhan Avatar answered Nov 20 '22 09:11

Himanshu Chauhan


From the grok documentation:

Logstash ships with about 120 patterns by default. You can find them here:

https://github.com/logstash-plugins/logstash-patterns-core/tree/master/patterns.

like image 37
dtrv Avatar answered Nov 20 '22 11:11

dtrv


If you know the logstash installation path, say cd /usr/share/logstash/

it is here:

cd /vendor/bundle/jruby/2.3.0/gems/logstash-patterns-core-4.1.2/patterns/

If installed via apt-get, to /usr/share/logstash/ it is here:

/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-patterns-core-4.1.2/patterns/

like image 31
Mohammed Sheriff Avatar answered Nov 20 '22 11:11

Mohammed Sheriff