Developing for Splunk Enterprise

slim validate complains about undefined setting python.version even though it is valid

citruz
Loves-to-Learn

Hi,

I am trying to use the slim utility for validating and packaging my app. When running slim validate, it complains about undefined setting python.version in alert_actions.conf even though it is clearly documented:

https://docs.splunk.com/Documentation/Splunk/8.1.2/Admin/Alertactionsconf

Did I miss something?

slim validate: Validating app at "<My App name>"...
slim validate: [WARNING] /path/to/<My App name>/default/alert_actions.conf, line 2: Undefined setting in stanza [default]: python.version

 

Labels (3)
Tags (1)
0 Karma

malvidin
Communicator

No, you didn't miss anything.

The splunk-packaging-toolkit (slim), splunk-appinspect, and the Splunk Python SDK are not perfectly aligned yet.

If you want slim to work better, you could update the files in ./venv/Lib/site-packages/slim/config/conf-specs/*.conf.spec to what you find in your target Splunk version's config files. 

Some of the other issues I've seen:

  • documented slim options may not exist (e.g. --quiet)
  • Python SDK doesn't pass splunk-appinspect 
  • splunk-appinspect and slim raise conflicting errors
  • no slim option to set the location of inspect.yml
  • no option to return a non-zero code if any validations fail in splunk-appinspect or slim 

I'd recommend packaging the app with slim and using splunk-appinspect  to validate, rather than using the validation in slim.

0 Karma

citruz
Loves-to-Learn

Just to add to the list of issues:

Slim and AppInspect cannot even be installed in the same venv because the former depends on future>=0.18.2 while the latter depends on future==0.17.1

 

0 Karma
.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!