I have downloaded the Script check_mountpoint.pl
But when i run the command:
sudo ./check_mountpoint.pl -m /test-mount
It is giving the following error:
==================================================================================
Base class package "Class::Accessor" is empty.
(Perhaps you need to 'use' the module which defines that package first,
or make that module available 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 /usr/local/share/perl5/Nagios/Plugin/Getopt.pm line 13.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Nagios/Plugin/Getopt.pm line 13.
Compilation failed in require at ./check_mountpoint.pl line 15.
BEGIN failed--compilation aborted at ./check_mountpoint.pl line 15.
====================================================================================
Can anyone guide me here how to remove the above error?
Mount Point Monitoring --Base class package "Class::Accessor
-
amitgupta19
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
-
amitgupta19
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Mount Point Monitoring --Base class package "Class::Acce
Can anyone guide me here?
Re: Mount Point Monitoring --Base class package "Class::Acce
There are a couple of different versions of that plugin but it looks like the required perl modules are not installed on your system.
Run the following as root to install them.
If the plugin still fails, post it here so we can view it.
Run the following as root to install them.
Code: Select all
cpan -i Nagios::Plugin::Getopt
cpan -i Nagios::PluginBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Mount Point Monitoring --Base class package "Class::Acce
It might be better to avoid CPAN if possible and use rpm, yum (or apt-get if I recall in Debian). Perl packages that are available are often preceded w/ prl- like so:
yum install perl-nagios-plugin-getopt
or similar would replace the following if it exists.
cpan -i Nagios::Plugin::Getopt
It may require some searching to find packages.
yum list | grep -i perl | grep -i getopt
for example...
CPAN has no remove or some other features of yum/rpm.
yum install perl-nagios-plugin-getopt
or similar would replace the following if it exists.
cpan -i Nagios::Plugin::Getopt
It may require some searching to find packages.
yum list | grep -i perl | grep -i getopt
for example...
CPAN has no remove or some other features of yum/rpm.
Re: Mount Point Monitoring --Base class package "Class::Acce
I don't think the Nagios Plugin Getopt package isn't out there in the main repos but perl-Nagios-Plugin should be.
-
amitgupta19
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Mount Point Monitoring --Base class package "Class::Acce
I resolved it there were lot of packages were missing.
One After Another, i had to install the multiple packages.
Is there a way to avoid such situations, so that i do not get into such situations again.
One After Another, i had to install the multiple packages.
Is there a way to avoid such situations, so that i do not get into such situations again.
Re: Mount Point Monitoring --Base class package "Class::Acce
Unfortunately not, we didn't write the plugin and each plugin has its own requirements that we/you won't know unless you read the plugins documentation (if they list it)/looking at plugin source code OR by doing what you did (which is the same way I do it).Is there a way to avoid such situations, so that i do not get into such situations again.
Thank you