Splunk Search

starttimeおよびendtimeでミリ秒の使用

makeoshimi_chan
New Member

searchコマンドのstarttimeおよびendtimeオプションでミリ秒を使用したいのですが、可能でしょうか?
具体的には、08/16/2013:20:07:34.645以前のデータを検索したいです

search endtime="08/16/2013:20:07:34.645"

上記のように指定してもミリ秒は切り捨てられ、検索に反映されないようです。
また、

search latest=1376651254.645

とするとミリ秒で検索してくれますが、この場合
08/16/2013:20:07:34.645のデータは検索結果に含まれません

よろしくお願いいたします。

Tags (2)
0 Karma
1 Solution

HiroshiSatoh
Champion

latestは未満で検索します。latestでうまくミリ秒を認識するのであれば、+0.001してみるのはどうでしょうか?

View solution in original post

0 Karma

HiroshiSatoh
Champion

latestは未満で検索します。latestでうまくミリ秒を認識するのであれば、+0.001してみるのはどうでしょうか?

0 Karma

HiroshiSatoh
Champion

5.0.3で確認しました、5.0.4は未確認ですがさすがに同じ動きだと思います。earliestは以上、 latestは未満です。latestが未満なので期間で抽出する場合は便利に使わせてもらってます。
8/19日のデータを抽出する場合は「2013/8/19:00:00:00から2013/8/20:00:00:00」と指定すればよいので。

0 Karma

makeoshimi_chan
New Member

http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Search
のendtimeのdescriptionに"All events must be earlier or equal to this time. "
と書いてありますが未満で検索なんですね

0 Karma

HiroshiSatoh
Champion

フォーマットを指定すればミリ秒も認識するみたいです。未満で検索するのは同じようなので+0.001は必要です。

・・・ timeformat="%m/%d/%Y:%H:%M:%S.%N" endtime="08/16/2013:20:07:34.645" ・・・

回答として問題なければ、回答の左にあるチェックをクリックしていただけると嬉しいです。

0 Karma

makeoshimi_chan
New Member

ありがとうございます。+0.001するしかないみたいですね
タイムスタンプがミリ秒まで表示されているのにstarttimeでミリ秒使えないって微妙ですね

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...