Hello. I am trying to add a custom field msgid and while the groc and field is working, the result is an array with the value duplicated twice.
Here is an example raw message:
Jan 26 22:58:01 ip-172-31-23-201 mailqueued: [1822bd7c-02e6-11e8-b20a-b566ad59a605] [90] Retry message in 120 minutes (retry: 3 of 30, increment_retry)
And the Logstash groc match:
%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: \[%{UUID:msgid}\] %{GREEDYDATA:syslog_message}
The Logstash field:
add_field => [ "msgid", "%{msgid}" ]
In Elasticsearch it is saving as:
"msgid": [
"1822bd7c-02e6-11e8-b20a-b566ad59a605",
"1822bd7c-02e6-11e8-b20a-b566ad59a605"
]
I want to store as a flat value, no array, and no duplicates. Ideas?