Splunk
appendpipeで、結果がない場合に行を追加し、evalでデフォルト値を設定する。 環境 Splunk: 8.1 例 index="_internal" source="foo" | head 1 | appendpipe [stats count | where count=0 ] | eval host = if(isnull(host), "default value", host) 参考 Sol…
どのアプリでサーチを実行しているかを取得することができます。 環境 Splunk 8.0 方法 | rest /services/search/jobs splunk_server=local | addinfo | where sid = info_sid | rename eai:acl.app as appname | fields appname 参考 Solved: How to includ…
サブサーチ内で、ダブルクォートで括るところがポイントのようです。 環境 Splunk 8.0 方法 | makeresults 1 | eval foo = [ | inputlookup geo_attr_countries | where country="Aruba" | eval bar = "\""+country+"\"" | return $bar ] 参考 Solved: How t…
inputs.confのデバッグに使える。 環境 Splunk 8.0.6 コマンド $ /opt/splunk/bin/splunk list inputstatus