系统信息: Description: Ubuntu 16.04.4 LTS 安装 nagios

2018-10-22 19:55:32 +08:00
 coolcokel
服务器端:
安装基础环境:
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install apache2
apt-get install php5.6
用户和组配置
Useradd nagios
Groupadd nagcmd
Usermod -a -G nagcmd nagios
usermod -a -G nagios,nagcmd www-data
安装 Nagios
1.下载源文件
cd ~
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.0.tar.gz
tar -xzf nagios*.tar.gz
cd nagios-4.2.0
2.编译 Nagios
构建 Nagios 之前,必须使用用户和之前创建的组来配置它
./configure --with-nagios-group=nagios --with-command-group=nagcmd
make all
sudo make install
sudo make install-commandmode
sudo make install-init
sudo make install-config
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf
并将 evenhandler 目录复制到 nagios 目录中:
cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
3.安装 nagios 插件
cd ~
wget https://nagios-plugins.org/download/nagios-plugins-2.1.2.tar.gz
tar -xzf nagios-plugins*.tar.gz
cd nagios-plugin-2.1.2/
./configure --prefix=/data/program/nagios --with-nagios-user=nagios --with-nagios-group=nagios && make && make install
测试已安装的插件,修改 nagios.cfg 的配置文件,service_check_timeout=300
cd /data/program/nagios/libexec/
./check_ping -H www.baidu.com -w 100.0,10% -c 100.0,30% -p 10 -t 2
报错 CRITICAL - Plugin timed out 待解决

自己动手搭建 nagios 服务器端参考网上教程做的,进行到这一步卡住了,修改 nagios.cfg 的配置文件,service_check_timeout=300 也试了,问题描述不清楚的还望指教!
831 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/499981

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX