# GROK ASA Issues

**URL:** <https://discuss.elastic.co/t/grok-asa-issues/208914>\
**Category:** Logstash\
**Created:** [November 21, 2019, 3:01pm UTC](https://discuss.elastic.co/t/grok-asa-issues/208914 "2019-11-21T15:01:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JPetrucka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpetrucka/32/58108_2.png) [@JPetrucka](https://discuss.elastic.co/u/JPetrucka)\
**Post date:** [November 21, 2019, 3:01pm UTC](https://discuss.elastic.co/t/grok-asa-issues/208914/1 "2019-11-21T15:01:37Z")

</div>

Hey everyone,  
I am a logstash/grok beginner and would love some help parsing my syslog from our ASA to create some tags. I have tried both the grok debugger on herokuapp and the dev tools in Kibana without luck. My syslog is:

%ASA-6-106100: access-list 100 denied udp outside/x.x.x.x(4500) -\> inside/x.x.x.x(4500) hit-cnt 1 first hit [0x40c998bc, 0x00000000]

The custom file we are inputting is:

filter {  
if [type] == "firewall" {  
grok {  
match =\> ["message", "%{CISCO\_TAGGED\_SYSLOG} %{GREEDYDATA:cisco\_message}"]  
}

```
  syslog_pri { }

```

}  
}

We are receiving a \_grokparsefailure using this as a base as well as adding:

```
 grok {
    match => ["cisco_message", "%{CISCOFW106100}"]
  }

```

Our hope is to have the following tags:  
device\_src: ASA-6-106100  
Action: access-list 100 denied udp  
OutsideIP:x.x.x.x(Outside IP)  
OutsidePort:4500  
InternalIP: x.x.x.x (Internal IP)  
InternalPort:4500  
HitCount: 1

Any and all help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 21, 2019, 4:27pm UTC](https://discuss.elastic.co/t/grok-asa-issues/208914/2 "2019-11-21T16:27:22Z")

</div>

```
input { generator { count => 1 lines => ['%ASA-6-106100: access-list 100 denied udp outside/1.2.3.4(4500) -> inside/1.2.3.4(4500) hit-cnt 1 first hit [0x40c998bc, 0x00000000]' ] } }
filter {
    grok { match => { "message" => "%{CISCOFW106100}" } }
}

```

produces

```
"dst_interface" => "inside",
    "hit_count" => "1",
    "hashcode1" => "0x40c998bc",
     "src_port" => "4500",
    "policy_id" => "100",
    "hashcode2" => "0x00000000",
     "protocol" => "udp",
     "dst_port" => "4500",
       "action" => "denied",
"src_interface" => "outside",
     "interval" => "first hit",
       "dst_ip" => "1.2.3.4",
       "src_ip" => "1.2.3.4"

```

for me. You do not say what the incoming event looks like so I cannot speak to why the first grok might be failing.

---

<div class="post-metadata">

**Author:** ![JPetrucka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpetrucka/32/58108_2.png) [@JPetrucka](https://discuss.elastic.co/u/JPetrucka)\
**Post date:** [November 21, 2019, 6:55pm UTC](https://discuss.elastic.co/t/grok-asa-issues/208914/4 "2019-11-21T18:55:17Z")

</div>

Thank you so much! That populated the fields perfectly!

---

<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 19, 2019, 6:55pm UTC](https://discuss.elastic.co/t/grok-asa-issues/208914/5 "2019-12-19T18:55:19Z")

</div>

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