# Create table from jenkins logs

**URL:** https://discuss.elastic.co/t/create-table-from-jenkins-logs/181587
**Category:** Elasticsearch
**Created:** [May 17, 2019, 11:54am UTC](https://discuss.elastic.co/t/create-table-from-jenkins-logs/181587 "2019-05-17T11:54:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MohanrajBabu](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@MohanrajBabu](https://discuss.elastic.co/u/MohanrajBabu)
#### Post date: [May 17, 2019, 11:54am UTC](https://discuss.elastic.co/t/create-table-from-jenkins-logs/181587/1 "2019-05-17T11:54:51Z")

</div>

Hello Elasticsearch users,

Just starting with elastic search!

I am running a jenkins job in a server that access a network device and print various show commands as logs.

I had gone through the manual and installed filebeat in the server where jenkins installed to collect logs.  
Elastic search, kibana , logstash are installed in another machine. I could able to send the log to elastic search/logstash in second machine.

_My query - is it possible to create a table kind of visualization by reading below logs - filtering the network show commands and print as table in kibana_

Given below the example jenkins log, Highlited part are the ones that needs to be filterd out and display in table format.

Print Router show commands

terminal length 0  
Router-2#

show bgp sum  
BGP router identifier 2.2.2.2, local AS number 1  
BGP table version is 884, main routing table version 884  
10 network entries using 2480 bytes of memory  
13 path entries using 1664 bytes of memory  
4/4 BGP path/bestpath attribute entries using 1056 bytes of memory  
1 BGP AS-PATH entries using 24 bytes of memory  
0 BGP route-map cache entries using 0 bytes of memory  
0 BGP filter-list cache entries using 0 bytes of memory  
BGP using 5224 total bytes of memory  
BGP activity 247/237 prefixes, 463/450 paths, scan interval 60 secs

![some](https://us1.discourse-cdn.com/elastic/original/3X/a/7/a7dad6a1a65cfc9ca2be5ba46b4dfe2e0d6a81f9.png)

Router-2#

show bgp  
BGP table version is 884, local router ID is 2.2.2.2  
Status codes: s suppressed, d damped, h history, \* valid, \> best, i - internal,  
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,  
x best-external, a additional-path, c RIB-compressed,  
t secondary path,  
Origin codes: i - IGP, e - EGP, ? - incomplete  
RPKI validation codes: V valid, I invalid, N Not found

![table1](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b524a8e77d8bd01bca817187748394f9b25e6f9.png)

How this can be achieved in elastic search?

**logstash config:**

input {  
beats {  
port =\> "5044"  
}  
}

output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
}  
stdout { codec =\> rubydebug }  
}

**filebeat config:**  
filebeat.inputs:

- type: log  
enabled: true  
paths:

- type: log  
paths:

output.logstash:  
hosts: ["192.168.43.5:5044"]

Thanks and Regards,  
Mohan

---

<div class="post-metadata">

### Author: ![MohanrajBabu](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@MohanrajBabu](https://discuss.elastic.co/u/MohanrajBabu)
#### Post date: [May 17, 2019, 8:49pm UTC](https://discuss.elastic.co/t/create-table-from-jenkins-logs/181587/2 "2019-05-17T20:49:04Z")

</div>

Hello,

Using below filebeat config and logstash config file, I could able to trim all other unwanted messages and print only the messages that has the keyword Hop in it.

> [@MohanrajBabu](#):
>
> ![table1](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b524a8e77d8bd01bca817187748394f9b25e6f9.png)

**filebeat config**

filebeat.inputs:

- type: log  
enabled: true  
paths:

- type: log  
paths:

output.logstash:  
hosts: ["192.168.43.5:5044"]

**logstash config**  
input {  
beats {  
port =\> 5044  
}  
}

filter {  
if [message] !~ "Hop" {  
drop { }  
}  
}

output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
}  
}

But it is still a formatted string.

Need to form a table with table headers as Network, Next Hop, Metric, LocPrf, Weight, Path and visualize it.

I am stuck in this part. How can it be achieved.

Thank,  
Mohan

---

<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: [June 14, 2019, 8:49pm UTC](https://discuss.elastic.co/t/create-table-from-jenkins-logs/181587/3 "2019-06-14T20:49:06Z")

</div>

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