Reporting

need help with months in chart

3DGjos
Communicator

Hello, im doing a table with data from a sumarized index by month and I need help with the values of the month field I have this:



incapsula.PNG

The months are misplaced.

my query is:

index=mysumarizedindex source=mysumarizedreport 
| bin _time span=1mon
|rename _time as fecha attack as "Tipo de ataque" | eval fecha=strftime(fecha, "%B-%Y") | chart count by "Tipo de ataque" fecha


thanks

 

Labels (1)
Tags (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

Columns will be sorted lexicographically, so you can do it by inverting the initial chart and then transposing it to the format you want with this

index=mysumarizedindex source=mysumarizedreport 
| bin _time span=1mon 
| rename attack as "Tipo de ataque" 
| chart count by _time "Tipo de ataque"
| eval fecha=strftime(_time, "%B-%Y")
| table fecha *
| fields - _time
| transpose 0 header_field=fecha column_name="Tipo de ataque"

Hope this helps

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

Columns will be sorted lexicographically, so you can do it by inverting the initial chart and then transposing it to the format you want with this

index=mysumarizedindex source=mysumarizedreport 
| bin _time span=1mon 
| rename attack as "Tipo de ataque" 
| chart count by _time "Tipo de ataque"
| eval fecha=strftime(_time, "%B-%Y")
| table fecha *
| fields - _time
| transpose 0 header_field=fecha column_name="Tipo de ataque"

Hope this helps

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...