# How to create a file link for input file path using logstash filter or any other means to show up the input file as a link of the file in kibana?

**URL:** <https://discuss.elastic.co/t/how-to-create-a-file-link-for-input-file-path-using-logstash-filter-or-any-other-means-to-show-up-the-input-file-as-a-link-of-the-file-in-kibana/92871>\
**Category:** Logstash\
**Created:** [July 12, 2017, 7:37pm UTC](https://discuss.elastic.co/t/how-to-create-a-file-link-for-input-file-path-using-logstash-filter-or-any-other-means-to-show-up-the-input-file-as-a-link-of-the-file-in-kibana/92871 "2017-07-12T19:37:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hara\_acharya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hara_acharya/32/19864_2.png) [@hara\_acharya](https://discuss.elastic.co/u/hara_acharya)\
**Post date:** [July 12, 2017, 7:37pm UTC](https://discuss.elastic.co/t/how-to-create-a-file-link-for-input-file-path-using-logstash-filter-or-any-other-means-to-show-up-the-input-file-as-a-link-of-the-file-in-kibana/92871/1 "2017-07-12T19:37:04Z")

</div>

Hi,  
I have a logstash filter as below.  
input {  
file {  
path =\> "/home/testserver/Downloads/log\_source/logs/\*/\*\*"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
type =\> "test-logs"  
}  
}

filter  
{  
if [type] == "kernel-logs" {  
grok {  
match =\> {"message" =\> "%{TIMESTAMP\_ISO8601: timestamp} %{LOGLEVEL:severity} %{DATA:logtype} (?:[%{DATA:syslog\_pid}])? %{GREEDYDATA: kernel\_log}"}  
}  
date {  
match =\> ["timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]  
}

}  
}

output {  
if [severity] == "ERR" {  
stdout {  
codec =\> "rubydebug"  
}  
}

}

In my Kibana dashboard, I am getting only the err logs and it works fine.  
In kibana dashboard the message comes as below.  
"{  
"severity" =\> "ERR",  
"path" =\> "/home/testserver/Downloads/log\_source/logs/sys-1/messages.6",  
"logtype" =\> "kernel:",  
"@timestamp" =\> 2017-07-10T23:59:44.437Z,  
"syslog\_pid" =\> "100812.570395",  
"@version" =\> "1",  
"host" =\> "testserver1",  
"message" =\> "2017-06-29T16:27:48.401397-07:00 ERR kernel: [100812.570395] i2c\_designware i2c\_designware.2 (7bit mode)",  
"type" =\> "kernel-logs"  
}  
"  
What I am trying to do is: the "path" should be displayed as a file:// link or a ftp link instead of "/home/testserver/Downloads/log\_source/logs/sys-1/messages.6" so that users can click on it in kibana dashboard and view it in their browser.  
Is there any way I can achieve this ?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 12, 2017, 7:40pm UTC](https://discuss.elastic.co/t/how-to-create-a-file-link-for-input-file-path-using-logstash-filter-or-any-other-means-to-show-up-the-input-file-as-a-link-of-the-file-in-kibana/92871/2 "2017-07-12T19:40:02Z")

</div>

Solve this in Kibana by configuring the field formatter of the `path` field.

[https://www.elastic.co/guide/en/kibana/current/field-formatters-string.html](https://www.elastic.co/guide/en/kibana/current/field-formatters-string.html)

---

<div class="post-metadata">

**Author:** ![hara\_acharya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hara_acharya/32/19864_2.png) [@hara\_acharya](https://discuss.elastic.co/u/hara_acharya)\
**Post date:** [July 12, 2017, 10:14pm UTC](https://discuss.elastic.co/t/how-to-create-a-file-link-for-input-file-path-using-logstash-filter-or-any-other-means-to-show-up-the-input-file-as-a-link-of-the-file-in-kibana/92871/3 "2017-07-12T22:14:25Z")

</div>

Hi Magnus,  
Thanks a lot.  
I am able to configure the field in kibana field formatter.

Regards  
Hara Acharya

---

<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:** [August 9, 2017, 10:14pm UTC](https://discuss.elastic.co/t/how-to-create-a-file-link-for-input-file-path-using-logstash-filter-or-any-other-means-to-show-up-the-input-file-as-a-link-of-the-file-in-kibana/92871/4 "2017-08-09T22:14:32Z")

</div>

Closed on August 9, 2017, 10:14pm UTC

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