Refine your search:

Is it possible to retrieve the current app's configuration via javascript in my application.js? I don't see it in the /config endpoint or the output of Splunk.util.getConfigValue().

Edit

I mean the custom config handler that is pointed to by my restmap.conf

restmap.conf
[admin_external:myapp]
handlertype = python
handlerfile = AppConfig.py
handleractions = list, edit

class AppConfig(admin.MConfigHandler):
  def setup(self):
    configArgs = []
    scalarArgs = []
    joinArgs = []

    if self.requestedAction == admin.ACTION_EDIT:
        scalarArgs = ['hostname','port','username','password']
        ...

And the subsequent handleEdit method

  def handleEdit(self, confInfo):
    name = self.callerArgs.id
    args = self.callerArgs

    ...

    self.writeConf('myapp', 'appliance', self.callerArgs.data)

I'm interested in retrieving the values from the myapp.conf file that is created/updated by the self.writeConf above.

  myapp.conf
  [appliance]
  key1 = val1
  key2 = val2
  key3 = val3

asked 02 Mar '11, 23:58

caphrim007's gravatar image

caphrim007
19510
accept rate: 50%

edited 07 Mar '11, 15:10

Do you mean the stanza(s) that were written during app setup via setup.xml?

(06 Mar '11, 02:31) nick ♦

I believe so. The app config file I'm interested in is manipulated via my restmap.conf. Example provided above.

(07 Mar '11, 15:11) caphrim007
Be the first one to answer this question!
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×309
×12

Asked: 02 Mar '11, 23:58

Seen: 369 times

Last updated: 07 Mar '11, 15:10

Copyright © 2005-2012 Splunk, Inc. All rights reserved.