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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...