自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

使用Nagios監(jiān)控Linux客戶端-Nagios監(jiān)控服務(wù)器的配置

運維 系統(tǒng)運維
使用Nagios監(jiān)控Linux客戶端:Nagios 與 Ganglia 一樣,常用于 HPC 和其他環(huán)境,但是 Nagios 更加關(guān)注警告機制,Ganglia 則更加關(guān)注收集和跟蹤指標。Nagios 以前只是從目標主機收集信息,但最近開發(fā)了可以在主機上運行代理的插件。Nagios監(jiān)控服務(wù)器的配置

  使用Nagios監(jiān)控Linux 客戶端Nagios監(jiān)控的方式:  

  本文介紹的是:使用Nagios監(jiān)控Linux客戶端

手機報警短信

Nagios監(jiān)控服務(wù)器的配置

Nagios 監(jiān)控客戶端的配置

使用Nagios監(jiān)控Windows客戶端

  (一)Nagios監(jiān)控服務(wù)器的配置

  1.安裝nrpe

  1.   [root@UnixHot src]# tar zxvf nrpe-2.12.tar.gz  
  2.  
  3.   [root@UnixHot nrpe-2.12]# ./configure && make all  
  4.  
  5.   [root@UnixHot nrpe-2.12]# make install-plugin  
  6.  
  7.   [root@UnixHot nrpe-2.12]# make install-daemon  
  8.  
  9.   [root@UnixHot nrpe-2.12]# make install-daemon-config  
  10.  
  11.   [root@UnixHot nrpe-2.12]# make install-xinetd  
  12.  

  2.配置nrep

  1.   [root@UnixHot nrpe-2.12]# vi /etc/xinetd.d/nrpe  
  2.  
  3.   service nrpe  
  4.  
  5.   {  
  6.  
  7.   flags = REUSE 
  8.  
  9.   socket_type = stream 
  10.  
  11.   port = 5666 
  12.  
  13.   wait = no 
  14.  
  15.   user = nagios 
  16.  
  17.   group = nagios 
  18.  
  19.   server = /usr/local/nagios/bin/nrpe  
  20.  
  21.   server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd  
  22.  
  23.   log_on_failure += USERID  
  24.  
  25.   disable = no 
  26.  
  27.   only_from = 127.0.0.1 192.168.0.206 192.168.0.155 192.168.0.157  
  28.  

  在only_from 添加要監(jiān)控的主機的IP地址,中間以空格隔開。

  3.添加端口

  1.   [root@UnixHot nrpe-2.12]# vi /etc/services 在最后添加  
  2.  
  3.   nrpe 5666/tcp #nrpe  
  4.  

  4.重新啟動Xinetd服務(wù)

  1.   [root@UnixHot nrpe-2.12]# /etc/init.d/xinetd restart  
  2.  
  3.   [root@UnixHot nrpe-2.12]# netstat -na | grep 5666  
  4.  
  5.   tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN  
  6.  

  以上的1-4的步驟要在客戶端上做。

  5.修改配置文件commands.cfg加入對nrpe的支持

  1.   [root@UnixHot ~]# vi /usr/local/nagios/etc/objects/commands.cfg  
  2.  
  3.   #nrpe set  
  4.  
  5.   define command{  
  6.  
  7.   command_name check_nrpe  
  8.  
  9.   command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$  
  10.  
  11.   }  
  12.  

  6.有哪些nrpe檢測命令可以用,它們在哪里呢?

  1.   [root@UnixHot ~]# vi /usr/local/nagios/etc/nrpe.cfg  
  2.  

  (默認有下面四個命令)

  1.   command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10  
  2.  
  3.   command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20  
  4.  
  5.   command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1  
  6.  
  7.   command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z  
  8.  
  9.   command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200  
  10.  

  7.怎么使用這些命令監(jiān)控客戶端呢?

  其實很簡單,就是在services.cfg里面添加服務(wù)即可,格式就和上篇文檔講的一樣,只是命令不同罷了。

  1.   [root@UnixHot ~]# vi /usr/local/nagios/etc/objects/services.cfg  
  2.  

  加入:

  1.   define service {  
  2.  
  3.   host_name Nagios-Server  
  4.  
  5.   service_description check-users  
  6.  
  7.   check_period 24x7  
  8.  
  9.   max_check_attempts 4  
  10.  
  11.   normal_check_interval 3  
  12.  
  13.   retry_check_interval 2  
  14.  
  15.   contact_groups sagroup  
  16.  
  17.   notification_interval 10  
  18.  
  19.   notification_period 24x7  
  20.  
  21.   notification_options w,u,c,r  
  22.  
  23.   check_command check_nrpe!check_users  
  24.  
  25.   }  
  26.  
  27.   define service {  
  28.  
  29.   host_name Nagios-Server  
  30.  
  31.   service_description check-load  
  32.  
  33.   check_period 24x7  
  34.  
  35.   max_check_attempts 4  
  36.  
  37.   normal_check_interval 3  
  38.  
  39.   retry_check_interval 2  
  40.  
  41.   contact_groups sagroup  
  42.  
  43.   notification_interval 10  
  44.  
  45.   notification_period 24x7  
  46.  
  47.   notification_options w,u,c,r  
  48.  
  49.   check_command check_nrpe!check_load  
  50.  
  51.   }  
  52.  
  53.   define service {  
  54.  
  55.   host_name Nagios-Server  
  56.  
  57.   service_description check-total-procs  
  58.  
  59.   check_period 24x7  
  60.  
  61.   max_check_attempts 4  
  62.  
  63.   normal_check_interval 3  
  64.  
  65.   retry_check_interval 2  
  66.  
  67.   contact_groups sagroup  
  68.  
  69.   notification_interval 10  
  70.  
  71.   notification_period 24x7  
  72.  
  73.   notification_options w,u,c,r  
  74.  
  75.   check_command check_total_procs  
  76.  
  77.   }  
  78.  

  在這里僅列出了一個客戶端的配置,其它的客戶端,只需修改host_name 即可。

 【編輯推薦】

Nagios使用飛信Robot發(fā)送報警短信

配置nagios客戶端

Nagios的安裝配置記錄

責任編輯:zhaolei 來源: deepin
相關(guān)推薦

2011-03-21 14:53:27

Nagios監(jiān)控Linux

2011-03-21 14:53:36

Nagios監(jiān)控Linux

2011-04-06 14:24:20

Nagios監(jiān)控Linux

2011-03-21 14:53:27

Nagios監(jiān)控Linux

2014-01-17 15:23:55

Nagios

2011-04-06 14:24:27

Nagios監(jiān)控Linux

2011-03-25 14:25:38

NagiosWindows監(jiān)控

2011-04-06 14:24:18

2011-03-25 14:40:33

Nagios監(jiān)控

2011-03-23 15:13:08

Nagios監(jiān)控Oracle

2011-03-22 09:03:47

Nagios配置

2011-03-22 09:07:13

Nagios監(jiān)控Linux

2011-03-24 13:00:31

配置nagios客戶端

2011-03-23 10:17:26

2011-04-06 14:24:28

nagios監(jiān)控Linux

2011-04-06 15:05:56

nagios監(jiān)控Linux

2011-08-22 12:25:08

nagios

2011-03-23 15:13:08

Nagios監(jiān)控oracle

2011-03-22 15:17:14

Nagios安裝

2011-03-23 13:29:46

Debian安裝Nagios
點贊
收藏

51CTO技術(shù)棧公眾號