What does Expected one of #, {, ,, ] mean?

Hi im new to logstash what does this error mean? (version 5.6.8)

Cannot create pipeline {:reason=>"Expected one of #, {, ,, ] at line 33, column 26

input {
file { path => ["/var/log/collectd.logstash.log"]
start_position => beginning
sincedb_path => ["/var/log/collectd/logstash.log"]
}

    udp {
    port => 25828
    buffer_size => 1452
    codec => collectd{ typesdb => ["/usr/share/collectd/types.db"] }

}
}

filter {

    if "_grokparsefailure" in [tags] {
    drop { }

     grok {
            match => { "message" => "%{NUMBER:duration}, %{NUMBER:value}, %{DATA:value}, %{WORD:host}, %{IP:client}"}

    add_field => [ "received_at", "%{@timestamp}" ]

add_field => [ "cpu", "%{NUMBER:cpu}" ]

add_field => [ "received_at", "%{@timestamp}" ]

add_field => [ "received_from", "%{host}" ]

add_field => [ "value", "%{NUMBER:value} %{DATA:value}" ]

    add_field => [ "test", "%{WORD:test} ]

}
}

output {
file { path => [ "/var/log/logstash/logstash2.log" ] }
elasticsearch { hosts => ["localhost:9200"] }

  influxdb {
            use_event_fields_for_data_points => true
            data_points => {}
            host => localhost
            db => collectd
            coerce_values => {"value" => "float"}

}

stdout {
codec => rubydebug }

Thnx in advance
Owusu
}

The error message means that the Logstash configuration file parser found something unexpected at or near line 33. I'm guessing the problem is that missing quote near the end of this line:

add_field => [ "test", "%{WORD:test} ]

Thank you for the response, indeed it was the quotes.
I have another question but will open a new post for that.

Again thank you

Owusu

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.