indent preformatted text by 4 spacesI got following error on console when tried to start the logstash.
root@111:/opt/logstash/bin# /opt/logstash/bin/logstash -f /etc/logstash/conf.d/10-syslog-filter.conf --configtest
Error: Expected one of #, => at line 4, column 18 (byte 39) after filter {
grok {
PATHELEM {:level=>:error}
Here is my logstash conf file:
filter {
grok {
PATHELEMindent preformatted text by 4 spaces [^/]+
TASKPATH ^/var/lib/mesos/slave/slaves/%{PATHELEM:agent}/frameworks/%{PATHELEM:framework}/executors/%{PATHELEM:executor}/runs/%{PATHELEM:run}
match => ["file" , "%{TASKPATH}" ]
}
}
grok {
PATHELEMindent preformatted text by 4 spaces [^/]+
TASKPATH ^/var/lib/mesos/slave/slaves/%{PATHELEM:agent}/frameworks/%{PATHELEM:framework}/executors/%{PATHELEM:executor}/runs/%{PATHELEM:run}
match => ["file" , "%{TASKPATH}" ]
}
}
Is this actually what your configuration looks like? You simply can't define new grok patterns inside the grok filter. You have to define them in a separate file.
I crate a separate pattern file under pattern directory and content of this file is :
THELEM [^/]+
TASKPATH ^/var/lib/mesos/slave/slaves/%{PATHELEM:agent}/frameworks/% indent preformatted text by 4 spaces{PATHELEM:framework}/executors/% indent preformatted text by 4 spaces{PATHELEM:executor}/runs/%indent preformatted text by 4 spaces{PATHELEM:run}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.