Splunk Search

How do you merge events by _time field and add new fields?

perlish
Communicator

Hi everyone,

My data is as flowing.

The cnt is events count of scanner_type by day.

I want to show everyday`s different scanner_type events number with a line chart.

_time   scanner_type    cnt
2019-02-23T00:00:00.000 mykings_ip 113
2019-02-23T00:00:00.000 sql_union1 2915
2019-02-22T00:00:00.000 mykings_ip 174
2019-02-22T00:00:00.000 sqlmap_stacked 39
2019-02-22T00:00:00.000 backup-file 483300
2019-02-22T00:00:00.000 sqlmap_union1 6

I want convert to this format

time  sqlmap_union1 backup-file sqlmap_stacked mykings_ip 
2019-02-22T00:00:00.000 6 483300 39 174
2019-02-23T00:00:00.000 2915 null null 113

Thanks so much.

Tags (2)
0 Karma

FrankVl
Ultra Champion

Just add the following to the search you have so far:

| timechart sum(cnt) by scanner_type
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...