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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...