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!

Congratulations to the 2025-2026 SplunkTrust!

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

Community Feedback

We Want to Hear from You! Share Your Feedback on the Splunk Community   The Splunk Community is built for you ...

Manual Instrumentation with Splunk Observability Cloud: Implementing the ...

In our observability journey so far, we've built comprehensive instrumentation for our Worms in Space ...