Getting Data In

"did not return events in descending time order"の解消方法

KagotaniMasato
Explorer

以下のような前段のコマンドから結果を読み込み、自作の関数の結果を新しいカラムとして差し込んで次のコマンドへ引き渡す外部スクリプトを実行すると、以下のようなエラーになります。エラーにならない場合もあります。 commands.confのtimeorder_overideをTrueへ変更しても改善できません。 挙動が異なるケースの切り分けもできませんが、前段のサーチ結果が大量の場合に発生するようです。なお、インデクサーとサーチヘッドが分かれた環境で利用しており、コマンドはサーチヘッド側に置いています。 streamingの設定はtrueとfalseの両方を試しましたが挙動に変化はありませんでした

コマンドは以下のイメージです
search | addsim target_field_name | stats ......

The external search command 'MyScript' did not return events in descending time order, as expected.

(isgetinfo, sys.argv) = splunk.Intersplunk.isGetInfo(sys.argv)
argvs = sys.argv
 if isgetinfo:
    splunk.Intersplunk.outputInfo(False, False, True, False, None, True)

try:

    # for echo back other search results
    results = splunk.Intersplunk.readResults(None, None, True)
    newresults=[]

    for res in results:
        res['New_Field] = MyFunction(res[argvs[1]])
        newresults.append(res)

    # echo back with results
    splunk.Intersplunk.outputResults(newresults)

except Exception, e:
    splunk.Intersplunk.generateErrorResults("Unhandled exception:  %s" % (e,))

"The external search command 'addsim' did not return events in descending time order, as expected. "

0 Karma

tkomatsubara_sp
Splunk Employee
Splunk Employee

数が多いとエラーになる、というのは、なんらかのリソース不足、制限にひっかかっている可能性がありますね。

まずは
https://docs.splunk.com/Documentation/Splunk/6.5.1/Admin/Limitsconf
あたりを確認いただいたほうがいいかと思います.(ひとつひとつ見るよりも、Splunkのログをデバッグログを有効にしてしまって、エラーログから見ていくのが早いです)

次は、FDなどのシステムリソース系ですね。

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...