Hi,
I have to display on a dashboard the content of a lookup which is some time empty and so shows the message "no result found".
My query is :
index=A sourcetype="B" id=*
| table id name | outputlookup example.csv
How can I modify this message ?
sample:
index=_internal sourcetype=splunk
| appendpipe
[| stats count
| eval msg="No event for this host" | where count=0 |table msg ]There is only msg field.
<condition match="'result.msg' =="No event for this host"">
<set token="tables">msg</set> </condition>
<condition>
<set token="tables">id,name,"Start time","End time"</set>
</condition>
Now, why don't you try using the token value as the | table argument?
Sorry, I never set a condition ... So I try to understand :
Here is my xml code with your solution :
<table>
<search>
<query>index=A sourcetype="B" id=*
| table id name start end
| sort - start
| appendpipe
[| stats count
| eval msg="No event for this table" | where count=0 |table $tables$ ]</query>
<earliest>-15m</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
<finalized>
<condition match="'result.msg' =="No event for this table"">
<set token="tables">msg</set> </condition>
<condition>
<set token="tables">id,name,start,end</set>
</condition>
</finalized>
</search>
<option name="count">20</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
But it is not working : still have the message "no results found"