Dashboards & Visualizations

How to create a hyperlink from the column values in a table?

aditsss
Motivator

Hi Everyone,

 

I have one requirement.  I have one table Dashboard which consists of multiple Columns.

There is one column "url". I want it to be hyperlink so that it can open.

Below is my code:

<row>
<panel>
<table>
<search>
<query>index=abc sourcetype=xyz source="ser.log" $process_tok1$
| rex field=_raw "(?&lt;id&gt;[A_Za-z0-9]{8}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{12})"
| join type=outer id [inputlookup nifi_api_parent_chains_e1.csv]|search $ckey$|search $usr$
| table _time _raw host id parent_chain url
</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="percentagesRow">false</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
</row>

I want url column should be a hyperlink . How can I do that.

Thanks in advance.

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
<link target="_blank">$row.url|n$</link>

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Use a drilldown which opens a page based on the value of the cell. You could even change the text so that it looks like a link e.g. underlined and blue.

0 Karma

aditsss
Motivator

@ITWhisperer 

I have made the below changes but its not working.

Can you guide me where I have gone wrong:

<panel>
<table>
<search>
<query>index=abc sourcetype=xyz source="user.log" $process_tok1$
| rex field=_raw "(?&lt;id&gt;[A_Za-z0-9]{8}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{12})"
| join type=outer id [inputlookup nifi_api_parent_chains_e1.csv]|search $ckey$|search $usr$|eval ClickHere= url
| table _time _raw host id parent_chain url
</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="percentagesRow">false</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
<drilldown>
<condition field="url">
<link target="_blank">$url$</link>
</condition>
</drilldown>
</table>
</panel>

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
<link target="_blank">$row.url|n$</link>

vamsi354
Explorer

@ITWhisperer this really helped is there a way to show only url column results in blue remaining 4 fields in just text (i.e Black) color 

vamsi354_0-1660851182934.png

i want something like below

vamsi354_1-1660851286119.png

 

<row>
<panel>
<table>
<search>
<query>|inputlookup testing.csv | eval ClickHere= url
| table _time duration_seconds dv_assignment_group dv_number dv_u_substate url
</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</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>
<format type="number" field="dv_u_substate"></format>
<drilldown>
<condition field="url">
<link target="_blank">$row.url|n$</link>
</condition>
<condition field="*"></condition>
</drilldown>
</table>
</panel>
</row>

0 Karma

aditsss
Motivator

@ITWhisperer 

 

Thank u so much 

0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...