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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...

Operationalizing TDIR: Building a More Resilient, Scalable SOC

Optimizing SOC workflows with a unified, risk-based approach to Threat Detection, Investigation, and Response ...

Introducing .conf Stories Series!

“.conf Stories” Series – First Feature: Rich Mahlerwein   Every year .conf brings together some of the most ...