Splunk Dev

Why am I getting an error running my custom generating command locally on a search head with streaming=True?

bmacias84
Champion

My custom GeneratingCommand command seems to break when trying set command to local on a search head with streaming=True.

\@Configuration(streaming=True,local=True)
class mycustomcommand(GeneratingCommand):
"""
Class used to generate stream data from remote system
"""
jql = Option(
doc='''Syntax: jql=
Description: JQL query string ''')
maxresults = Option(
doc='''Syntax: maxresults=

Command works on stand-alone instance, but fails when adding *streaming=True.

Looking for assistance.

Python SDK Version 1.3.0
Splunk 6.2

Output:
11-20-2014 16:02:54.808 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': Traceback (most recent call last):
11-20-2014 16:02:54.808 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': File "$SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py", line 74, in
11-20-2014 16:02:54.808 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': class mycustomcommandCommand(GeneratingCommand):
11-20-2014 16:02:54.808 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': File "$SPLUNK_HOME/etc/apps/zcommands/bin/splunklib/searchcommands/decorators.py", line 60, in call
11-20-2014 16:02:54.809 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': settings=self.settings)
11-20-2014 16:02:54.809 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': File "$SPLUNK_HOME/etc/apps/zcommands/bin/splunklib/searchcommands/search_command_internals.py", line 65, in init
11-20-2014 16:02:54.809 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': 'The value of configuration setting %s is managed' % name)
11-20-2014 16:02:54.809 ERROR ScriptRunner - stderr from '$SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/zcommands/bin/mycustomcommand.py GETINFO jql="project=SPLK"': AttributeError: The value of configuration setting streaming is managed

0 Karma
1 Solution

bmacias84
Champion

I believe this has something to do with search_command_internals.py.

I was able to over come this issue by settings local=true and streaming=true with the commands.conf.

View solution in original post

bmacias84
Champion

I believe this has something to do with search_command_internals.py.

I was able to over come this issue by settings local=true and streaming=true with the commands.conf.

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...