# Grok parse failure

**URL:** https://discuss.elastic.co/t/grok-parse-failure/245124
**Category:** Logstash
**Created:** [August 16, 2020, 7:04am UTC](https://discuss.elastic.co/t/grok-parse-failure/245124 "2020-08-16T07:04:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jclemons7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jclemons7/32/20655_2.png) [@jclemons7](https://discuss.elastic.co/u/jclemons7)
#### Post date: [August 16, 2020, 7:04am UTC](https://discuss.elastic.co/t/grok-parse-failure/245124/1 "2020-08-16T07:04:55Z")

</div>

Hello,

I have the following log from snort (from PFSense)

`roku [classification: misc activity] [priority: 3] {tcp} 10.0.2.11:37183 -> 151.101.65.190:80`

I've created the following GROK pattern, which works fine in the grok debuggers online and in kibana developer tools with the log.

`%{DATA:description} \[classification: %{DATA:classification}\] \[priority: %{DATA:alert_priority}\] \{%{DATA:protocol}\} %{DATA:source_ip}:%{DATA:source_port} -> %{DATA:destination_ip}:%{GREEDYDATA:destination_port}`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/a/0ad179bed80da3c3b359aa7d97c01bb68e367d7c.png)

When I run the pattern in Logstash, I get a \_grokparsefailure.

Here is my logstash conf file.

```
filter 
{
	if [log_type] == "snort" 
	{	
		grok
		{
			match => { "message" => "\[%{DATA:uuid}:%{DATA:reference}:%{DATA:version}\] %{GREEDYDATA:message}" }
			overwrite => ["message"]
		}

		if [uuid] == "1" 
		{
			grok 
			{
				match => { "message" => "%{DATA:description} \[classification: %{DATA:classification}\] \[priority: %{DATA:alert_priority}\] \{%{DATA:protocol}\} %{DATA:source_ip}:%{DATA:source_port} -> %{DATA:destination_ip}:%{GREEDYDATA:destination_port}" }
			}
			
			mutate 
			{ 
				add_field => {link => "https://www.snorts.org/rule_docs/%{uuid}-%{reference}"}
			}	
		}
	}
}
```

---

<div class="post-metadata">

### Author: ![jclemons7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jclemons7/32/20655_2.png) [@jclemons7](https://discuss.elastic.co/u/jclemons7)
#### Post date: [August 16, 2020, 8:00am UTC](https://discuss.elastic.co/t/grok-parse-failure/245124/2 "2020-08-16T08:00:59Z")

</div>

Turns out.. my fields had capital letters in it.. and a transform downstream made it look like it was all lower case.

---

<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: [September 13, 2020, 8:01am UTC](https://discuss.elastic.co/t/grok-parse-failure/245124/3 "2020-09-13T08:01:01Z")

</div>

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