In
nagios plugins written in perl, you got the following error while trying to use
a nagios.
Can't locate utils.pm in
@INC contains: /usr/local/nagios/libexec /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/lib64/nagios/plugins/check_clamav line 33.
|
Just
install the nagios-plugins-perl package to fix the issue if the package is not
installed.
[root@ linuxcnf ~]# yum
install nagios-plugins-perl
|
Then
it will be there:
[root@ linuxcnf ~]# find
/ -name "utils.pm" -type f
/usr/lib64/nagios/plugins/utils.pm
|
And
if the issue still persists, due to a wrong defined library in Perl script. So,
the solution of this problem is quite easy. Just change the defined library
path as below in script:
use lib
"/usr/local/nagios/libexec" ;
|
To
use lib
"/usr/lib/nagios/plugins" ;
|
Now,
it should works.
thanks,
ReplyDeleteworked like a charm!!!!
ReplyDeletethanks!
ReplyDeleteThank you!
ReplyDeleteHi, what is the installation command for Debian/Ubuntu?
ReplyDeletewhere should the change below be made?
ReplyDeleteuse lib "/usr/local/nagios/libexec" ;
To
use lib "/usr/lib/nagios/plugins" ;
Dentro do script, meu caso eu abri o script usando o vi e mudei:
Deletede: use lib "/usr/local/nagios/libexec" ;
para: use lib "/usr/lib/nagios/plugins" ;
perfect!
ReplyDeleteMuito bom! O mais funcional
ReplyDeleteYou don't need to change something, just use the standard environment:
ReplyDeletePERL5LIB=/usr/lib/nagios/plugins check_clamav
or whatever check_* script you want to use