Dashboards & Visualizations

drilldown based on token length

jiaqya
Builder

hi, could i get help on how to trigger different drilldown based on token length.

for ex: my token is 12345
so if my token length is 5 , i would like to trigger https://test12345
else
trigger the drilldown to https://test1234567890

Tags (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @jiaqya,

Can you please try this drilldown?

<drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>

Sample Dashboard:

<dashboard>
  <label>Drilldown</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults | eval field1="12345,1234567890" | eval field1=split(field1,",") | mvexpand field1 | table field1</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>

View solution in original post

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @jiaqya,

Can you please try this drilldown?

<drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>

Sample Dashboard:

<dashboard>
  <label>Drilldown</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults | eval field1="12345,1234567890" | eval field1=split(field1,",") | mvexpand field1 | table field1</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>
0 Karma

jiaqya
Builder

Thanks, will try this and get back with result..

0 Karma

jiaqya
Builder

Kamlesh, that worked perfectly fine, thank you.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@jiaqya,
Glad to help you.

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!

Quantify Your Splunk Investment Impact: Introducing Savings Metrics to Value Insights

Building on the foundation established in our initial Value Insights releases, we are introducing the Savings ...

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...