Splunk Search

How to create a table comparing the same field/count from the previous month to current month?

greentomatoes
Engager

I am currently attempting to create a table that displays the count of one event from the previous month in comparison to the current month. I'm not quite sure what the best way to do this is but I've created a search with an appended search and I'm attempting to display this in a table comparing the two results from last month to this month.

Essentially what Im trying to achieve is the following:

EventLast Month(count)Current Month(count)
Event 14323435
Event 256423


Here is my base search so far..

<search 1> earliest=-1mon@mon latest=@mon> | multikv  | stats count by event | eval input_type="Last_Month" | append [<search 2> earliest=@mon latest=now | multikv  | stats count by event | eval input_type="Current_Month"] |

Thank you!

Labels (4)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| xyseries event input_type count

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| xyseries event input_type count
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!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...