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.
Jira-Perl module has been fixed by using above mentioned command.
cpan -i JIRA::REST
Installing /usr/local/share/man/man3/install.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
DAGOLDEN/install-0.01.tar.gz
/usr/bin/make install -- OK
JIRA::REST is up to date (0.019).
But getting below error post running adhoc command
[root@nagios-core /]# /usr/local/nagios/libexec/NagiosIssue2JSD.pl -s "$SERVICESTATE$" -t "$SERVICESTATETYPE$" -A "$SERVICEATTEMPT$" -H "$HOSTNAME$" -S "$SERVICEDESC$" -a "$SERVICEOUTPUT$" -d "$SHORTDATETIME$"
Value "$" invalid for option A (number expected)
USAGE:/usr/local/nagios/libexec/jira_eventhandler.pl -s -t -A -H -S
Kindly confirm if we need to add /usr/local/nagios/libexec/jira_eventhandler.pl configuration file please.
After some modiification in codebase and post resolving some OS and jIra level dependencies ,I am able to generate a jira ticket from Nagios core.Thanks much for your support.
But have little concerns about the $HOSTADDRESS$ parameters and notificationrecipients parameters --> Output unable to get from address directive in $HOSTADDRESS.Please check Description screenshot which i have attached earlier.
Please find the codebase below .
#!/bin/perl
use strict;
use warnings;
use JIRA::REST;
use Data::Dumper;
use Getopt::Std;
use Getopt::Long qw(:config no_ignore_case bundling);
if(!$state or !$type or !$attempt or !$hostname or !$servicedesc) {
print "\tUSAGE:/usr/local/nagios/libexec/jira_eventhandler.pl -s -t -A -H -S \n";
exit 3; #unknown
}
if($type ne "HARD" or $state eq "OK" or $state eq "WARNING" ) {
# not doing anything till its reaaaally a problem
exit 0; #ok
}