Splunk Search

Merge multiple rows into one of a field

obularajud16
Explorer

With the below query I am able to get data as below(first one) and I need to convert it as second box

 

For the time field I am getting common values and i need to merge and combine them as shown. is there any way to achieve this, I've tried with values() but it is not working

 

obularajud16_0-1598881034465.png

 

 

sourcetype=access_combined | eval action = if(isnull(action) OR action="", "unknown", action) | bin _time span=102h  |eval Time=strftime(_time,"%Y-%m-%d %H:%M:%S") | stats  count as totals by action,Time | sort -Time,action

 

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you tried adding

...
| stats values(action) as action, values(totals) as totals by Time
| fields action, Time, totals

 

0 Karma

obularajud16
Explorer

Yes, but it's not worked. 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...