Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,120
Community Members
 
Community Events
185
Community Groups

Grafana with Jira

Hi,

Does it possible to use Grafana with Jira ?

 

I would like to get some statistics (number of issues and so on... ) in Grafana.

 

I try with plugin "SimpleJSON" and REST API Jira but it doesn't work...

 

 

4 answers

We had the same struggles and never found a solution so I built one. You can use this project to accomplish what you need; https://github.com/bluefrg/jira-grafana-json-datasource

Hi Mike,

The reference is good,but when I try to validate (http://localhost:3000/test-jira) it returns Unauthorized (401) and when I run docker-compose.yml it returns

ERROR: for jira-grafana Cannot start service jira-grafana: driver failed programming external connectivity on endpoint jira-grafana-json-datasource-master_jira-grafana_1 (b8c1646130d2e5a850575dd5c1570a7e5bd570238236a7b835045c469dfd82f1): Bind for 0.0.0.0:3000 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

Hey nimmakayala!

You must have something already using port 3000 on your computer as the error is stating that, it's a common port for many other Docker projects using HTTP;

Bind for 0.0.0.0:3000 failed: port is already allocated

Is this a common error? I've tried both dev and prod Dockerfiles

 

jira-grafana_1 |
jira-grafana_1 | > jira-grafana-json-datasource@1.0.0 start /app
jira-grafana_1 | > node server.js
jira-grafana_1 |
jira-grafana_1 | internal/modules/cjs/loader.js:584
jira-grafana_1 | throw err;
jira-grafana_1 | ^
jira-grafana_1 |
jira-grafana_1 | Error: Cannot find module 'express'
jira-grafana_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
jira-grafana_1 | at Function.Module._load (internal/modules/cjs/loader.js:508:25)
jira-grafana_1 | at Module.require (internal/modules/cjs/loader.js:637:17)
jira-grafana_1 | at require (internal/modules/cjs/helpers.js:22:18)
jira-grafana_1 | at Object.<anonymous> (/app/server.js:1:79)
jira-grafana_1 | at Module._compile (internal/modules/cjs/loader.js:701:30)
jira-grafana_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
jira-grafana_1 | at Module.load (internal/modules/cjs/loader.js:600:32)
jira-grafana_1 | at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
jira-grafana_1 | at Function.Module._load (internal/modules/cjs/loader.js:531:3)
jira-grafana_1 | npm ERR! code ELIFECYCLE
jira-grafana_1 | npm ERR! errno 1
jira-grafana_1 | npm ERR! jira-grafana-json-datasource@1.0.0 start: `node server.js`
jira-grafana_1 | npm ERR! Exit status 1
jira-grafana_1 | npm ERR!
jira-grafana_1 | npm ERR! Failed at the jira-grafana-json-datasource@1.0.0 start script.
jira-grafana_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
jira-grafana_1 | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
jira-grafana_1 |
jira-grafana_1 | npm ERR! A complete log of this run can be found in:
jira-grafana_1 | npm ERR! /root/.npm/_logs/2020-02-20T19_55_04_953Z-debug.log
jiragrafanajsondatasource_jira-grafana_1 exited with code 1

Hello. 

 

I've been trying to get your solution to work. But metrics in grafana doesn't come up. It just says "Bad Gateway" when i use query inspector. 

 

BadGateway.PNG

When I try the localhost it seems to work fine:

 

LocalHo.PNG

Ok if I got everything properly configured and working... how can I fetch or do queries ? sorry for noob question.

Hi  @Mike Frank what version of the Grafana and the plugin you are using. I'm using Grafana 7.2.2 and plugin 1.4.1. All I get when i try to create a dashboard with timeseries is a drop-down list with XML format :( 

I have Grafana 7.3.4 with SimpleJson 1.4.1 and no issues. 

This will not work for self-hosted JIRA instances.

1 vote
Huwen Arnone
Solutions Partner
Solution Partners provide consulting, sales, and technical services on Atlassian products.
Feb 19, 2019

Thanks, but not really...

With this, you monitor the JVM and i want to have more statistics with REST and JQL.

Like # people like this

Hi @Jérôme Brandt,

Any update on your findings for exploring Jira Metrics with REST and JQL?

Also any idea how can I visualize it in Grafana?

Hello,

You can do it by using Json API grafana plugin: https://grafana.com/grafana/plugins/marcusolsson-json-datasource/ 

Then you just need to create a datasource with URL : 


https://<your jsm url>.atlassian.net/rest/api/2/search

 

For authentication we have usedBasic Auth

login :  your email

password : your Api token

Add header: 

Content-Type: application/json

 

Once this is done you can create your dashboard.

I'd like to recommend you to export Jira data to Grafana using Skyvia online data platform (https://skyvia.com/data-integration/analyze-jira-with-grafana). It allows you to load necessary data from Jira to Grafana through a database or a cloud data warehouse of your choice. Using this tool you'll be able to do it automatically, without any coding.

By the way, Skyvia is Jira's partner. You can find them on the Atlassian marketplace.

Hi @Gabe Kressel

Thank you for the suggestion.

Could we get an alternative that is free of cost?

Suggest an answer

Log in or Sign up to answer