我想在Splunk的multiselect输入选项中填充主机列表。
index=someIndexName * host!="notThis*" | stats values(host) as host
我可以看到在Splunk中填充的主机列表。但是,它们不会填充在多选列表中。它说“正在填充”,但没有任何显示。
尝试将其用作填充搜索
index=someIndexName * host!="notThis*" | stats count by host
然后将host
用作Field for Label
以及Field for Value
<input type="multiselect" token="field1">
<label>Hosts</label>
<fieldForLabel>host</fieldForLabel>
<fieldForValue>host</fieldForValue>
<search>
<query>index= someIndexName host!="notThis*"| stats count by host</query>
</search>
<choice value="*">All</choice>
<default>*</default>
<initialValue>*</initialValue>
<delimiter> </delimiter>
</input>
正如西蒙·达夫(Simon Duff)也建议的,这有效!