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!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

Stay Connected: Your Guide to October Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...