Refine your search:

In 4.2.x, instead of June, July, August, September, the data listed as August, July, June, September. Data is displayed by alphabetic order of the month name.

Data is displayed by alphabetic order of the month name when it should be logical.

* |stats count as "Total Incident/month" by date_month

alt text

asked 28 Sep '11, 15:01

Splunker_J's gravatar image

Splunker_J ♦
1.1k5631
accept rate: 62%

edited 28 Sep '11, 15:36


3 Answers:

This is a bug. Bug#SPL-43691

link

answered 28 Sep '11, 15:02

Splunker_J's gravatar image

Splunker_J ♦
1.1k5631
accept rate: 62%

This is not a bug. If you do want to sort by month, then you can place the month number in a field and sort on that, e.g.:

... | eval date_numericmonth=strftime(_time,"%m") | stats count by date_numericmonth
link

answered 28 Sep '11, 20:30

gkanapathy's gravatar image

gkanapathy ♦
32.6k4827
accept rate: 41%

I would change something slightly with gkanapathy's answer. Prefix the date_numeric_month with an underscore to make it hidden and add the month name within the query.

In this example I am getting the count of user_ids per month:

... | eval _date_numeric_month=strftime(_time,"%m") | stats count(user_id) by _date_numeric_month, date_month | sort _date_numeric_month

link

answered 22 Nov '11, 03:13

ag's gravatar image

ag
161
accept rate: 0%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×76

Asked: 28 Sep '11, 15:01

Seen: 1,963 times

Last updated: 22 Nov '11, 03:13

Copyright © 2005-2012 Splunk Inc. All rights reserved.