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);
integrating nagios with jira
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: integrating nagios with jira
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.
Re: integrating nagios with jira
Hello thnx for the reply here the topic that im folowing:
https://support.nagios.com/forum/viewto ... 62&start=0
https://support.nagios.com/forum/viewto ... 62&start=0
Re: integrating nagios with jira
@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"
},
});
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"
},
});
Re: integrating nagios with jira
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
Hello,
Thank you for using the Nagios Support Forum.
Not a problem! Glad it's been resolved.sorry for the time wasting , i resolved the problem , it was the components field it must be an array with the post pethod , thnx
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!