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 ...
随机推荐
- C语言 · C++中map的用法详解
转载自:http://blog.csdn.net/sunquana/article/details/12576729 一.定义 (1) map<string, int> Map ...
- s9303这样的arp表是代表什么意思?
s9303这样的arp表是代表什么意思? 在s9303交换机下dis arp 看到了最末2条有这样的记录 那个Incomplete 是什么意思呢? 答: 如果该字段显示为“Incomplete”,表示 ...
- android开发(43) 动画演示,会跑的小人,从屏幕左侧跑到右侧
想做一个动画,一个会跑的小人,从屏幕右侧跑道右侧,于是做了个尝试,上图: 要完成这样需要三步: 1. 做一个 帧动画 (frame animation),由多张图片组成,组成小人连续跑动的样子. 2. ...
- 安卓程序代写 网上程序代写[原]C语言基础
C 作者:han1202012 发表于2013-11-1 19:53:29 原文链接 阅读:28 评论:0 查看评论
- 深入浅出SIP协议
传统电话是电磁波的通信,当电话技术发展到IP技术时代,SIP协议成为了电话通信标准协议,不仅可以通电话.还可以收发信息.视频.开会.放PPT.事实上,今天的通信业已全面采用SIP协议作为通信标准,无论 ...
- Item is not readable svn: 条目不可读
问题:svn 查看资源历史记录失败 ,并提示"Item is not readable" 解决: 配置目录权限时如: [/]tangtx=rwyangcx=rwweishq=rw ...
- (笔记)Linux下C语言实现静态IP地址,掩码,网关的设置
#include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> #include < ...
- C# IEnumerator的使用
迭代器模式是设计模式中行为模式(behavioral pattern)的一个例子,他是一种简化对象间通讯的模式,也是一种非常容易理解和使用的模式.简单来说,迭代器模式使得你能够获取到序列中的所有元素而 ...
- python3 post方式上传文件。
借助第三方库:Requests 其官网地址: http://python-requests.org 官网上写的安装方式:http://docs.python-requests.org/ ...
- linux网络配置练习
查看网卡是否正常安装 命令:lspci |grep Ether 1.修改网卡配置 命令: vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth ...