Skip to content

Instantly share code, notes, and snippets.

@spuder
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spuder/10318933 to your computer and use it in GitHub Desktop.
Save spuder/10318933 to your computer and use it in GitHub Desktop.
logstash toruqe failure
Error: Expected one of #, => at line 14, column 26 (byte 328) after filter {
grok {
#04/04/2014 18:26:34;0040;PBS_Server.28407;Req;set_nodes;allocating nodes for job 25.interactive.novalocal with node expression 'node02'
match => { "message"
The config file
line 14 is acutally line 26 (match => ..)
input {
#stdin { }
file {
path => "/var/spool/torque/server_logs/2014*"
start_position => beginning
#type => syslog
}
}
filter {
grok {
#04/04/2014 18:26:34;0040;PBS_Server.28407;Req;set_nodes;allocating nodes for job 25.interactive.novalocal with node expression 'node02'
match => { "message","%{DATE_US} %{TIME};%{NUMBER:milliseconds};PBS_Server.%{WORD:mystery};Req;set_nodes;allocating nodes for job %{NUMBER:job_number}.%{WORD:hostname}.%{WORD:domain} with node expression '%{WORD:node_expression}'" }
add_field => [ "test", "%{host}" ]
}
}
output {
#stdout { codec => rubydebug }
elasticsearch {
host => localhost
}
}
@spuder
Copy link
Author

spuder commented Apr 9, 2014

fixed it with the following

grok {
#04/04/2014 18:26:34;0040;PBS_Server.28407;Req;set_nodes;allocating nodes for job 25.interactive.novalocal with node expression 'node02'
match => { "message" => "%{DATE_US} %{TIME};%{NUMBER:milliseconds};PBS_Server.%{WORD:mystery};Req;set_nodes;allocating nodes for job %{NUMBER:job_number}.%{WORD:hostname}.%{WORD:domain} with node expression '%{WORD:node_expression}'" }
add_tag => [ "node_allocation" ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment