I have following query. $HostSelectBoxValue$ is drop down field name. I have to run this query on page load and also after selecting particular host. The default host is 'any' and value is '*'.
I want to show all hosts on page load and after selecting particular host, graph should show particular host's data graph.
Query is giving some problem.
index="power" sourcetype="powerusage" | eval host=if(HostSelectBoxValue=='$HostSelectBoxValue$','$HostSelectBoxValue$','*') | timechart max(Powerconsumption) by host | sort 10 host
I think you can use search selector module in advanced view.
Also, you can define multiple host in static select.
I recommend App 'UI example" and ' 'side view'. These contains good example views. Please refer to them.