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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...