integrating nagios with jira

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
taruk
Posts: 4
Joined: Thu Jan 30, 2020 10:56 am

integrating nagios with jira

Post by taruk »

Hello ,

im working to intergrate nagios with jira ( nagios to open ticket in jira), i have found already a related topic but i could not add a comment cause its closed,

at this stage im just trying to get information from rest api in jira , the problem is i get error with internal error 500 in my nagios box, after some tries with postman i figured out that i need to deactivate ssl verification and and configure global proxy settings in postman,

is there any method to modify the script to get the same configuration,
script that im using :
#!/bin/perl
#
use strict;
use warnings;
use JIRA::REST;
use Data::Dumper;
use LWP::UserAgent;
use IO::Socket::SSL;


use Getopt::Std;
use Getopt::Long qw(:config no_ignore_case bundling);

my $jira = JIRA::REST->new({
url => 'https://x.x.x.x/',
username => "**********",
password => "************"
});
my $baseurl = $jira->GET('/rest/api/latest/issue/INDUS-25408');
print Dumper($baseurl);
Attachments
proxy config.png
ssl_deactivation.png
ssl_deactivation.png (6.32 KiB) Viewed 2148 times
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: integrating nagios with jira

Post by Box293 »

Can you please provide a link to the topic you are referencing?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
taruk
Posts: 4
Joined: Thu Jan 30, 2020 10:56 am

Re: integrating nagios with jira

Post by taruk »

Hello thnx for the reply here the topic that im folowing:
https://support.nagios.com/forum/viewto ... 62&start=0
taruk
Posts: 4
Joined: Thu Jan 30, 2020 10:56 am

Re: integrating nagios with jira

Post by taruk »

@box293 topic followed : https://support.nagios.com/forum/viewto ... 62&start=0
hello after updating my script i could use the api to get a ticket information , the problem now is when i want to post a ticket i got this problem below (see attachements), here is the new code :

#!/bin/perl
#
use strict;
use warnings;
use JIRA::REST;
use Data::Dumper;
use LWP::UserAgent;
use IO::Socket::SSL;


use Getopt::Std;
use Getopt::Long qw(:config no_ignore_case bundling);

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
#my $bot = LWP::UserAgent->new(
# env_proxy => 1,
# keep_alive => 1,
# timeout => 300,
# ssl_opts => {
# verify_hostname => 0,
# SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE },
#);









my $jira = JIRA::REST->new({
url => 'https://jira@',
username => "tchehidi",
password => "*********"
});
#$ua->proxy('http','http://*********:********@*******.201:8080');


#my $baseurl = $jira->GET('/rest/api/latest/issue/INDUS-25408');
#print Dumper($baseurl);







my $issue = $jira->POST('/issue', undef, {
fields => {
project => { key => 'INDUS' },
issuetype => { name => 'Incident' },
"Component/s" => { "Project Monitoring"},
Location => { "Vermeg-Malaren"},
SummaryRequired => "[NAGIOS] Hostname: Service: State:",
Description => "Hostname: Service: State: Info: DateTime:datetime"
},
});
Attachments
create-ticket-jira-ind.PNG
problem post to jira.PNG
taruk
Posts: 4
Joined: Thu Jan 30, 2020 10:56 am

Re: integrating nagios with jira

Post by taruk »

sorry for the time wasting , i resolved the problem , it was the components field it must be an array with the post pethod , thnx
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: integrating nagios with jira

Post by benjaminsmith »

Hello,
sorry for the time wasting , i resolved the problem , it was the components field it must be an array with the post pethod , thnx
Not a problem! Glad it's been resolved.

Thank you for using the Nagios Support Forum.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked