Dashboards & Visualizations

how to pass savedsearch name as a token in django

mvaradarajam
Path Finder

Hi All,

i want to pass savedsearch value as a token in django.
i tried this one,but it is not working.
{% savedsearchmanager
id="search_chart"
searchname="$sourcetype$"
app="RealtimeServiceComponentMonitoring"
earliest_time="$headcount$"
latest_time="now"
cache=False

here sourcetype as radiogroup name.

can u plz help me.

Tags (2)
0 Karma

dfoster_splunk
Splunk Employee
Splunk Employee

Add a token_safe filter to attributes that you want to be replaced with tokens. For example:

{% savedsearchmanager
        id="search_chart"
        searchname="$sourcetype$"|token_safe 
        app="RealtimeServiceComponentMonitoring"
        earliest_time="$headcount$"|token_safe
        latest_time="now"
        cache=False %}
0 Karma

dfoster_splunk
Splunk Employee
Splunk Employee

I don't have enough information.

Is it the case that you have a saved search in Splunk in the "RealtimeServiceComponentMonitoring" app called and that you have set the $sourcetype$ token to "" by some means (like a text field)? Under those circumstances the SavedSearchManager should find saved search and run it.

Perhaps you could attach the entire page so I could read it?

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...