Splunk Search

HTML query for passing multiple values form checkbox

vaishnavi07
Explorer

I have converted simple XML dashboard to html dashboard.

var selectedsourcetypes="sourcetype=" + view_checkboxgroup.val().join(" OR sourcetype=");

If i use the above query then its displaying as below,
"sourcetype=choice1 OR sourcetype=choice2 ... OR sourcetype=choicen"

Instead of sourcetype am displaying counter values like %_Processor_Time,%_Privilaged_Time etc.I need to display graph for above counters.So i need my query as "Avg(%_Processor_Time),Avg(%_Privilaged_Time),.."

Can anyone help to get the above format? Is it possible? Thanks in advance.

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Something like this?

var selectedaverages = "avg(" + view_checkboxgroup.val().join(") avg(") + ")";
0 Karma

vaishnavi07
Explorer

Thanks its working great!

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...