Putting the following at the start of your form/dashboard will give you a dropdown list, from which you have options abc
and def
, corresponding to the set of indexes you mentioned.
<form>
<label>Index Group Test</label>
<fieldset submitButton="false">
<input type="dropdown" token="indexes">
<label>Index Group</label>
<choice value="index=index1 OR index=index2 OR index=index3">abc</choice>
<choice value="index=index4 OR index=index5 OR index=index6">def</choice>
<selectFirstChoice>true</selectFirstChoice>
</input>
</fieldset>
</form>
You would then use the token $indexes$
in your query to get the selected index data. For example,
<form>
<label>Index Group Test</label>
<fieldset submitButton="false">
<input type="dropdown" token="indexes">
<label>Index Group</label>
<choice value="index=index1 OR index=index2 OR index=index3">abc</choice>
<choice value="index=index4 OR index=index5 OR index=index6">def</choice>
<selectFirstChoice>true</selectFirstChoice>
</input>
</fieldset>
<row>
<panel>
<event>
<title>Event Data</title>
<search>
<query>$indexes$</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="list.drilldown">none</option>
</event>
</panel>
</row>
</form>