Dashboards & Visualizations

SingleView is returning "No search set."

Path Finder

I have created a search manager and then a single view using Django tags and javascript. The SingleView element shows us in my splunk app but I only see the text "No search set.".
This is the search manager:

 new SearchManager({
                                                id: "managerID",
                                                preview: true,
                                                cache: true,
                                                status_buckets: 300,
                                                search: searchQuery (<--long search query but works fine when searched in the search app)

This is the singleview:

new SingleView({
                                                id: "uniqueID",
                                                managerid: "managerID",
                                                field: "field1",
                                                el: $("#singleview")

What could be causing this?

0 Karma

Path Finder

I've run into the same problem today.

In my custom SimpleSplunkView I've that's its receiving data from the search, but it said 'No search set'.
Strange but my guess would be that the initialization of the search takes some time and it's still not initialized when the view is starting to initialize, so it initialize method returns 'No search set'.

I've found few solutions to this problem.
One is to move search to django/xml definition, so we can have a handler to it after it's initialized.

Other solution I've managed to get running is to create the custom view after the search is initialized
Im using underscore _.once() method to call this function only once, but it could be also if check to see if the view was created. Or maybe there is a better handler, I haven't found it yet.

  searchResults.on('search:done', _.once(function() {
    var swimlaneView = new SwimlaneView({
      name: "mycustomview",
      managerid: "sla1_query",
      el: $("#swimlane_view")
0 Karma

New Member

Check out if you have any quots or any special characters in the search query. If yes escape them with .

The issue could be with the special characters like quots in the search query. Escaping them should fix the issue.

0 Karma
Get Updates on the Splunk Community!

How I Instrumented a Rust Application Without Knowing Rust

As a technical writer, I often have to edit or create code snippets for Splunk's distributions of ...

Splunk Community Platform Survey

Hey Splunk Community, Starting today, the community platform may prompt you to participate in a survey. The ...

Observability Highlights | November 2022 Newsletter

 November 2022Observability CloudEnd Of Support Extension for SignalFx Smart AgentSplunk is extending the End ...