# Multiples field does not work

**URL:** <https://discuss.elastic.co/t/multiples-field-does-not-work/155400>\
**Category:** Logstash\
**Created:** [November 5, 2018, 1:01pm UTC](https://discuss.elastic.co/t/multiples-field-does-not-work/155400 "2018-11-05T13:01:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edoliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edoliveira/32/37213_2.png) [@edoliveira](https://discuss.elastic.co/u/edoliveira)\
**Post date:** [November 5, 2018, 1:01pm UTC](https://discuss.elastic.co/t/multiples-field-does-not-work/155400/1 "2018-11-05T13:01:54Z")

</div>

I send this log to logstash:

> 2018/10/29 16:51:14 [info] 4344#4344: \*556825 ModSecurity: Warning. Matched "Operator `Within' with parameter `.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .ln (138 characters omitted)' against variable `TX:EXTENSION' (Value: `.axd/' ) [file "/etc/nginx/modsecurity/rules/cdv.wizsolucoes.com.br\_rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "971"] [id "920440"] [rev "2"] [msg "URL file extension is restricted by policy"] [data ".axd"] [severity "2"] [ver "OWASP\_CRS/3.0.0"] [maturity "9"] [accuracy "9"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "OWASP\_CRS/POLICY/EXT\_RESTRICTED"] [tag "WASCTC/WASC-15"] [tag "OWASP\_TOP\_10/A7"] [tag "PCI/6.5.10"] [hostname "xxx.xxx.xxx.xxx"] [uri "/ScriptResource.axd"] [unique\_id "154084267418.097349"] [ref "o14,4o15,3v5,18t:urlDecodeUni,t:lowercaseo20,5"], client: xxx.xxx.xxx.xxx, server: xxx.xxxxxxxxx.com.br, request: "GET /ScriptResource.axd?d=dwY9oWetJoJoVpgL6Zq8ODw7afgDt54n3kNVwHOiwtw9HhA7PJaHLnZgRz32x1ZQ0Gi0WfZkOjQ3zpPtnCItXCiNeGVJt8pRCK8lkYpJkpNmeySNREN7YN6FadoitjJ\_Q7Bcy0l86Mva-nlVLr0ixE1RHvr8VTzbPPvFP3q6m1w1&t=ffffffffad4b7194 HTTP/1.1", host: "xxx.xxxxxxxxx.com.br", referrer: "[http://xxx.xxxxxxxxx.com.br/mensagem.aspx?Mensagem=5&CR=037624](http://xxx.xxxxxxxxx.com.br/mensagem.aspx?Mensagem=5&CR=037624)"

And create this patterns:

> NGINX\_URL referrer:\s(.+?)(",|$)  
> NGINX\_SEVERITY severity\s"(.+?)("]|$)  
> NGINX\_STATUS ModSecurity:\s(.+?)(.|$)  
> NGINX\_REMOTE\_ADDR client:\s(.+?)(,|$)  
> NGINX\_MODSECURITY %{NGINX\_STATUS:status}" ,"%{NGINX\_SEVERITY:severity}" , "%{NGINX\_REMOTE\_ADDR:client}" , "%{NGINX\_URL:url}"

My logstash conf is this:

> input {  
> beats {  
> port =\> 5400  
> congestion\_threshold =\> "40"  
> }  
> }
> 
> filter {  
> grok {  
> patterns\_dir =\> ["/etc/logstash/patterns/"]  
> match =\> { "message" =\> ["%{NGINX\_STATUS:status}", "%{NGINX\_SEVERITY:severity}", "%{NGINX\_REMOTE\_ADDR:client}", "%{NGINX\_URL:url}"] }  
> overwrite =\> ["message"]  
> }  
> mutate {  
> add\_field =\> {"status" =\> "%{NGINX\_STATUS}"}  
> add\_field =\> {"severity" =\> "%{NGINX\_SEVERITY}"}  
> add\_field =\> {"client" =\> "%{NGINX\_REMOTE\_ADDR}"}  
> gsub =\> ["url", "referrer: ", ""]  
> gsub =\> ["client", "client: ", ""]  
> convert =\> ["response", "integer"]  
> convert =\> ["bytes", "integer"]  
> convert =\> ["responsetime", "float"]  
> }  
> geoip {  
> source =\> "clientip"  
> target =\> "geoip"  
> add\_tag =\> ["nginx-geoip"]  
> }  
> date {  
> match =\> ["timestamp" , "dd/MMM/YYYY:HH:mm:ss Z"]  
> remove\_field =\> ["timestamp"]  
> }  
> useragent {  
> source =\> "agent"  
> }  
> }
> 
> output {  
> elasticsearch {  
> hosts =\> localhost  
> index =\> "weblogs2-%{+YYYY.MM.dd}"  
> document\_type =\> "nginx\_logs"  
> }  
> stdout { codec =\> rubydebug }  
> }

But I do not create all the fields that I put into the grok ("% {NGINX\_STATUS: status}", "% {NGINX\_SEVERITY: severity}", "% {NGINX\_REMOTE\_ADDR: client}", "% {NGINX\_URL: url}").  
Only the first appears.  
If I change the first filed of %{NGINX\_STATUS: status} to % NGINX\_URL: url} in Kibana the value of %{NGINX\_URL: url} appears and not the others.

What do I have to do to display all the fields?

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [November 6, 2018, 11:58am UTC](https://discuss.elastic.co/t/multiples-field-does-not-work/155400/2 "2018-11-06T11:58:55Z")

</div>

You may be looking for the Grok Filter Plugin's [`break_on_match => false`](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html#plugins-filters-grok-break_on_match) directive.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 4, 2018, 11:58am UTC](https://discuss.elastic.co/t/multiples-field-does-not-work/155400/3 "2018-12-04T11:58:56Z")

</div>

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