Splunk Search

Splunk search for each month

jerinvarghese
Communicator

HI All,

Need help in preparing a tabular form.

Data am having : 

using the Index am getting below table.

ClassCount
NODEDOWN520
BGPDOWN320
ISISALERT130

 

Query am using

 

index=itsm
stats count by Class

 

Last 60 days data.

 

Requirement: 

I want month wise data. I used timewrap and timechart.  But the data am getting is not the correct format.

 

Expected format output.

ClassJul-20Aug-20Sep-20
NODEDOWN25025020
BGPDOWN15015020
ISISALERT505030

 

Please help me this format, 

If it search for 1 year data. all 12 months in tabular data.

Labels (5)
0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust

 

index=itsm
| bin span=1mon _time
| eval month_Year = strftime(_time,"%b-%y")
| chart count over Class by month_Year

 

————————————
If this helps, give a like below.

View solution in original post

0 Karma

thambisetty
SplunkTrust
SplunkTrust

 

index=itsm
| bin span=1mon _time
| eval month_Year = strftime(_time,"%b-%y")
| chart count over Class by month_Year

 

————————————
If this helps, give a like below.
0 Karma

jerinvarghese
Communicator

HI, 

My order is coming as below. how can i make it on order.

I tried above qury and that provides me output, but all the order is in alphabetical order not in the month wise order. its not useful data. Please help me get it in month wise order

ClassAug-20Jul-20Sep-20
NODEDOWN20020020
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...

Enterprise Security Content Update (ESCU) | New Releases

In March, the Splunk Threat Research Team had 2 releases of security content via the Enterprise Security ...

Join the Splunk Developer Program Hackathon: Splunk Build-a-thon!

The Splunk Developer Program is launching in beta, and we’re celebrating with an exciting hackathon! This is ...