Dashboards & Visualizations

Tokens not working in the panels

aditsss
Motivator

Hi Everyone,

I have two dropdowns and they are not working in the panels

Can someone guide me on that:

Below is my current code:

Dropdown:

<input type="dropdown" token="req" searchWhenChanged="true">
<label>Request Type</label>
<choice value="*">All Request_Type</choice>
<search>
<query>index=abc sourcetype=xyz source="user.log" process-groups | rex "\)\s+(?&lt;Request_Type&gt;[^ ]+)"|stats count by Request_Type </query>
<earliest>-60d@d</earliest>
<latest>now</latest>
</search>
<fieldForLabel>Request_Type</fieldForLabel>
<fieldForValue>Request_Type</fieldForValue>
<prefix>Request_Type="</prefix>
<suffix>"</suffix>
<initialValue>*</initialValue>
<default>*</default>
</input>
<input type="dropdown" token="usr" searchWhenChanged="true">
<label>NiFi_Users</label>
<choice value="*">All Users</choice>
<search>
<query>index=abc sourcetype=xyz source="user.log" process-groups | rex "\&lt;(?&lt;Request_User&gt;\w+)\&gt;\&lt;"|stats count by Request_User</query>
<earliest>-60d@d</earliest>
<latest>now</latest>
</search>
<fieldForLabel>Request_User</fieldForLabel>
<fieldForValue>Request_User</fieldForValue>
<prefix>Request_User="</prefix>
<suffix>"</suffix>
<initialValue>*</initialValue>
<default>*</default>
</input>

Panel Code:

1st PANEL

<panel>
<chart>
<title>NiFi_Operations</title>
<search>
<query>index=abc sourcetype=uio source="user.log" process-groups |rex "\)\s+(?&lt;Request_Type&gt;[^ ]+)"|chart count(Request_Type) as "Request- Types" by Request_Type |search $req$ $usr$</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>

2nd Panel

<panel>
<chart>
<title>NiFi_Users</title>
<search>
<query>index=abc sourcetype=xyz source="user.log" process-groups |rex "\&lt;(?&lt;Request_User&gt;\w+)\&gt;\&lt;"|chart count(Request_User) as "Users" by Request_User|search $usr$ $req$</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>

I have extracted the field Request User and RequestType.

Can someone guide me why the t

 

Labels (3)
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...