Perl/Nagios – Can’t locate utils.pm in @INC

While trying to use a Nagios plugin I got an error saying that “Can’t locate utils.pm in @INC”.

Following is complete error:

Can’t locate utils.pm in @INC (@INC contains: /root /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .)

This issue is occurred due wrong library path in Nagios Plugin(Perl Script).

When I checked library path in script its given as ‘use lib “/usr/local/nagios/libexec”;’ where path /usr/local/nagios/libexec is not exists in our os.

All our library’s are available in path “/usr/lib/nagios/plugins”, so I changed lib path in my script to “/usr/lib/nagios/plugins”. After changing the path Nagios Plugin is worked without any issue.

参考:

https://viewsby.wordpress.com/2014/02/20/perlnagios-cant-locate-utils-pm-in-inc/

时间: 2024-10-13 22:22:24

Perl/Nagios – Can’t locate utils.pm in @INC的相关文章

linux centos环境下,perl使用DBD::Oracle遇到报错Can't locate DBDOracle.pm in @INC 的解决办法

前言 接手前辈的项目,没有接触.安装.使用过perl和DBD::Oracle,也没有相关的文档记录,茫茫然不知所措~~.一开始发现这个问题,就想着迅速解决,就直接在google上搜报错信息,搜索的过程中发现 如果不搞清楚前因后果我连解决方案都'看不见''看不懂'. 所以还是要补充这方面的知识,再思考解决方案.以下内容就是我一边学习一边解决问题的过程,如果不足,请各位大佬指出. 报错 install_driver(Oracle) failed: Can't locate DBD/Oracle.pm

Can't locate Switch.pm in @INC

the perl version (5.14) shipped with 12.10 does not include the Switch.pm module needed while building WebKiT-GTK. How to install Perl Switch.pm module required to build WebKit-GTK? If you want to install the Switch.pm Perl module into your system Pe

lnmp升级nginx引起的 nginx:Can't locate nginx.pm 错误

如果启动nginx报错: 正在启动 nginx:Can't locate nginx.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 .). BEGIN failed--compilation aborted. ngi

perl出现"Can't locate getopts.pl"的解决方法

perl出现"Can't locate getopts.pl"的解决方法. 这个错误是因为perl从5.16开始,移除了getopts.pl (http://search.cpan.org/~rjbs/perl-5.16.0/pod/perldelta.pod#Removed_Modules_and_Pragmata) 如何去把这些被移除的模块加回去呢,如果仅仅是将getopts.pl这一个文件添加回去,是不管用的. 我们需要做的是:安装Perl4::CoreLibs这个模块. per

smokeping报错Can't locate RRDs.pm in @INC (@INC contains

安装完smokeping,执行debug语句: ./bin/smokeping --debug-daemon ,提示如下错误: Can't locate RRDs.pm in @INC (@INC contains: /usr/local/smokeping/lib /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/RR

tsung执行时报Can't locate Template.pm的解决

[[email protected] 20141118-0931]# tsung_stats creating subdirectory data creating subdirectory gnuplot_scripts creating subdirectory images warn, last interval (8) not equal to the first, use the first one (10)No data for BoshNo data for MatchNo dat

MySQL高可用之MHA的搭建

MySQL MHA架构介绍: MHA(Master High Availability)目前在MySQL高可用方面是一个相对成熟解决方案,它由日本DeNA公司youshimaton(现就职于Facebook公司)开发,是一套优秀的作为MySQL高可用性环境下故障切换和主从提升的高可用软件.在MySQL故障切换过程中,MHA能做到在0~30秒之内自动完成数据库故障切换操作,并且在进行故障切换的过程中,MHA能在最大程度上保证数据的一致性,以达到真正的高可用. 该软件由两部分组成:MHA Manag

Nagios监控生产环境redis集群服务实战

前言:     以前做了cacti上展示redis性能报表图,可以看到redis的性能变化趋势图,但是还缺了实时报警通知的功能,现在补上这一环节.在redis服务瓶颈或者异常时候即使报警通知,方便dba第一时间处理维护. 1,下载redis监控插件 Redis已经在服务器安装好了,所以直接可以进行监控,redis集群安装请参考:http://blog.itpub.net/26230597/viewspace-1145831/,下载地址为:http://download.csdn.net/deta

nagios 监控 cisco 交换机

nagios 监控  cisco 交换机 一.环境:        1.已搭建好nagios4.0.8        2.Centos6.5 x86_64 二.需要有4个监控cisco的脚本check_snmp_cisco_ifstatus   check_snmp_cisco_loadavgcheck_snmp_cisco_memutilcheck_snmp_env下载链接:http://down.51cto.com/data/2118262 三.配置vim /usr/local/nagios