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语言 · 分分钟的碎碎念
算法提高 分分钟的碎碎念 时间限制:1.0s 内存限制:256.0MB 问题描述 以前有个孩子,他分分钟都在碎碎念.不过,他的念头之间是有因果关系的.他会在本子里记录每一个念头,并用 ...
- 数据库并发事务控制四:postgresql数据库的锁机制二:表锁 <转>
在博文<数据库并发事务控制四:postgresql数据库的锁机制 > http://blog.csdn.net/beiigang/article/details/43302947 中后面提 ...
- python多线程生产消费
#!/usr/bin/env python# -*- coding: utf-8 -*- from threading import Threadfrom Queue import Queueimpo ...
- SpringBoot2 上传文件 上传多文件
项目结构: 1.单文件上传 upload.html <!DOCTYPE html> <html lang="en"> <head> <me ...
- ubuntu下IDEA配置tomcat报错Warning the selected directory is not a valid tomcat home
产生这个问题的主要原因是文件夹权限问题. 可以修改文件夹权限或者更改tomcat文件目录所有者. 这里我直接变更tomcat文件夹所有者: sudo chown -R skh:skh tomcat-/ ...
- Mybatis if标签判断大小
1.if标签语法 <select...> SQL语句1 <if test="条件表达式"> SQL语句2 </if> </select&g ...
- TiDB 源码阅读系列文章(一)序
原创: 申砾 PingCAP 2018-02-28 在 TiDB DevCon2018 上,我们对外宣布了 TiDB 源码阅读分享活动,承诺对外发布一系列文章以及视频帮助大家理解 TiDB 源码.大 ...
- kindle书摘-活着-余华-活着不易,珍惜
https://github.com/starrtc/android-demo 中文版自序 标注(黄色) - 位置 29 作家的使命不是发泄,不是控诉或者揭露,他应该向人们展示高尚.这里所说的高尚不 ...
- js json处理 双引号
在数据传输流程中,json是以文本,即字符串的形式传递的,而JS操作的是JSON对象 JSON字符串: var str1 = '{ "name": "cxh", ...
- R-table和tapply函数
table可统计数据的频数 tapply可根据因子.向量和要计算的函数计算 > class<-c(1,2,3,2,1,2,1,3) > class[1] 1 2 3 > c(8 ...