Nagios客户端安装

创建用户:

useradd -m nagios -s /sbin/nologin;

安装依赖包:

yum install -y gcc glibc glibc-common openssl openssl-devel perl wget;

下载nagios-plugins安装包:

wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz;
wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz;

解压:

tar -xvf nagios-plugins-2.2.1.tar.gz;
cd nagios-plugins-2.2.1;

配置编译:

./configure;
make;
make install;

下载NRPE安装包:

官网:https://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details;

github: https://github.com/NagiosEnterprises/nrpe

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.13.tar.gz;

配置安装:

 ./configure;
make all;
make install-plugin;
make install-daemon;
make install-daemon-config;

NRPE配置:

cd /usr/local/nagios/etc/;
cd /usr/local/nagios/etc/;
grep allowed_hosts nrpe.cfg;

NRPE配置修改:

cd /usr/local/nagios/etc/;
vi nrpe.cfg;

检测命令:

/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1

启动运行:

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享