Dashboards & Visualizations

Drilldown in prebuilt panel not opening a new page

lyndac
Contributor

(Splunk Enterprise 6.4.1) I have a prebuilt panel that contains a single value field, with a drilldown to another dashboard. I'd like to open the other dashboard in a new page. I've added the target="_blank" to the drilldown tag. This works great for an inline panel. However, once I convert the panel to a prebuilt panel and try to use it, the target is no longer honored. How do I make a prebuilt panel's drilldown open to another page?

This is the XML for my prebuilt panel:

    <panel>
      <single id="count_res">
        <search>
            <query>index=foo | stats count by bar</query>
            <earliest>-60m@m</earliest>
            <latest>now</latest>
        </search>
        <option name="drilldown">all</option>
         <option name ... </option>
        <drilldown target="_blank">
            <link>
                <![CDATA[ /app/foo/reference_page?earliest=0&latest=now ]]>
            </link>
        </drilldown>
      </single>
    </panel>
0 Karma
1 Solution

niketn
Legend

For me the above scenario worked on 6.5.1 after enabling drilldown=all for Single value visualization(which you have already done).

<option name="drilldown">all</option> 

I was able to another Splunk dashboard in a new window using a pre-built panel with single value visualization with drilldown link in Splunk 6.5.1.

I am not sure if this is issue with 6.4.1. Alternatively instead of trying

<drilldown target="_blank"> 

Can you try?

<link target="_blank">

However, both worked fine for me in 6.5.1. Following is the code I used.

Prebuilt Panel (pre_built_panel_with_single_value_drilldown)

<panel>
  <single>
    <search>
      <query>index="_internal" sourcetype="splunkd" log_level="ERROR"
| stats count</query>
      <earliest>-15m</earliest>
      <latest>now</latest>
      <sampleRatio>1</sampleRatio>
    </search>
    <drilldown>
      <link target="_blank">http://answers.splunk.com/search.html?q=$click.name2$</link>
    </drilldown>
    <option name="colorBy">value</option>
    <option name="colorMode">none</option>
    <option name="drilldown">all</option>
    <option name="numberPrecision">0</option>
    <option name="rangeColors">["0x65a637","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]</option>
    <option name="rangeValues">[0,30,70,100]</option>
    <option name="showSparkline">1</option>
    <option name="showTrendIndicator">1</option>
    <option name="trendColorInterpretation">standard</option>
    <option name="trendDisplayMode">absolute</option>
    <option name="unitPosition">after</option>
    <option name="useColors">0</option>
    <option name="useThousandSeparators">1</option>
  </single>
</panel>

Dashboard Row with Pre-built Panel

  <row>
    <panel ref="pre_built_panel_with_single_value_drilldown"></panel>
  </row>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

For me the above scenario worked on 6.5.1 after enabling drilldown=all for Single value visualization(which you have already done).

<option name="drilldown">all</option> 

I was able to another Splunk dashboard in a new window using a pre-built panel with single value visualization with drilldown link in Splunk 6.5.1.

I am not sure if this is issue with 6.4.1. Alternatively instead of trying

<drilldown target="_blank"> 

Can you try?

<link target="_blank">

However, both worked fine for me in 6.5.1. Following is the code I used.

Prebuilt Panel (pre_built_panel_with_single_value_drilldown)

<panel>
  <single>
    <search>
      <query>index="_internal" sourcetype="splunkd" log_level="ERROR"
| stats count</query>
      <earliest>-15m</earliest>
      <latest>now</latest>
      <sampleRatio>1</sampleRatio>
    </search>
    <drilldown>
      <link target="_blank">http://answers.splunk.com/search.html?q=$click.name2$</link>
    </drilldown>
    <option name="colorBy">value</option>
    <option name="colorMode">none</option>
    <option name="drilldown">all</option>
    <option name="numberPrecision">0</option>
    <option name="rangeColors">["0x65a637","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]</option>
    <option name="rangeValues">[0,30,70,100]</option>
    <option name="showSparkline">1</option>
    <option name="showTrendIndicator">1</option>
    <option name="trendColorInterpretation">standard</option>
    <option name="trendDisplayMode">absolute</option>
    <option name="unitPosition">after</option>
    <option name="useColors">0</option>
    <option name="useThousandSeparators">1</option>
  </single>
</panel>

Dashboard Row with Pre-built Panel

  <row>
    <panel ref="pre_built_panel_with_single_value_drilldown"></panel>
  </row>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

lyndac
Contributor

That worked! Thanks! I didn't realize I could put the target on the link. Probably misread the docs. Thank you so much!

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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