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
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, ...