Dashboards & Visualizations

How to edit the drilldown values

klim
Path Finder

I have a timechart that is sorted by a variable that is a combination of two fields. Like field1_field2. I want to drilldown and send only field2 to the next dashboard as a token. Is it possible to do some sort of regex on the drilldown value?

Labels (2)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

In your token expression use an eval statement rather than a <set>. Have a look at how this example dashboard does it.

<dashboard>
  <label>split_timechart</label>
  <row>
    <panel>
      <chart>
        <search>
          <query>| makeresults count=100
| streamstats c
| eval _time=_time - c*10
| eval field1=mvindex(split("F1-Value1,F1-Value2,F1-Value3", ","), random() % 3)
| eval field2=mvindex(split("F2-Value1,F2-Value2,F2-Value3", ","), random() % 3)
| eval combined=field1."_".field2
| timechart fixedrange=f span=15s count by combined</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">line</option>
        <option name="charting.drilldown">all</option>
        <option name="refresh.display">progressbar</option>
        <drilldown>
          <eval token="field1">mvindex(split($click.name2$,"_"),0)</eval>
          <eval token="field2">mvindex(split($click.name2$,"_"),1)</eval>
        </drilldown>
      </chart>
    </panel>
    <panel>
      <html>
        Clicked value was made from a combination of <b style="color:red">$field1$</b> from field 1 and <b style="color:blue">$field2$</b> from field 2
      </html>
    </panel>
  </row>
</dashboard>

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

How much can you really learn in 3 minutes?

Observability can certainly be hard to understand – there's a lot of jargon and buzzwords and it seems to ...

Event Series: The Agentic SOC: Trust Before Autonomy

AI is fundamentally changing security operations, but true progress requires more than just automation—it ...

Free Professional Services for .conf26 Attendees

This year at .conf26, we are doing something a little different. We are bringing the best minds from ...