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.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...