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!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...