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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...