<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to extract a change_link from _raw depending on the datapoint a user click on  in a line graph? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458527#M30070</link>
    <description>&lt;P&gt;Hey &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt; :&lt;/P&gt;

&lt;P&gt;Answers below&lt;/P&gt;

&lt;P&gt;1.When the drilldown URL is constructed what should it look like?&lt;BR /&gt;
[Answer] URL is already in change_link, we just need to take that , am trying to pull that.&lt;/P&gt;

&lt;P&gt;2.When you use chart command you drop raw data, what do you imply by url token that you are trying to set? &lt;BR /&gt;
[Answer]I am trying to set a variable (url) based on what the user click and to extract the change_link value from raw data. Then use this variable in the link_target,all I need is depending on the datapoint the user click on I want to pull the URL from change_link,if there are simpler ways to achieve it I am open to that.&lt;/P&gt;

&lt;P&gt;3.Instead of creating a link, can you print the $url$ token in Splunk dashboard? Also what is the URL in the browser when you see "Page not found"?&lt;BR /&gt;
[Answer]Please elaborate ,like I said above all I need is depending on the datapoint the user click on I want to pull the URL from change_link value from raw data ,if there are simpler ways to achieve it I am open to that.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:39:31 GMT</pubDate>
    <dc:creator>isplunk2999</dc:creator>
    <dc:date>2020-09-30T00:39:31Z</dc:date>
    <item>
      <title>how to extract a change_link from _raw depending on the datapoint a user click on  in a line graph?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458524#M30067</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
I insert the data in the following JSON format and create a linegraph over _time,each of the circle markers in the line graph represent the count field over _time ,what I am looking for is depending on the datapoint the user clicks on, I want to pull the URL from change_link.&lt;/P&gt;

&lt;P&gt;How do I set a variable (url) based on what the user click on to extract the change_link and then use this variable in the link_target?&lt;/P&gt;

&lt;P&gt;How do I pull the url from a nested json ?how to set a token based on what they clicked on and extract the change_link and then you use that token as your link_target? &lt;/P&gt;

&lt;P&gt;Please advise&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_raw = {
    "Analyze":{
        "P5":{"count":"","change_link":""}
    },
    "timestamp": int(time.time())  # Can also use datetime.datetime.now().isoformat()
} 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/273651-pastedgraphic-2-7.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Following is my code&lt;BR /&gt;
CODE:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;radar_trend_test_report&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=indexname  sourcetype=sourcetype | chart values(Analyze.P5.count) as P5  over _time&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;@w0&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMaximumSize"&amp;gt;50&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMinimumSize"&amp;gt;10&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleSizeBy"&amp;gt;area&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.showDataLabels"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.stackMode"&amp;gt;default&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.style"&amp;gt;shiny&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries.allowIndependentYRanges"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisMiddle&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.mode"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.lineWidth"&amp;gt;2&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:33:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458524#M30067</guid>
      <dc:creator>isplunk2999</dc:creator>
      <dc:date>2020-09-30T00:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a change_link from _raw depending on the datapoint a user click on  in a line graph?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458525#M30068</link>
      <description>&lt;P&gt;I tried as below but when I click on the circle marker I get  Page not found! ,I need some guidance from here&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown&amp;gt;
   &amp;lt;set token="url"&amp;gt;| eval url=spath(_raw, "Analyze.P5.$click.value${}.change_link")&amp;lt;/set&amp;gt;
   &amp;lt;link target="_blank"&amp;gt;$url$&amp;lt;/link&amp;gt;
&amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 May 2019 18:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458525#M30068</guid>
      <dc:creator>isplunk2999</dc:creator>
      <dc:date>2019-05-15T18:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a change_link from _raw depending on the datapoint a user click on  in a line graph?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458526#M30069</link>
      <description>&lt;P&gt;When the drilldown URL is constructed what should it look like. When you use chart command you drop raw data, what do you imply by url token that you are trying to set? Instead of creating a link, can you print the &lt;CODE&gt;$url$&lt;/CODE&gt; token in Splunk dashboard? Also what is the URL in the browser when you see "Page not found"?&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 16:47:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458526#M30069</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-05-22T16:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a change_link from _raw depending on the datapoint a user click on  in a line graph?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458527#M30070</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt; :&lt;/P&gt;

&lt;P&gt;Answers below&lt;/P&gt;

&lt;P&gt;1.When the drilldown URL is constructed what should it look like?&lt;BR /&gt;
[Answer] URL is already in change_link, we just need to take that , am trying to pull that.&lt;/P&gt;

&lt;P&gt;2.When you use chart command you drop raw data, what do you imply by url token that you are trying to set? &lt;BR /&gt;
[Answer]I am trying to set a variable (url) based on what the user click and to extract the change_link value from raw data. Then use this variable in the link_target,all I need is depending on the datapoint the user click on I want to pull the URL from change_link,if there are simpler ways to achieve it I am open to that.&lt;/P&gt;

&lt;P&gt;3.Instead of creating a link, can you print the $url$ token in Splunk dashboard? Also what is the URL in the browser when you see "Page not found"?&lt;BR /&gt;
[Answer]Please elaborate ,like I said above all I need is depending on the datapoint the user click on I want to pull the URL from change_link value from raw data ,if there are simpler ways to achieve it I am open to that.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:39:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458527#M30070</guid>
      <dc:creator>isplunk2999</dc:creator>
      <dc:date>2020-09-30T00:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a change_link from _raw depending on the datapoint a user click on  in a line graph?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458528#M30071</link>
      <description>&lt;P&gt;@isplunk2999 as per the above code when you chart P5 counts you loose the value of URL hence can not do a drilldown to URL.&lt;/P&gt;

&lt;P&gt;If however, this was a table you could have used &lt;CODE&gt;&amp;lt;fields&amp;gt;&lt;/CODE&gt; attributed in the table to hide URL from being displayed and user could have clicked on P5 to drilldown through the hidden url field.&lt;/P&gt;

&lt;P&gt;You can refer to Splunk Dashboard Examples app for this hidden url field in table for drilldown example. Please let us know if you need assistance with this.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jul 2019 16:16:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-extract-a-change-link-from-raw-depending-on-the-datapoint/m-p/458528#M30071</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-20T16:16:20Z</dc:date>
    </item>
  </channel>
</rss>

