Splunk Enterprise

help on command as a token

jip31
Motivator

hi

 

I would like to know if it is possible to ruse a comand as a token

I need to replace the command "perc90"  by "perc95" from a dropdown list

| stats perc90(web_dur)

thanks

Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
  <fieldset>
    <input type="dropdown" token="aggregator">
      <label>aggregator</label>
      <choice value="sum">sum</choice>
      <choice value="count">count</choice>
      <choice value="perc90">perc90</choice>
      <choice value="perc95">perc95</choice>
      <default>sum</default>
      <initialValue>sum</initialValue>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults count=20 
| eval count=random()%100
| stats $aggregator$(count) as $aggregator$</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
  <fieldset>
    <input type="dropdown" token="aggregator">
      <label>aggregator</label>
      <choice value="sum">sum</choice>
      <choice value="count">count</choice>
      <choice value="perc90">perc90</choice>
      <choice value="perc95">perc95</choice>
      <default>sum</default>
      <initialValue>sum</initialValue>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults count=20 
| eval count=random()%100
| stats $aggregator$(count) as $aggregator$</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
0 Karma
Get Updates on the Splunk Community!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...