All Apps and Add-ons

minimum required files for an app?

mfrost8
Builder

Typically we make new apps by just cloning the simple app (I forget what it's called) but that includes some ui files and other things we don't need.

Suppose we're making an app that is just a couple of config files. What are the minimal files needed in an app if I'm not doing anything but a couple of conf files in local/*? Do I need the default directory at all?

Thanks

Tags (1)
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You actually need nothing other than either a local or default folder and the config file you want. if you're not a third party providing the app/config to someone else for potential override, you should use local and not default. Config in there (if it's search time) will be scoped only to the app however, and you'd need a metadata/local.meta or metadata/default.meta file to export it. Inherently global configs will be global of course. You don't need an app.conf or anything else.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

You actually need nothing other than either a local or default folder and the config file you want. if you're not a third party providing the app/config to someone else for potential override, you should use local and not default. Config in there (if it's search time) will be scoped only to the app however, and you'd need a metadata/local.meta or metadata/default.meta file to export it. Inherently global configs will be global of course. You don't need an app.conf or anything else.

LukeMurphey
Champion

The answer depends somewhat on what you want to do with the app. At a minimum, your app will need an app.conf file under default/app.conf. Your virtually always need a default directory with the appropriate transforms and props.

Note that your transforms and props need to be under the default directory as opposed to the local directory. Configurations data in the local directory overrides the content under default. When a user makes changes to the app content through the UI, her changes will be written to local and Splunk will override whatever is in default with whatever is in local. Putting app content in local makes upgrades difficult since you will overwrite the user's customizations when you try to deploy a new version of the app.

Below is a primer on some of the more important directories that you may or may not need depending on what your app does:

  • appserver: contains HTML content that is served to the browser (images, Flash applets, etc.)
  • default: contains the core content (such as the props & transforms) distributed with the app
  • default/data/ui/views: contains the XML for dashboards/views, unnecessary if you don't have views
  • metadata: describes app permission information (see default.meta)

While not required, you may want the following:

  • appserver/static/appIcon.png: if you want an app icon
  • appserver/static/screenshot.png: if you want a screenshot in SplunkBase

hazekamp
Builder

Deployment apps are very similar. You should have a default directory with app.conf, inputs.conf, etc. and a metadata directory with default.meta.

0 Karma

mfrost8
Builder

Thanks. I'm referring to an app that is used for a deployment to clients that represents only one or two conf files (say inputs.conf/props.conf). So no gui components, no graphics, etc. Just a couple of config files. Typically we store those only in local, not in default. So I'm trying to change the deployment so it's as few files as possible and I'm looking to locate files and directories that I can safely remove if, say, I'm pushing only an inputs.conf and a props.conf for example.

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...