# Howto locate Logstash variables in Elasticsearch and Kibana

**URL:** <https://discuss.elastic.co/t/howto-locate-logstash-variables-in-elasticsearch-and-kibana/200957>\
**Category:** Elasticsearch\
**Created:** [September 25, 2019, 5:01am UTC](https://discuss.elastic.co/t/howto-locate-logstash-variables-in-elasticsearch-and-kibana/200957 "2019-09-25T05:01:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamad.faisel](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mohamad.faisel](https://discuss.elastic.co/u/mohamad.faisel)\
**Post date:** [September 25, 2019, 5:01am UTC](https://discuss.elastic.co/t/howto-locate-logstash-variables-in-elasticsearch-and-kibana/200957/1 "2019-09-25T05:01:36Z")

</div>

Hi,

I have the following logstash config for filterlog stored in 'conf' subdirectory inside my home directory

--- Begin ~/conf/filterlog.conf ---  
input {  
file{  
path =\> "/var/log/10.9.8.1/filterlog.log"  
start\_position =\> "beginning"  
}  
}

filter {  
if [fileset][module] == "system" {  
if [fileset][name] == "filterlog" {  
grok {  
match =\> {  
"message" =\>"%{TIMESTAMP\_ISO8601:pf\_date} %{WORD:pf\_hostname} %{WORD:pf\_service}: %{POSINT:pf\_rule},%{POSINT:pf\_subrule}?,%{DATA:pf\_anchor}?,%{POSINT:pf\_trackerid}?,%{WORD:pf\_ifc},%{WORD:pf\_reason},%{WORD:pf\_action},%{WORD:pf\_direction},%{POSINT:pf\_ip\_version},%{WORD:pf\_tos}?,%{WORD:pf\_ecn}?,%{POSINT:pf\_ttl}?,%{POSINT:pf\_id}?,%{POSINT:pf\_offset}?%{GREEDYDATA:pf\_csvdata}"  
}  
}  
date {  
match =\> ["pf\_date", "ISO8601"]  
target =\> "event\_timestamp"  
}  
}  
}  
}

output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index=\> "%{[@metadata][beat]}-%{[@metadata][version]}-%{+yyyy.MM.dd}-filterlog"  
manage\_template =\> false  
}  
stdout{  
codec =\> rubydebug  
}  
}  
--- End ~/conf/filterlog.conf ---

I could see all the pf\_\* variables from CLI using this command:  
sudo -u logstash /usr/share/logstash/bin/logstash --debug --path.settings logstash ~/conf/

How do I check those variables in Elasticsearch & Kibana ?

Thank you.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 25, 2019, 11:53am UTC](https://discuss.elastic.co/t/howto-locate-logstash-variables-in-elasticsearch-and-kibana/200957/2 "2019-09-25T11:53:33Z")

</div>

I am not sure I understand the question. The defined variables in the grok filter will be fields in the document that is indexed into kibana. Is this what you are after?

---

<div class="post-metadata">

**Author:** ![mohamad.faisel](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mohamad.faisel](https://discuss.elastic.co/u/mohamad.faisel)\
**Post date:** [September 26, 2019, 3:52am UTC](https://discuss.elastic.co/t/howto-locate-logstash-variables-in-elasticsearch-and-kibana/200957/3 "2019-09-26T03:52:50Z")

</div>

Thank you. I have found a better sampel in freecodecamp to better undestand how the logstash filter works.

Thank you for your prompt response.

---

<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:** [October 24, 2019, 3:53am UTC](https://discuss.elastic.co/t/howto-locate-logstash-variables-in-elasticsearch-and-kibana/200957/4 "2019-10-24T03:53:25Z")

</div>

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