nagios安装check_linux_stats.pl插件报错Can't locate Sys/Statistics/Linux.pm in @INC的处理?
问题描述:
今天想有没有监控主机内存的插件可以供nagios来使用,然后找到一个插件check_linux_stats.pl
但是在将脚本上传之后,执行的时候报错
[root@testvm02 libexec]# ./check_linux_stats.pl -T -w -c -p /var/run/jonas.pid
Can't locate Sys/Statistics/Linux.pm in @INC (@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 ./check_linux_stats.pl line 35.
BEGIN failed--compilation aborted at ./check_linux_stats.pl line .
处理过程:
1.通过以上分析应该是少了perl的模块,下载perl-Sys-Statistics-Linux-0.59-3.el6.noarch.rpm软件包,并且安装
[root@testvm03 software]# rpm -ivh perl-Sys-Statistics-Linux-0.59-.el6.noarch.rpm
warning: perl-Sys-Statistics-Linux-0.59-.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
error: Failed dependencies:
perl(Time::HiRes) is needed by perl-Sys-Statistics-Linux-0.59-.el6.noarch
备注:通过以上信息,发现又少了依赖包perl-Time-HiRes-1.9721-144.el6.x86_64.rpm
perl-Sys-Statistics-Linux RPM包下载地址:
http://rpmfind.net/linux/epel/6/x86_64/Packages/p/perl-Sys-Statistics-Linux-0.59-3.el6.noarch.rpm
2.下载并且安装perl-Time-HiRes-1.9721-144.el6.x86_64.rpm(这个RPM包在系统镜像ISO里面有)
[root@testvm03 software]# rpm -ivh perl-Time-HiRes-1.9721-.el6.x86_64.rpm
warning: perl-Time-HiRes-1.9721-.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [%]
:perl-Time-HiRes ########################################### [%]
再安装perl-Sys-Statistics包:
[root@testvm03 software]# rpm -ivh perl-Sys-Statistics-Linux-0.59-.el6.noarch.rpm
warning: perl-Sys-Statistics-Linux-0.59-.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [%]
:perl-Sys-Statistics-Lin########################################### [%]
备注:脚本执行需要依赖的软件包安装完成.
3.执行脚本(插件命令)
[root@testvm03 libexec]# ./check_linux_stats -M -w , -c , #备注:原脚本后缀为.pl,为了使用方便已经通过mv将后缀去掉了.
MEMORY OK : Mem used: 6.96%, Swap used: 0.00% |MemUsed=6.96%;; SwapUsed=0.00%;; MemCached=5.58% SwapCached=0.00% Active=4.11%
备注:命令执行成功,那么就可以把这个脚本加入nagios的命令中了.
插件check_linux_stats/details地址(下载和基本使用):
https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_linux_stats/details
文档创建时间:2018年8月14日11:03:38
nagios安装check_linux_stats.pl插件报错Can't locate Sys/Statistics/Linux.pm in @INC的处理?的更多相关文章
- ubuntu16.04安装库、插件报错:
安装一些插件.库,遇到报错 Could not fetch URL https://pypi.org/simple/pytest-pycodestyle/: There was a problem c ...
- Eclipse4.4安装旧版本插件报错 Failed to prepare partial IU
Failed to prepare partial IU: [R]com.googlecode.veloeclipse.ui 2.0.8. work around: go to Help -> ...
- adcfgclone.pl appsTier报错Unable to locate 'linkxlC' utility in path
$ cd /u01/dev/apps/apps_st/comn/clone/bin$ perl adcfgclone.pl appsTier Copyrigh ...
- linux安装软件报错: Can't locate ExtUtils/Embed.pm in @INC...
安装snmp服务, 中间报错: Can't locate ExtUtils/Embed.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/l ...
- sublime 安装插件报错
sublime 安装插件报错,大部分原因是本地防火墙开启了,关闭本地防火墙
- vscode安装dlv插件报错:There is no tracking information for the current branch.
vscode安装dlv插件报错:There is no tracking information for the current branch. https://blog.csdn.net/a7859 ...
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决办法。
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...
- 安装Oracle 11gR2,报错:[INS-06101] IP address of localhost could not be determined
安装Oracle 11gR2,报错:[INS-06101] IP address of localhost could not be determined 出现这种错误是因为主机名和/etc/host ...
- npm不能安装任何包,报错:npm WARN onload-script failed to require onload script npm-autoinit/autoinit及解决方法
想要利用Hexo搭建一个博客,但是安装时npm一直报错,不仅仅是Hexo包,连别的其他包也不行,会提示下面的一堆错误 npm WARN onload-script failed to require ...
随机推荐
- ContentType和@ResponseBody
ContentType 为 application/x-www-form-urlencoded (表单)时,入参前不需要加@ResponseBody: ContentType 为 applicatio ...
- 【转】WKT、SRID、EPSG概念
http://www.cnblogs.com/jackdong/archive/2010/12/20/1911558.html 之前一直对WKT.EPSG.SRID不是很理解,总是混淆,今天看了一下, ...
- 安装redis出现cc adlist.o /bin/sh:1:cc:not found
安装redis时 提示执行make命令时, 提示 CC adlist.o /bin/sh: cc: 未找到命令 问题原因:这是由于系统没有安装gcc环境,因此在进行编译时才会出现上面提示,当安装好gc ...
- 【html】关于锚点的一些事
今天修改公会系统,有用到锚点对页面位置进行控制,结果碰到了一些问题,通过查询相关资料解决了,在这里总结下. 两种方法跳转到锚点: 1.给锚点添加 name 属性和 id 属性.一般只要加 name 就 ...
- Ubuntu下的OpenResty 安装
安装前的准备 您必须将这些库 perl 5.6.1+, libreadline, libpcre, libssl安装在您的电脑之中. 对于 Linux来说, 您需要确认使用 ldconfig 命令,让 ...
- linux,chmod如何更改所有子目录的权限,要包括隐藏文件
for file in `find . -print` do chmod 777 -R $file done
- Linux共享库 zlog日志
[ global] strict init = false buffer min = buffer max = 2MB rotate lock file= /tmp/zlog.lock [format ...
- postman-记录cookies信息
接口:赞我的列表,get请求,要登陆用户信息 http://v80.pcauto.com.cn/xsp/s/auto/info/nocache/club/getPraiseMyDynas.xsp?pa ...
- (笔记)如何安装Arm-linux-gcc
如何安装Arm-linux-gcc 安装交叉编译工具链: 1.首先以root用户登入 2.复制arm-linux-gcc-4.3.2.tgz到根目录下tmp文件夹里 3.解压命令tar xvz ...
- JDBC排序数据实例
在本教程将演示如何在JDBC应用程序中,从数据库表中查询数据记录,在查询语句中将使用asc和desc关键字按升序或降序对记录进行排序.在执行以下示例之前,请确保您已经准备好以下操作: 具有数据库管理员 ...