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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

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 Certification at ...

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