All Apps and Add-ons

Sideview Utils: How to change which view the redirector sends a drilldown to based on host name clicked on a table?

tmarlette
Motivator

I was wondering if there was a way to change which view the redirector sent
the 'drilldown' to based on the host name, when someone clicks on a table?
The table would contain three different naming conventions, which equal
three different views.

for example:
For anything named host="qa" there is a qa view.
For anything named host="prod" there is an rmq view.

Thank you!

0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

Absolutely. You would have a ValueSetter module with say a name of "conditional_url"
and three different conditional params. The ValueSetter module's docs go into this briefly (and should have more detail than they do), but you can crib working examples from the hidden testcase view called "testcases_for_value_setter_conditionals".

Anyway, you set the $conditional_url$ key to one of three different values

and then Redirector just has <param name="url">$conditional_url$</param>

Let me give a specific example to show it all. Let's say that upstream we have a Table module with a drilldown, and that's the interaction that sends the user to the right page. Let's say that "host" is one of the fields in that Table.

<module name="ValueSetter">
  <param name="name">conditional_url</param>
  <param name="if.$row.fields.host$=qa">qa</param>
  <param name="default">rmq</param>
  <module name="Redirector">
    <param name="url">$conditional_url$</param>
    <param name="someField">$row.fields.someField.rawValue$</param>
    etc...
  </module>
</module>

View solution in original post

sideview
SplunkTrust
SplunkTrust

Absolutely. You would have a ValueSetter module with say a name of "conditional_url"
and three different conditional params. The ValueSetter module's docs go into this briefly (and should have more detail than they do), but you can crib working examples from the hidden testcase view called "testcases_for_value_setter_conditionals".

Anyway, you set the $conditional_url$ key to one of three different values

and then Redirector just has <param name="url">$conditional_url$</param>

Let me give a specific example to show it all. Let's say that upstream we have a Table module with a drilldown, and that's the interaction that sends the user to the right page. Let's say that "host" is one of the fields in that Table.

<module name="ValueSetter">
  <param name="name">conditional_url</param>
  <param name="if.$row.fields.host$=qa">qa</param>
  <param name="default">rmq</param>
  <module name="Redirector">
    <param name="url">$conditional_url$</param>
    <param name="someField">$row.fields.someField.rawValue$</param>
    etc...
  </module>
</module>
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...