All Apps and Add-ons

JIRA App for Splunk - Error: command="jira", Invalid expression

sureshprem
New Member

We are trying to use the JIRA app fro Splunk after we saw the tool utilization at Splunk Conference Conf13. We have installed the Apps as per documentation, and we get an error message when we search in Splunk.

Apps: http://apps.splunk.com/app/1438/
Error Message: command="jira", Invalid expression
search: | jira "project = COR"

jira.conf:
[jira]
default_project = COR
tempMax = 1000

Built-in fields to display. Updated is required if you want a _time field.

keys = link,project,key,summary,type,priority,status,resolution,assignee,reporter,created,updated,resolved,fixVersion,components

Fields containing times to display.

time_keys =

Custom fields to display.

config.ini:
[jira]
hostname = xxxxx-test.tool.x.xxxx.com (part of FQDN masked)
username = splunk
password = xxxxxxx (password masked)

Tags (1)
0 Karma

ruman
Splunk Employee
Splunk Employee

There were some new config.ini fields added in issue #13. Please try adding these defaults to your config.ini:

jira_protocol = https
jira_port = 443
soap_protocol = https
soap_port = 8080

0 Karma

ruman
Splunk Employee
Splunk Employee

Wonderful! I'm so happy it's working. Please let me know if you run into any other issues, or have any ideas for new features.

0 Karma

sureshprem
New Member

Many Thanks for your help.

0 Karma

sureshprem
New Member

I had moved the old jira directory as jira.OLD (sysadmin paranoid factor) and this may be have been causing the issues, and after I removed that directory, now I am able to run basic JQL queries on JIRA server

0 Karma

ruman
Splunk Employee
Splunk Employee

Did you restart splunk after editing config.ini. I was able to reproduce, and also confirm that a restart is required.

0 Karma

sureshprem
New Member

Hi,

Even after adding the new variables in config.ini I get the same error:

Error: command="jira", No option 'jira_protocol' in section: 'jira'

config.ini:
[jira]
hostname = intake-test.tool.s.nokia.com
username = splunk
password = xxxxxxxxx
jira_protocol = https
jira_port = 443
soap_protocol = https
soap_port = 8080

0 Karma

ruman
Splunk Employee
Splunk Employee

I just pushed a fix to github. Please pull, or apply these changes:

https://github.com/firebus/splunk-jira/commit/bad727cc88b8dca2b2263be1a000de072dc9027a

0 Karma

sureshprem
New Member

I pulled the changes and now get a different error:

command="jira", No option 'jira_protocol' in section: 'jira'

0 Karma

sureshprem
New Member

I followed the advice per "enthusiast" and added code in jira.py

if not time_keys:  <-- Added line 
     for k in time_keys:
        v = elem.xpath(k)
logger.info(k)  <-- Added line
        if len(v) == 1:
           row[k] = v[0].get("seconds")

now I get a different error message on the search '| jira "project = COR"

Error:
External search command 'jira' returned error code 1

0 Karma

ruman
Splunk Employee
Splunk Employee

This sounds like an issue with time_keys being empty that was reported in https://github.com/firebus/splunk-jira/issues/13 which I haven't had a chance to verify yet.

You can try the workaround suggested by enthusiast near the end of the thread. I will verify, open a new issue, and fix ASAP.

0 Karma

sureshprem
New Member

I followed the advice per "enthusiast" and added code in jira.py

if not time_keys: <-- Added line
for k in time_keys:
v = elem.xpath(k)
logger.info(k) <-- Added line
if len(v) == 1:
row[k] = v[0].get("seconds")
now I get a different error message on the search '| jira "project = COR"

Error:
External search command 'jira' returned error code 1

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...