PERL Scripts are not working
Posted: Wed Apr 13, 2016 6:50 pm
Hi Guys,
I am trying to migrate few services from Nagios Core 3.5.1 to NagiosXI 5.2.7
The Plugins used in the services are written in Perl (i guess as they have .pl extension) those scripts are not working in NagiosXI
e.g
At NagiosXI
I am unable to pin point the problem here:S may be it is something with Database or some back-end dependencies (like i said, Novice)
Also there are services for Voice traffic as well to gauge the MOS score and concurrent calls & call failures which i can not move because of this Perl thing.
Can't find any plugin for such in NagiosXI. Services based on perl scripts are working fine in Old Nagios Core.
Can any one please help me here.
Thanks!!
I am trying to migrate few services from Nagios Core 3.5.1 to NagiosXI 5.2.7
The Plugins used in the services are written in Perl (i guess as they have .pl extension) those scripts are not working in NagiosXI
e.g
Only thing i can see with my novice knowledge is :[root@nagiosxi libexec]# ./check_sql-query.pl -u XXXX -p @@@@ -h x.x.x.x -d Monitor -w 0:100 -c 0:250 -s 'SELECT top 1 Noupload FROM Switchmonitor order by TrafficDate Desc' -T MSSQL
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 3) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql.
at ./check_sql-query.pl line 310
At NagiosXI
[root@nagiosxi libexec]# locate ODBC.pm
/usr/lib64/perl5/DBI/Const/GetInfo/ODBC.pm
[root@nagiosxi libexec]#
At Nagios Core[root@nagiosxi libexec]# perl -version
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Copyright 1987-2009, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
monica2 plugins # locate ODBC.pm
/root/.cpan/build/DBD-ODBC-1.29-brm9xO/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.29-yfwSzG/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.29-yfwSzG/blib/lib/DBD/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.33-D3t59s/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.33-D3t59s/blib/lib/DBD/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.45-220YiI/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.45-220YiI/blib/lib/DBD/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.45-HRYwZV/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.45-HRYwZV/blib/lib/DBD/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.48-6NK3Ec/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.48-6NK3Ec/blib/lib/DBD/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.50-yGlFGn/ODBC.pm
/root/.cpan/build/DBD-ODBC-1.50-yGlFGn/blib/lib/DBD/ODBC.pm
/root/.cpan/build/DBI-1.633-Wnl5Eq/blib/lib/DBI/W32ODBC.pm
/root/.cpan/build/DBI-1.633-Wnl5Eq/blib/lib/DBI/Const/GetInfo/ODBC.pm
/root/.cpan/build/DBI-1.633-Wnl5Eq/blib/lib/Win32/DBIODBC.pm
/root/.cpan/build/DBI-1.633-Wnl5Eq/lib/DBI/W32ODBC.pm
/root/.cpan/build/DBI-1.633-Wnl5Eq/lib/DBI/Const/GetInfo/ODBC.pm
/root/.cpan/build/DBI-1.633-Wnl5Eq/lib/Win32/DBIODBC.pm
/usr/lib64/perl5/vendor_perl/5.20.2/x86_64-linux/DBI/W32ODBC.pm
/usr/lib64/perl5/vendor_perl/5.20.2/x86_64-linux/DBI/Const/GetInfo/ODBC.pm
/usr/lib64/perl5/vendor_perl/5.20.2/x86_64-linux/Win32/DBIODBC.pm
/usr/local/lib64/perl5/5.16.3/x86_64-linux/DBD/ODBC.pm
/usr/local/lib64/perl5/5.18.2/x86_64-linux/DBD/ODBC.pm
/usr/local/lib64/perl5/5.20.2/x86_64-linux/DBD/ODBC.pm
/usr/local/lib64/perl5/5.20.2/x86_64-linux/DBI/W32ODBC.pm
/usr/local/lib64/perl5/5.20.2/x86_64-linux/DBI/Const/GetInfo/ODBC.pm
/usr/local/lib64/perl5/5.20.2/x86_64-linux/Win32/DBIODBC.pm
monica2 plugins #
I have run through google, tried updating Perl by CPAN(Sigh!! know nothing about it just followed some tutorial), had no luck. Thankfully had the snapshotmonica2 plugins # perl -version
This is perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-linux
(with 27 registered patches, see perl -V for more detail)
Copyright 1987-2015, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
monica2 plugins #
I am unable to pin point the problem here:S may be it is something with Database or some back-end dependencies (like i said, Novice)
Also there are services for Voice traffic as well to gauge the MOS score and concurrent calls & call failures which i can not move because of this Perl thing.
Can't find any plugin for such in NagiosXI. Services based on perl scripts are working fine in Old Nagios Core.
Can any one please help me here.
Thanks!!