<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setup screen screen example using a custom endpoint in Security</title>
    <link>https://community.splunk.com/t5/Security/Setup-screen-screen-example-using-a-custom-endpoint/m-p/80228#M14101</link>
    <description>&lt;P&gt;It's not a problem anymore. I Moved the apps to another splunk 4.2, and it runs well.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2011 09:17:20 GMT</pubDate>
    <dc:creator>lhy719</dc:creator>
    <dc:date>2011-04-13T09:17:20Z</dc:date>
    <item>
      <title>Setup screen screen example using a custom endpoint</title>
      <link>https://community.splunk.com/t5/Security/Setup-screen-screen-example-using-a-custom-endpoint/m-p/80227#M14100</link>
      <description>&lt;P&gt;I encounter a similar problem as thread 12702. I followed instruction on 'Setup screen example using a custom endpoint' to create a custom settings of my apps. However I get an error message "Your entry was not saved. The following error was reported: undefined.
", when I save configuration changes on Web UI. &lt;/P&gt;

&lt;P&gt;setup.xml is same as the example Splunk provided.&lt;/P&gt;

&lt;P&gt;Content of my restmap.conf,&lt;/P&gt;

&lt;P&gt;[admin_external:appsettings]&lt;/P&gt;

&lt;P&gt;handlertype = python&lt;/P&gt;

&lt;P&gt;handlerfile = App_python_handler.py&lt;/P&gt;

&lt;P&gt;handleractions = list, edit&lt;/P&gt;

&lt;P&gt;Content of my App_python_handler.py,&lt;/P&gt;

&lt;P&gt;import splunk.admin as admin&lt;/P&gt;

&lt;P&gt;import splunk.entity as en&lt;/P&gt;

&lt;P&gt;class ConfigApp(admin.MConfigHandler):&lt;/P&gt;

&lt;P&gt;def setup(self):
    if self.requestedAction == admin.ACTION_EDIT:
      for arg in ['field_1', 'field_2_boolean', 'field_3']:
        self.supportedArgs.addOptArg(arg)&lt;/P&gt;

&lt;P&gt;def handleList(self, confInfo):
    confDict = self.readConf("appsettings")
    if None != confDict:
      for stanza, settings in confDict.items():
        for key, val in settings.items():
          if key in ['field_2_boolean']:
            if int(val) == 1:
              val = '0'
            else:
              val = '1'
          if key in ['field_1'] and val in [None, '']:
            val = ''
          confInfo[stanza].append(key, val)&lt;/P&gt;

&lt;P&gt;def handleEdit(self, confInfo):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name = self.callerArgs.id
args = self.callerArgs

self.writeConf('appsettings', 'setupentity', self.callerArgs.data)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;admin.init(ConfigApp, admin.CONTEXT_NONE)&lt;/P&gt;

&lt;P&gt;My envirnment is fedora 14 with splunk 4.2 upgraded from 4.17&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 09:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Setup-screen-screen-example-using-a-custom-endpoint/m-p/80227#M14100</guid>
      <dc:creator>lhy719</dc:creator>
      <dc:date>2011-04-13T09:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setup screen screen example using a custom endpoint</title>
      <link>https://community.splunk.com/t5/Security/Setup-screen-screen-example-using-a-custom-endpoint/m-p/80228#M14101</link>
      <description>&lt;P&gt;It's not a problem anymore. I Moved the apps to another splunk 4.2, and it runs well.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 09:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Setup-screen-screen-example-using-a-custom-endpoint/m-p/80228#M14101</guid>
      <dc:creator>lhy719</dc:creator>
      <dc:date>2011-04-13T09:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Setup screen screen example using a custom endpoint</title>
      <link>https://community.splunk.com/t5/Security/Setup-screen-screen-example-using-a-custom-endpoint/m-p/80229#M14102</link>
      <description>&lt;P&gt;The error messages in the user interface are oftentimes ambiguous. The best way to find the core problem is to do a search for the errors in the internal index. This will reveal the complete stack trace (including the exact line that caused the error).&lt;/P&gt;

&lt;P&gt;Below is an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(BTW: I'm posting this despite the fact the person who asked the question found the answer in case others are trying to debug similar issues)&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 09:59:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Setup-screen-screen-example-using-a-custom-endpoint/m-p/80229#M14102</guid>
      <dc:creator>LukeMurphey</dc:creator>
      <dc:date>2011-04-13T09:59:03Z</dc:date>
    </item>
  </channel>
</rss>

