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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...