Following the Nagios installation document:
Code: Select all
# bash -x ./install_vmplugin.bash
+ yum install -y libxml2-devel libxml2 libuuid-devel perl-XML-LibXML perl-Env
Updating Subscription Management repositories.
8 prod 27 kB/s | 2.1 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 43 kB/s | 2.4 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 33 kB/s | 2.8 kB 00:00
Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs) 68 kB/s | 2.8 kB 00:00
Package libxml2-devel-2.9.7-9.el8_4.2.x86_64 is already installed.
Package libxml2-2.9.7-9.el8_4.2.x86_64 is already installed.
Package libuuid-devel-2.32.1-28.el8.x86_64 is already installed.
Package perl-XML-LibXML-1:2.0132-2.el8.x86_64 is already installed.
Package perl-Env-1.04-395.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
+ echo 0
0
+ yum remove perl-Crypt-SSLeay -y
Updating Subscription Management repositories.
No match for argument: perl-Crypt-SSLeay
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
+ echo 0
0
+ export PERL_MM_USE_DEFAULT=1
+ PERL_MM_USE_DEFAULT=1
+ echo 0
0
+ cpan -i App::cpanminus
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 20 Apr 2021 17:17:03 GMT
CPAN: LWP::UserAgent loaded ok (v6.34)
CPAN: Time::HiRes loaded ok (v1.9758)
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.081)
............................................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Tue, 25 Jan 2022 20:29:03 GMT
.............
New CPAN.pm version (v2.29) available.
[Currently running version is v2.18]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /root/.cpan/Metadata
Running install for module 'App::cpanminus'
Fetching with LWP:
http://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz
CPAN: Digest::SHA loaded ok (v6.02)
Fetching with LWP:
http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz ok
'YAML' not installed, will not store persistent state
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20181130)
Configuring M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for App::cpanminus
Writing MYMETA.yml and MYMETA.json
MIYAGAWA/App-cpanminus-1.7044.tar.gz
/usr/bin/perl Makefile.PL -- OK
Running make for M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz
cp lib/App/cpanminus/fatscript.pm blib/lib/App/cpanminus/fatscript.pm
cp lib/App/cpanminus.pm blib/lib/App/cpanminus.pm
cp bin/cpanm blib/script/cpanm
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/cpanm
Manifying 1 pod document
Manifying 2 pod documents
MIYAGAWA/App-cpanminus-1.7044.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/happy_cpantesters.t .. 1/1 # App::cpanminus/1.7044
t/happy_cpantesters.t .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.04 cusr 0.01 csys = 0.08 CPU)
Result: PASS
MIYAGAWA/App-cpanminus-1.7044.tar.gz
/usr/bin/make test -- OK
Running make install
Manifying 1 pod document
Manifying 2 pod documents
Installing /usr/local/share/perl5/App/cpanminus.pm
Installing /usr/local/share/perl5/App/cpanminus/fatscript.pm
Installing /usr/local/share/man/man1/cpanm.1
Installing /usr/local/share/man/man3/App::cpanminus.3pm
Installing /usr/local/share/man/man3/App::cpanminus::fatscript.3pm
Installing /usr/local/bin/cpanm
Appending installation info to /usr/lib64/perl5/perllocal.pod
MIYAGAWA/App-cpanminus-1.7044.tar.gz
/usr/bin/make install -- OK
+ echo 0
0
+ cpanm Crypt::SSLeay --dev
--> Working on Crypt::SSLeay
Fetching http://cpan.metacpan.org/authors/id/N/NA/NANIS/Crypt-SSLeay-0.73_06.tar.gz ... OK
==> Found dependencies: Devel::CheckLib
--> Working on Devel::CheckLib
Fetching http://cpan.metacpan.org/authors/id/M/MA/MATTN/Devel-CheckLib-1.14.tar.gz ... OK
Configuring Devel-CheckLib-1.14 ... OK
==> Found dependencies: Mock::Config, Capture::Tiny
--> Working on Mock::Config
Fetching http://cpan.metacpan.org/authors/id/R/RU/RURBAN/Mock-Config-0.03.tar.gz ... OK
Configuring Mock-Config-0.03 ... OK
Building and testing Mock-Config-0.03 ... OK
Successfully installed Mock-Config-0.03
--> Working on Capture::Tiny
Fetching http://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz ... OK
Configuring Capture-Tiny-0.48 ... OK
Building and testing Capture-Tiny-0.48 ... OK
Successfully installed Capture-Tiny-0.48
Building and testing Devel-CheckLib-1.14 ... OK
Successfully installed Devel-CheckLib-1.14
Configuring Crypt-SSLeay-0.73_06 ... OK
==> Found dependencies: Bytes::Random::Secure
--> Working on Bytes::Random::Secure
Fetching http://cpan.metacpan.org/authors/id/D/DA/DAVIDO/Bytes-Random-Secure-0.29.tar.gz ... OK
Configuring Bytes-Random-Secure-0.29 ... OK
==> Found dependencies: Math::Random::ISAAC, Crypt::Random::Seed
--> Working on Math::Random::ISAAC
Fetching http://cpan.metacpan.org/authors/id/J/JA/JAWNSY/Math-Random-ISAAC-1.004.tar.gz ... OK
Configuring Math-Random-ISAAC-1.004 ... OK
==> Found dependencies: Test::NoWarnings
--> Working on Test::NoWarnings
Fetching http://cpan.metacpan.org/authors/id/H/HA/HAARG/Test-NoWarnings-1.06.tar.gz ... OK
Configuring Test-NoWarnings-1.06 ... OK
Building and testing Test-NoWarnings-1.06 ... OK
Successfully installed Test-NoWarnings-1.06
Building and testing Math-Random-ISAAC-1.004 ... OK
Successfully installed Math-Random-ISAAC-1.004
--> Working on Crypt::Random::Seed
Fetching http://cpan.metacpan.org/authors/id/D/DA/DANAJ/Crypt-Random-Seed-0.03.tar.gz ... OK
Configuring Crypt-Random-Seed-0.03 ... OK
==> Found dependencies: Crypt::Random::TESHA2
--> Working on Crypt::Random::TESHA2
Fetching http://cpan.metacpan.org/authors/id/D/DA/DANAJ/Crypt-Random-TESHA2-0.01.tar.gz ... OK
Configuring Crypt-Random-TESHA2-0.01 ... OK
Building and testing Crypt-Random-TESHA2-0.01 ... OK
Successfully installed Crypt-Random-TESHA2-0.01
Building and testing Crypt-Random-Seed-0.03 ... OK
Successfully installed Crypt-Random-Seed-0.03
Building and testing Bytes-Random-Secure-0.29 ... OK
Successfully installed Bytes-Random-Secure-0.29
Building and testing Crypt-SSLeay-0.73_06 ... OK
Successfully installed Crypt-SSLeay-0.73_06
9 distributions installed
+ echo 0
0
+ cpan -i Nagios::Monitoring::Plugin Nagios::Monitoring::Plugin::Functions
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 25 Jan 2022 20:29:03 GMT
CPAN: Module::CoreList loaded ok (v5.20181130)
Nagios::Monitoring::Plugin is up to date (0.51).
Nagios::Monitoring::Plugin::Functions is up to date (0.51).
+ echo 0
0
Code: Select all
su - nagios -c '/usr/local/nagios/libexec/check_wmi_plus.pl -H <ip> -u <username> -p <password> -m checkdrivesize -a C\: -w 88 -c 95'
Can't locate Devel/StackTrace.pm: /usr/local/share/perl5/Devel/StackTrace.pm: Permission denied at /usr/share/perl5/vendor_perl/Specio/Exception.pm line 12.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Specio/Exception.pm line 12.
Compilation failed in require at /usr/share/perl5/vendor_perl/Specio/Constraint/Role/Interface.pm line 11.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Specio/Constraint/Role/Interface.pm line 11.
Compilation failed in require at /usr/share/perl5/vendor_perl/Role/Tiny.pm line 52.
Compilation failed in require at /usr/share/perl5/vendor_perl/Specio/Declare.pm line 12.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Specio/Declare.pm line 12.
Compilation failed in require at /usr/lib64/perl5/vendor_perl/DateTime/Types.pm line 12.
BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/DateTime/Types.pm line 12.
Compilation failed in require at /usr/lib64/perl5/vendor_perl/DateTime/Duration.pm line 12.
BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/DateTime/Duration.pm line 12.
Compilation failed in require at /usr/lib64/perl5/vendor_perl/DateTime.pm line 14.
BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/DateTime.pm line 14.
Compilation failed in require at /usr/local/nagios/libexec/check_wmi_plus.pl line 57.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_wmi_plus.pl line 57.
+ echo 2
2
+ exit
Code: Select all
# yum reinstall -y perl-Devel-StackTrace
Updating Subscription Management repositories.
8 prod 22 kB/s | 2.1 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 49 kB/s | 2.4 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 38 kB/s | 2.8 kB 00:00
Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs) 28 kB/s | 2.8 kB 00:00
Dependencies resolved.
========================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================
Reinstalling:
perl-Devel-StackTrace noarch 1:2.03-2.el8 codeready-builder-for-rhel-8-x86_64-rpms 35 k
Transaction Summary
========================================================================================================================================================
Total download size: 35 k
Installed size: 47 k
Downloading Packages:
perl-Devel-StackTrace-2.03-2.el8.noarch.rpm 322 kB/s | 35 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------
Total 304 kB/s | 35 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Reinstalling : perl-Devel-StackTrace-1:2.03-2.el8.noarch 1/2
Cleanup : perl-Devel-StackTrace-1:2.03-2.el8.noarch 2/2
Running scriptlet: perl-Devel-StackTrace-1:2.03-2.el8.noarch 2/2
Verifying : perl-Devel-StackTrace-1:2.03-2.el8.noarch 1/2
Verifying : perl-Devel-StackTrace-1:2.03-2.el8.noarch 2/2
Installed products updated.
Reinstalled:
perl-Devel-StackTrace-1:2.03-2.el8.noarch