Dashboards & Visualizations

Display data in a tabular format

sajug
New Member

I am looking for some help in getting the logs formatted in a tabular format

I have these in the logs getting printed every 5 minutes

07-06-19:00:40, eventtype=ping, rsptime=0.190, srvname=srv1, srvip=xxx.xxx.xxx.01
07-06-19:00:40, eventtype=ping, rsptime=0.201, srvname=srv2, srvip=xxx.xxx.xxx.02
07-06-19:00:40, eventtype=ping, rsptime=16.991, srvname=srv3, srvip=xxx.xxx.xxx.03
07-06-19:00:40, eventtype=ping, rsptime=17.000, srvname=srv4, srvip=xxx.xxx.xxx.04

07-06-19:05:40, eventtype=ping, rsptime=0.190, srvname=srv1, srvip=xxx.xxx.xxx.01
07-06-19:00:40, eventtype=ping, rsptime=0.201, srvname=srv2, srvip=xxx.xxx.xxx.02
07-06-19:05:40, eventtype=ping, rsptime=16.991, srvname=srv3, srvip=xxx.xxx.xxx.03
07-06-19:05:40, eventtype=ping, rsptime=17.000, srvname=srv4, srvip=xxx.xxx.xxx.04

I want the above data to presented in the below format

         srv1|srv2|srv3|srv4

07-06-19:00 0.190 | 0.201 | 0.201 | 16.991 | 17.000
07-06-19:05 0.190 | 0.201 | 0.201 | 16.991 | 17.000

First row/column heading is going to be the server name
Rows will print the rsptime

Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

You asked for this:

index=<You Should Always Specify An index> AND sourcetype=<And sourcetpye Too>
| table _time rsptime srvname
| xyseries _time srvname rsptime

But you probably need is something like this:

index=<You Should Always Specify An index> AND sourcetype=<And sourcetpye Too>
| timechart span=15m avg(rsptime) BY srvname

View solution in original post

0 Karma

sajug
New Member

Actually your first query worked for me. Thank you Woodcock

0 Karma

woodcock
Esteemed Legend

You asked for this:

index=<You Should Always Specify An index> AND sourcetype=<And sourcetpye Too>
| table _time rsptime srvname
| xyseries _time srvname rsptime

But you probably need is something like this:

index=<You Should Always Specify An index> AND sourcetype=<And sourcetpye Too>
| timechart span=15m avg(rsptime) BY srvname
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...