nagios客户端安装:

nagios客户端安装:

环境准备和服务端相差无几,按照服务端的准备即可,但无需lamp 环境


!!!安装插件nagios-plugins-1.4.16.tar.gz 、nrpe-2.12.tar.gz 与服务端一致

#安装一个系统性能的命令

yum install sysstat -y

#安装监控的插件

tar zxf Params-Validate-0.91.tar.gz
cd Params-Validate-0.91
perl Makefile.PL
make
make install

tar zxvf Class-Accessor-0.31.tar.gz
cd Class-Accessor-0.31
perl Makefile.PL
make

make install
cd ../

tar zxvf Config-Tiny-2.12.tar.gz
cd Config-Tiny-2.12
perl Makefile.PL
make
make install
cd ../

tar zxvf Math-Calc-Units-1.07.tar.gz
cd Math-Calc-Units-1.07
perl Makefile.PL
make
make install
cd ..

tar zxvf Regexp-Common-2010010201.tar.gz
cd Regexp-Common-2010010201
perl Makefile.PL
make
make install
cd ..

tar zxvf Nagios-Plugin-0.34.tar.gz
cd Nagios-Plugin-0.34
perl Makefile.PL
make
make install
cd ../

拷贝插件到libexec

cp -ap  check_memory.pl  /usr/local/nagios/libexec/
cp -ap check_iostat  /usr/local/nagios/libexec/

#见附件
授权
chmod 755 /usr/local/nagios/libexec/check_memory.pl
chmod 755 /usr/local/nagios/libexec/check_iostat

编辑配置文件nrpe

备份:cp /usr/local/nagios/etc/nrpe.cfg /usr/local/nagios/etc/nrpe.cfg.ori
sed -i ‘199,203d‘ /usr/local/nagios/etc/nrpe.cfg

添加基本插件调用

echo "command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,6 -c 30,25,20">>/usr/local/nagios/etc/nrpe.cfg
echo "command[check_mem]=/usr/local/nagios/libexec/check_memory.pl -w 6% -c 3%">>/usr/local/nagios/etc/nrpe.cfg
echo "command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 8% -p /">>/usr/local/nagios/etc/nrpe.cfg
echo "command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10%">>/usr/local/nagios/etc/nrpe.cfg
echo "command[check_iostat]=/usr/local/nagios/libexec/check_iostat -w 6 -c 10">>/usr/local/nagios/etc/nrpe.cfg

启动nrpe

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d

#-c 指定配置文件 -d 后台启动

echo "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d">>/etc/rc.local

#设置开机自启动

ss -anp | grep 5666

#查看端口

客户端安装、配置完毕

时间: 2024-10-19 00:34:35

nagios客户端安装:的相关文章

nagios客户端安装与配置windows篇

一.被监控的windows xp客户端的配置 1.安装NSClient++并安装下载地址: http://sourceforge.net/projects/nscplusNSClient++-0.3.8-Win32.msi  NSClient++-0.3.8-x64.msi 2.安装NSClient++双击安装 -> next -> 同意 -> next  -> next -> next -> 设置允许IP,设置密码(这里密码一般可以不设置),Modules to lo

nagios客户端安装监控

1.在客户端机器上安装epel扩展源 yum install -y epel-release2.yum安装nagios及依赖包软件 yum install -y nagios-plugins nagios-plugins-all nrpe nagios-plugins-nrpe3.编辑nrpe配置文件 vim /etc/nagios/nrpe.cfg修改如下:(1)将allowed_hosts=127.0.0.1改为allowed_hosts=127.0.0.1,192.168.81.131.其

LINUX中nagios客户端安装步骤及遇到问题

需安装的软件及插件 服务端服务器 a      nagios-3.2.3,nagios-cn-3.2.3汉化版 nagios-plugins-1.4.15 客户端服务器 b       nrpe-2.12:nagios-plugins-1.4.15 第一步:先创建账号和组 (注意:先确认有没有账号和组,如果没有则需要先创建,若未创建后续无法继续) 第二步:把安装包nrpe-2.12:nagios-plugins-1.4.15 上传至客户端b中,在/usr/local/src中进行解压. 安装na

nagios客户端安装设置

下载安装包 cd /optwget http://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gzwget https://github.com/NagiosEnterprises/nrpe/archive/nrpe-3.0.tar.gz 安装依赖包 yum install -y gcc glibc make cmake glibc-common gd gd-devel php perl-devel mysql-server 编译安装

nagios客户端安装

在被监控服务器(Linux/unix)上安装Nagios-plugins和nrpe 1.添加用户 1 2 ; html-script: false ]/usr/sbin/useradd -m nagios passwd nagios 2.解压安装nagios-plugins 1 2 3 4 ; html-script: false ]cd /usr/local/src/tarbag wget http://downloads.sourceforge.net/project/nagiosplug/

Nagios配置安装详解

nagios.html :first-child{margin-top:0!important}img.plugin{box-shadow:0 1px 3px rgba(0,0,0,.1);border-radius:3px}iframe{border:0}figure{-webkit-margin-before:0;-webkit-margin-after:0;-webkit-margin-start:0;-webkit-margin-end:0}kbd{border:1px solid #a

关于Nagios的NRPE服务端客户端安装

Nagios 安装 准备条件: Development Libraries Development  Tools 解决依赖关系: httpd gcc glibc glibc-common gd gd-devel php mysql mysql-server 开始 [[email protected] Desktop]  groupadd nagcmd [[email protected] Desktop] useradd  -G nagcmd nagios [[email protected]

nagios一键安装脚本V1.0(客户端+服务端)

服务端脚本: #!//bin/bash #nagios一键安装脚本 path=`pwd` yum_user() { echo -e "\033[32m开始安装基础支持套件和添加用户......\033[0m" yum -y install httpd gcc glibc glibc-common gd gd-devel  if [ $? -ne 0 ] then    echo -e "\033[31mYUM安装失败!\033[0m"   exit 1 fi ech

Nagios 客户端简单安装

安装nagios 客户端 客户端仅仅需要安装下面内容 Class-Accessor-0.31.tar.gz Config-Tiny-2.12.tar.gz Math-Calc-Units-1.07.tar.gz Nagios-Plugin-0.34.tar.gz Params-Validate-0.91.tar.gz Regexp-Common-2010010201.tar.gz check_iostat check_memory.pl nrpe-2.12.tar.gz 第一步:修改YUM源码