# Logstash configtest Failing

**URL:** <https://discuss.elastic.co/t/logstash-configtest-failing/44371>\
**Category:** Logstash\
**Created:** [March 14, 2016, 9:28pm UTC](https://discuss.elastic.co/t/logstash-configtest-failing/44371 "2016-03-14T21:28:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Groos](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@Robert\_Groos](https://discuss.elastic.co/u/Robert_Groos)\
**Post date:** [March 14, 2016, 9:28pm UTC](https://discuss.elastic.co/t/logstash-configtest-failing/44371/1 "2016-03-14T21:28:08Z")

</div>

I have a fairly simple logstash config file. However upon running 'service logstash configtest' i get the following error:  
"  
Error: Expected one of #, -, ", ', } at line 12, column 21 (byte 280) after filter {  
if [type] =~ 'audit' {  
mutate { replace =\> { 'type' =\> 'audit\_policy' } }  
grok { match =\> {  
"

Do i have a simple syntax error or am i doing something wrong?

Logstash Version: "logstash 2.2.2"

Config File:

input {  
beats {  
port =\> 5044  
ssl =\> true  
ssl\_certificate =\> "/etc/pki/tls/certs/filebeat.crt"  
ssl\_key =\> "/etc/pki/tls/private/filebeat.key"  
}  
}  
filter {  
if [type] == 'audit' {  
mutate { replace =\> { 'type' =\> 'audit\_policy' } }  
grok { match =\> { %{COMMONAPACHELOG} } }  
}  
if [type] == 'access' {  
mutate { replace =\> { 'type' =\> 'apache\_access' } }  
grok { match =\> { %{COMMONAPACHELOG} } }  
}  
date { match =\> ['timestamp', 'dd/MMM/yyyy:HH:mm:ss Z'] }  
}  
output {  
if "\_grokparsefailure" not in [tags] {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
sniffing =\> true  
manage\_template =\> false  
index =\> "%{[@metadata][beat]}-%{+YYYY.MM.dd}"  
document\_type =\> "%{[@metadata][type]}"  
}  
}  
}

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 15, 2016, 12:49am UTC](https://discuss.elastic.co/t/logstash-configtest-failing/44371/2 "2016-03-15T00:49:38Z")

</div>

> [@Robert\_Groos](#):
>
> grok { match =\> { %{COMMONAPACHELOG} } }

Should be;

`grok { match => { "%{COMMONAPACHELOG}" } }`

---

<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:** [July 6, 2017, 5:07am UTC](https://discuss.elastic.co/t/logstash-configtest-failing/44371/3 "2017-07-06T05:07:03Z")

</div>


