I make the panel of the dashboard now to display the number of the access
of the application with a bar graph from the log that I acquired.
I wanted to perform the data extraction in the following period and displayed it
using "span" in "timechart".
※I want to assume it an opening in April.
[unit]
・The year (from April to March)
・A half term (for from April to September from October to March)
・A quarter (for from April to June for from July to September for from October to December
from January to March)
・Month
・Week
[search sentence]
・The year
「… | timechart span=1y count as …」
・Half term
「… | timechart span=6mon count as …」
・Quarter
「… | timechart span=1q count as …」
・Month
「… | timechart span=1mon count as …」
・Week
「… | timechart span=1w count as …」
However, "the year" and "a half term" are extracted in the form of the opening
in January when it is the description mentioned above.
If there is the method that data are gathered in the form of the opening in April,
現在、取得したログからアプリケーションのアクセス数を棒グラフにて表示するため、ダッシュボードのパネルの作成を行っております。
下記の単位での集約を行いたく、
timechartにてspanを使用し表示を行いました。
4月始まりの形でデータを集約される方法が分からない為ご教授ください。
【単位】
・年度(4月~3月)
・半期(4月~9月、10月~3月)
・四半期(4月~6月、7月~9月、10月~12月、1月~3月)
・月
・週
【サーチ文】
・年度
「… | timechart span=1y count as …」
・半期
「… | timechart span=6mon count as …」
・四半期
「… | timechart span=1q count as …」
・月
「… | timechart span=1mon count as …」
・週
「… | timechart span=1w count as …」
しかし、上記の記述ですと「年度」と「半期」が1月始まりの形で集約されてしまいます。
下記の用にデータ抽出期間を制限した表示方法も試しましたが、4月始まりの形では集約されませんでした。
「・・・ earliest=@y4 latest=@y3 | timechart ・・・」
※実際にはデータ抽出期間の制限は設けずに表示することを目指しております。
4月始まりの形でデータを集約される方法がございましたらご教示いただけますようお願い致します。
That is a great question. How can the spans defaults be changed to have a different starting month from January . As far as I know they cannot, but I would approach your problem by using bin instead of timechart.
You could for example create new field which was the offset from the 1st of April., then use bin and stats to calculate the quarters from april.
...| eval offset = _time - 1427846400 | bin offset span=7862378 | stats count as ...
Something like that might work.
See http://docs.splunk.com/Documentation/Splunk/6.3.2/SearchReference/Bin