Redhat如何配置nagios-安装nagios-plugins

2023-04-12 02:08:00 redhat nagios 配置

如何配置nagios-安装nagios-plugins

下载安装包

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.7.tar.gz

tar zxvf nagios-4.0.7.tar.gz

cd nagios-4.0.7

安装依赖包

yum install gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release -y

编译安装

./configure --with-command-group=nagios

make all

make install

make install-init

make install-config

make install-commandmode

make install-webconf

添加用户组和用户

useradd nagios

groupadd nagios

usermod -a -G nagios nagios

usermod -a -G nagios apache

启动Nagios

systemctl start nagios.service

设置开机启动

systemctl enable nagios.service

查看状态

systemctl status nagios.service

安装nagios-plugins

下载安装包

wget http://nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz

tar zxvf nagios-plugins-2.1.1.tar.gz

cd nagios-plugins-2.1.1

编译安装

./configure --with-nagios-user=nagios --with-nagios-group=nagios

make

make install

运行检查脚本

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

如果出现以下信息则表示安装成功

NRPE v2.15

相关文章