# Fortinet firewall logs in ELK

**URL:** <https://discuss.elastic.co/t/fortinet-firewall-logs-in-elk/213343>\
**Category:** Logstash\
**Created:** [December 30, 2019, 11:58am UTC](https://discuss.elastic.co/t/fortinet-firewall-logs-in-elk/213343 "2019-12-30T11:58:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rguptarg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rguptarg/32/60643_2.png) [@rguptarg](https://discuss.elastic.co/u/rguptarg)\
**Post date:** [December 30, 2019, 11:58am UTC](https://discuss.elastic.co/t/fortinet-firewall-logs-in-elk/213343/1 "2019-12-30T11:58:46Z")

</div>

HI Team,

I am getting logs from Fortinet firewall and config file for this  
input {  
tcp {  
port =\> 5014  
type =\> syslog  
}  
udp {  
port =\> 5014  
type =\> syslog  
}  
}

filter {  
if [type] == "syslog" {  
grok {  
match =\> { "message" =\> "%{SYSLOGTIMESTAMP:syslog\_timestamp} %{SYSLOGHOST:syslog\_hostname} %{DATA:syslog\_program}(?:[%{POSINT:syslog\_pid}])?: %{GREEDYDATA:syslog\_message}" }  
add\_field =\> ["received\_at", "%{[@timestamp](https://github.com/timestamp)}" ]  
add\_field =\> ["received\_from", "%{host}"]  
}  
date {  
match =\> ["syslog\_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]  
}  
}  
}

and full message is coming in "message" field on kibana, but I am looking separate column for all details

full message -  
"\<43\>date=2019-12-24 time=18:58:48 devname=master devid=FG3K0B3I11700430 logid=0101037130 type=event subtype=vpn level=error vd="Eicher\_VPN" logdesc="Progress IPsec phase 2" msg="progress IPsec phase 2" action=negotiate remip=123.63.173.45 locip=125.21.195.51 remport=38308 locport=4500 outintf="Vlan192-Eicher" cookies="7cb0fd762c55cedb/7984875dd4f6d284" user="huawei" group="N/A" xauthuser="N/A" xauthgroup="N/A" assignip=N/A vpntunnel="Eicher\_vpn" status=failure init=remote mode=quick dir=inbound stage=1 role=responder result=ERROR"

Is it possible to separate out all fields in separate column ?  
like -  
devname=master  
devid=FG3K0B3I11700430  
logid=0101037130  
type=event  
and so on

---

<div class="post-metadata">

**Author:** ![Seb\_Coyote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seb_coyote/32/47922_2.png) [@Seb\_Coyote](https://discuss.elastic.co/u/Seb_Coyote)\
**Post date:** [December 30, 2019, 12:06pm UTC](https://discuss.elastic.co/t/fortinet-firewall-logs-in-elk/213343/2 "2019-12-30T12:06:24Z")

</div>

You can add "kv" in your filter :

kv {  
source =\> "message"  
}

---

<div class="post-metadata">

**Author:** ![rguptarg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rguptarg/32/60643_2.png) [@rguptarg](https://discuss.elastic.co/u/rguptarg)\
**Post date:** [December 30, 2019, 1:00pm UTC](https://discuss.elastic.co/t/fortinet-firewall-logs-in-elk/213343/3 "2019-12-30T13:00:27Z")

</div>

Thanks for reply.

My all devices log are coming from 5014 port, so "kv" will impact other logs as well.

---

<div class="post-metadata">

**Author:** ![Seb\_Coyote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seb_coyote/32/47922_2.png) [@Seb\_Coyote](https://discuss.elastic.co/u/Seb_Coyote)\
**Post date:** [December 30, 2019, 1:49pm UTC](https://discuss.elastic.co/t/fortinet-firewall-logs-in-elk/213343/4 "2019-12-30T13:49:34Z")

</div>

Add input port and TAG incoming data like this

input {  
udp {  
port =\> XXXX  
tags =\> Fortigate  
type =\> syslog  
}  
}

After add IF section in your filter :

if "Fortigate" in [tags] {  
...  
}

---

<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:** [January 27, 2020, 1:49pm UTC](https://discuss.elastic.co/t/fortinet-firewall-logs-in-elk/213343/5 "2020-01-27T13:49:35Z")

</div>

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