Dashboards & Visualizations

How do I continue developing an app in Splunk Web after moving the app's files from its local directory to its default directory?

Graham_Hanningt
Builder

From the Splunk docs topic "Splunk Enterprise > Developing Views and Apps for Splunk Web > About files and directories for apps and add-ons", heading "Files and directories for apps and add-ons":

To allow users to make their own customizations without being clobbered by later updates of your app,
you move all the files in $APP_HOME/local/ to $APP_HOME/default/.

(Note to Splunk writer, if you're reading this: at the end of the paragraph containing the sentence quoted above, you might want to change "followings file" [sic] to "following files".)

Okay, I did that... but now when I edit the app in Splunk Web - for example, I edit panels in the app's dashboards - Splunk Web saves my changes to the app's local directory. While that makes perfect sense to me, it also prompts this question.

I think the answer is: you can't. You need to keep a "dev" version of the app where the files are in the app's local directory. Each time you want to distribute a new version of the app, you need to (as per the quoted Splunk docs, above) copy the app's files from the local directory to the default directory.

That would be a minor pain, because I'd like to be able to distribute my app locally (inside my organization's intranet) using the git repo of the development version. But it seems it's not going to be that simple, unless I live with distributing all of the app's files in its local directory (but then, see "clobbered", above).

Or there is some way to tell Splunk Web to update the files in the app's default directory?

0 Karma
1 Solution

Jeremiah
Motivator

Nope, you're right. You copy the files to default, then distribute the app. If you want to do further development via the UI, then you have to again copy from local to default and distribute again.

View solution in original post

Jeremiah
Motivator

Nope, you're right. You copy the files to default, then distribute the app. If you want to do further development via the UI, then you have to again copy from local to default and distribute again.

marcoscala
Builder

Further problem is:
But if I want to distribute to some Customer an updated version of my App which includes some upgrades and fixing previously done in the "local" directory, I would like to delete the current "local" directory after upgrading the app.

How could it be possible with SplunK Web?

0 Karma

Graham_Hanningt
Builder

Re:

"all these worlds are yours, except /default - attempt no editing there"
-- duckfez, 2010

(Splunk docs)

I like the Odyssey Two reference.

I recently had to explain to a colleague the "Log, I am your father" caption on a freebie Splunk T-shirt. Sigh. Or rather: sinister amplified breathing via a scuba regulator.

0 Karma

ChrisG
Splunk Employee
Splunk Employee

Thanks for mentioning that typo in the docs, it is fixed now.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...