cacti+nagios之nagios的搭建(三)
cd
/root/cactinagios
wget
tar –xf nagios-4.0.7.tar.gz
cd nagios-4.0.7
./configure –with-command-group=nagios --prefix=/var/www/html/nagios --enable-event-broker
make all
make install && make install-init && make install-config
make install-commandmode &&make install-webconf
設定登入web介面時http驗證的賬號密碼:
htpasswd -c /var/www/html/nagios/etc/htpasswd.users nagiosadmin
安裝nagios-plugins
cd /root/cactinagios
Wget
tar –xf nagios-plugins-2.0.2.tar.gz
cd nagios-plugins-2.0.2
./configure –with-nagios-user=nagios –with-nagios-group=nagios –prefix=/var/www/html/nagios –with-mysql
make
mke install
附apache的配置說明:
找到apache的配置檔案:/etc/httpd/httpd.conf
找到:
檢查nagios的配置:
/var/www/html/nagios/bin/nagios -v /var/www/html/nagios/etc/nagios.cfg
新增自動啟動:
chkconfig –add nagios
chkconfig nagios on
service nagios start
登陸頁面:
nagios客戶端的安裝配置:
cd /yunweipssh -h ip.txt "mkdir /yunwei"
pscp -h ip.txt
pssh -h ip.txt "./configure --prefix=/usr/local/nagios"
pssh -h ip.txt "make && make install"
pssh -h ip.txt "chown nagios:nagios /usr/local/nagios" make install-plugin pssh -h ip.txt "wget "
tar -xf nrpe-2.13.tar.gz
cd nrpe-2.13
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd
再次檢視nagios-plugins目錄就會發現有5個目錄了;
cat /etc/xinetd.d/nrpe
注意:only_from增加監控端主機的ip地址;
編輯/etc/services 檔案,增加NRPE服務
service xinetd restart
可以看到5566埠已經在監聽了;
使用如下命令,測試客戶端是否正常安裝了nrpe外掛
/usr/local/nagios/libexec/check_nrpe -H localhost
在監控端,開啟commands.cfg,編輯新增如下內容:
# 'check_nrpe' command definition
define command{
command_name check_nrpe # 定義命令名稱為check_nrpe,在services.cfg中要使用這個名稱. command_line
$USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ #這是定義實際執行的外掛程式. # 這個命令列的書寫要完全按照check_nrpe這個命令的用法,不知道用法的就用check_nrpe –h檢視. }
-c 後面帶的$ARG1$ 引數是傳給nrpe daemon 執行的檢測命令,之前說過了它必須是nrpe.cfg 中所定義的那5條命令中的其中一條。在services.cfg 中
使用check_nrpe 的時候要用 “!” 帶上這個引數。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30129545/viewspace-1434506/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Cacti+Nagios監控平臺完美整合iOS
- rocketMq之叢集搭建(三)MQ
- nagios mail告警通知iOSAI
- Nagios安裝步驟iOS
- Nagios+PNP安裝部署iOS
- flutter之從零開始搭建(三)之 網路請求Flutter
- ?史上最全的企業級容器系列之kubernetes入門和搭建(三)
- 使用Nagios打造專業的業務狀態監控iOS
- Nagios+Centreon監控系統簡介iOS
- CentOS原始碼安裝、配置Nagios(core)+PluginsCentOS原始碼iOSPlugin
- 三高Mysql - 搭建“三高”架構之擴充套件與切換MySql架構套件
- nagios 呼叫webhook 給微信發告警資訊iOSWebHook
- 監控系統:深度對比Zabbix、Nagios、Pandora FMSiOS
- Redis叢集搭建 三主三從Redis
- Redis叢集搭建(三主三從)Redis
- zabbix、cacti、nagios,伺服器監控還有更好的選擇嗎?iOS伺服器
- Java後端分散式系統的服務監控:Zabbix與NagiosJava後端分散式iOS
- MVVM框架的搭建(三)——網路請求MVVM框架
- HBase (三)之 API的使用API
- java商城系統架構之第三篇——叢集架構搭建Java架構
- 三、微服務環境搭建微服務
- 三步搭建自己的Google搜尋引擎Go
- 從零搭建自己的Vue管理端框架(三)Vue框架
- 從零搭建自己的SpringBoot後臺框架(三)Spring Boot框架
- 如何在 CentOS 8/RHEL 8 上安裝和配置 Nagios CoreCentOSiOS
- 從零搭建Pytorch模型教程(三)搭建Transformer網路PyTorch模型ORM
- Rust 之環境搭建Rust
- NoSQL之Redis叢集搭建——6臺伺服器,三臺主伺服器,三臺從伺服器SQLRedis伺服器
- 基於Kubernetes v1.24.0的叢集搭建(三)
- Flutter系列(三)——環境搭建(Windows)FlutterWindows
- 搭建node服務(三):使用TypeScriptTypeScript
- 三,搭建環境:事務控制
- 三臺伺服器使用docker搭建redis一主二從三哨兵,概念-搭建-整合springboot伺服器DockerRedisSpring Boot
- Ubuntu之C++開發環境的搭建UbuntuC++開發環境
- 大資料之Hadoop偽分散式的搭建大資料Hadoop分散式
- Django之Ubuntu環境搭建DjangoUbuntu
- Docker 之 Nginx環境搭建DockerNginx
- Flutter(二)之環境搭建Flutter
- Mockserver之Moco框架搭建使用MockServer框架