Splunk Search

Why am I getting error "Cannot find viewstate with vsid="XXXXXXXXX""? while saving searches?

Kaushikkatta03
Explorer

I'm trying to save the search, but getting this error:

Saved Search - Cisco -
Error - Encountered the following error while trying to update: In handler 'savedsearch': Cannot find viewstate with vsid="XXXXXXXXX"
0 Karma

scruse
Path Finder

Do you see any errors in splunkd.log or splunkd_access.log related to the "missing" viewstate? Perhaps there is some indication of a failure to create that viewstate.

Additionally, you need to have the ability to modify viewstates in any app where you want to save searches, even private saved searches. (IE: Write permissions) This is why apps like the search app (for example) make viewstates world-writable.

The relevant bit of configuration goes into $SPLUNK_HOME/etc/apps/your-app/metadata/default.meta. For example, in $SPLUNK_HOME/etc/apps/search/metadata/default.meta:

 ### VIEWSTATES: even normal users should be able to create shared viewstates
 [viewstates]
 access = read : [ * ], write : [ * ]
 export = system
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...