Can you create Jira tickets from LibreNMS?

We are using LibreNMS to monitor our network system and would like to create tickets in Jira via the API transport in LibreNMS. If anyone has an experience with this it, could you share it?

Should be pretty trivial to implement, I believe.

We want to use API Transport, not email. Do you have an example you could share? Thx.

Yes I’m aware, it is not yet implemented. But I had a quick look and it looked rather trivial.

Hi there,
I’ve sent a pull request for Jira transport. And if you can test it, it would be great!

Thanks

Hello! Thank you! I got all the changes and I can see Jira transport added to Alerting settings. I will test now thicket creation in Jira.

Hi,

We generated event for device down and we don’t see anything being sent to JIRA.
We are using non-standard port. i.e. 8080 but it seems like librenms does not seem to take that option. Should we specify an escape character or something? Do you have any suggestions where else we can check? Thanks a lot!

You made sure you don’t have mandatory fields in the Issue create screen other than summary and description didn’t you?
Can you also check access logs under $JIRA_HOME/logs/ to see if see anything from LibreNMS IP.
Any other port shouldn’t matter as long as you write is as http://JIRA_HOST:8080
Also you don’t need to wait for any alerts, you can just click Test Transport button to see if it works.

Hi,
Thank you for your quick reply.
The only mandatory field in the issue create screen is Summary. I checked the access log and this is the logging I see:
10.100.0.196 680x20905x1 opennms [18/Jul/2017:11:20:02 -0400] “POST /rest/api/latest/issue HTTP/1.1” 400 79 85 “-” “-” “17envp4”

We use userid: opennms but the POST is from LibreNMS (Test Transport).
We are not using port in the URL since we took the port requirement off by NATing it. It should not be a problem, I think. Do you have any suggestion? Thanks again.

Hi, it is working now, the test is creating a ticket. Thank you!

Hi There,

I have one more question. Running Test Transport created a ticket in Jira. However, when the host was down, notification alert came through but not in JIRA. Do I need to update Transports.md file with our settings?

~

$config['alert']['transports']['jira']['url']   = 'https://myjira.mysite.com';
$config['alert']['transports']['jira']['username']  = 'myjirauser';
$config['alert']['transports']['jira']['password'] = 'myjirapass';
$config['alert']['transports']['jira']['prjkey'][]  = 'JIRAPROJECTKEY';
$config['alert']['transports']['jira']['issuetype'][]  = 'Myissuetype';

Thanks.

It should trigger it as long as it is configured in global settings in the web ui. Could you check librenms.log file?

It is configured in Global settings. Below is the logging from librenms.log file.

/opt/librenms/discovery.php new 2017-07-17 16:50:01 - 0 devices discovered in 0.004 secs
/opt/librenms/poller.php 9 2017-07-17 16:50:03 - 1 devices polled in 2.047 secs
/opt/librenms/poller.php 8 2017-07-17 16:50:03 - 1 devices polled in 2.086 secs
/opt/librenms/poller.php 3 2017-07-17 16:50:03 - 1 devices polled in 2.213 secs
/opt/librenms/poller.php 15 2017-07-17 16:50:03 - 1 devices polled in 2.353 secs
/opt/librenms/poller.php 11 2017-07-17 16:50:04 - 1 devices polled in 2.948 secs
/opt/librenms/poller.php 12 2017-07-17 16:50:05 - 1 devices polled in 3.707 secs
/opt/librenms/poller.php 13 2017-07-17 16:50:05 - 1 devices polled in 3.770 secs
/opt/librenms/poller.php 5 2017-07-17 16:50:08 - 1 devices polled in 7.069 secs
/opt/librenms/poller.php 7 2017-07-17 16:50:14 - 1 devices polled in 12.63 secs
/opt/librenms/poller.php 6 2017-07-17 16:50:19 - 1 devices polled in 18.00 secs
/opt/librenms/poller.php 14 2017-07-17 16:50:24 - 1 devices polled in 22.61 secs
/opt/librenms/poller.php 4 2017-07-17 16:50:24 - 1 devices polled in 22.73 secs

I’ve created another pull request which adds entries to eventlog and then you can see the errors (if any).
Another thing is @laf has another pull request which enables command line transport testing. And also I’ll have more tests with my jira installation and let you know

I think I’ve resolved it. Please test it with pr #7059

1 Like

Thank you. It’s working now. Greatly appreciated!

If the LibreNMS can generate email or REST calls, then yes, it can easily create JIRA issues.