-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't locate object method "new" via package "Monitoring::Plugin" #147
Comments
how did you download it? exact url please? seems you did not download release version as described in README: but rather unreleased dev version neither i can figure out how you ran the code if you used git checkout: i.e what command did exactly do you run the release version of this plugin is self contained, you do not need to modify any file or install dependencies. |
a note to users who don't bother to read install doc and expect things to work. #147
Hey, Thanks for your response, and sorry for mine's almost 3 weeks late, was on vacation... Downloaded the 4.0.2 realease and got the same lib issue, but after updating the path, it seems to work fine :) Thomas |
err. what? what lib issue? what same? don't know what you're talking about if you don't show what was error and what you modified ( |
yes of course, sorry. Nothing much, but the plugin couldn't find perl's plugin in lib/App/Monitoring/etc... I ain't a linux expert, so I can be confusing and messy, sorry about that. |
err, wtf. i think you still downloaded wrong version. exact url please, which i already asked! and by showing error, i do not need to hear "bla bla, etc" i need exact errors, copy-pasted to comment form here. do not omit anything because you'll likely omit the part i want to see. and use backticks block when pasting:
|
Alright, here's the exact info : actions done :
if I verify :
the problem seems to be coming from the script looking for Plugin.pm in:
when it's in
I hope that it's what you wanted from me :) If you want me to do specific actions, please tell me |
Right, that's it :) Will know next time, thx for your patience and advices... I'll download it right away |
the error you are getting: if you wish to run the plugin using source code, you must install dependencies listed in
|
Yes, it makes sense... Oh, all right, it'll be cleaner than what I did haha thx a lot for all these infos :) |
oh, and http://dictionary.cambridge.org/grammar/british-grammar/nouns-countable-and-uncountable :D |
mmmmmmh, damn. I wrote too fast :D |
Hi,
I just downloaded this plugin in order to link it with Eyes of network 4.2 (Nagios Core 3.5.1).
I encountered a few problems concerning libs and such but got it fixed. Now the problem seems like perl don't find the package Monitoring::Plugin which is strange because the use Monitoring::Plugin at the beginning of the check_raid.pl which is supposed to verify it, right? Or it would cancel the script if not found.
I'm just only beginning with perl so please correct me if I'm talking nonsense.
Anyway, I just had to modify the following lines of the check_raid.pl in order to get it to start :
!/usr/bin/perl
use lib '/home/nagios/nagios-plugin-check_raid-master/lib/App';
use Monitoring::Plugin@0.37;
use Monitoring::Plugin::CheckRaid;
use Monitoring::Plugin::CheckRaid::Sudoers;
use Monitoring::Plugin::CheckRaid::Plugin;
use Monitoring::Plugin::CheckRaid::Utils;
It is now starting but I got the following error :
./check_raid.pl -S
Subroutine program_names redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 37.
Subroutine commands redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 42.
Subroutine sudo redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 49.
Subroutine new redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 54.
Subroutine active redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 99.
Subroutine status redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 112.
Subroutine set_critical_as_warning redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 121.
Subroutine warning redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 127.
Subroutine critical redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 135.
Subroutine unknown redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 143.
Subroutine ok redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 150.
Subroutine resync redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 158.
Subroutine check_status redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 166.
Subroutine spare redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 174.
Subroutine bbulearn redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 182.
Subroutine cache_fail redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 190.
Subroutine bbu_monitoring redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 197.
Subroutine message redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 207.
Subroutine perfdata redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 217.
Subroutine longoutput redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 227.
Subroutine join_status redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 243.
Subroutine valid redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 261.
Subroutine format_bytes redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 276.
Subroutine nosudo_cmd redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 296.
Subroutine cmd redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Plugin.pm line 318.
Subroutine which redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Utils.pm line 26.
Subroutine find_sudo redefined at /home/nagios/nagios-plugin-check_raid-master/lib/App/Monitoring/Plugin/CheckRaid/Utils.pm line 36.
Can't locate object method "new" via package "Monitoring::Plugin" (perhaps you forgot to load "Monitoring::Plugin"?) at ./check_raid.pl line 16.
Line 16 corresponding to these :
my $mp = Monitoring::Plugin->new(
usage =>
"Usage: %s [-h] [-V] [-S] [list of devices to ignore]",
);
I made sure I had downloaded the right version of Monitoring::Plugin by using the following command : cpanm Monitoring::Plugin@0.37
What did I do wrong?
Thanks a lot for your responses
Thomas
The text was updated successfully, but these errors were encountered: