成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

使用Nagios監控Linux客戶端-Nagios監控服務器的配置

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

  使用Nagios監控Linux 客戶端Nagios監控的方式:  

  本文介紹的是:使用Nagios監控Linux客戶端

手機報警短信

Nagios監控服務器的配置

Nagios 監控客戶端的配置

使用Nagios監控Windows客戶端

  (一)Nagios監控服務器的配置

  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 添加要監控的主機的IP地址,中間以空格隔開。

  3.添加端口

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

  4.重新啟動Xinetd服務

  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.怎么使用這些命令監控客戶端呢?

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

  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發送報警短信

配置nagios客戶端

Nagios的安裝配置記錄

責任編輯:zhaolei 來源: deepin
相關推薦

2011-03-21 14:53:27

Nagios監控Linux

2011-03-21 14:53:36

Nagios監控Linux

2011-04-06 14:24:20

Nagios監控Linux

2011-03-21 14:53:27

Nagios監控Linux

2014-01-17 15:23:55

Nagios

2011-04-06 14:24:27

Nagios監控Linux

2011-03-25 14:25:38

NagiosWindows監控

2011-04-06 14:24:18

2011-03-25 14:40:33

Nagios監控

2011-03-22 09:03:47

Nagios配置

2011-03-23 15:13:08

Nagios監控Oracle

2011-03-22 09:07:13

Nagios監控Linux

2011-03-24 13:00:31

配置nagios客戶端

2011-03-23 10:17:26

2011-04-06 14:24:28

nagios監控Linux

2011-04-06 15:05:56

nagios監控Linux

2011-08-22 12:25:08

nagios

2011-03-23 15:13:08

Nagios監控oracle

2011-03-22 15:17:14

Nagios安裝

2011-03-23 13:29:46

Debian安裝Nagios
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 亚洲视频一区二区三区 | 色综合久 | 精品网 | 老司机久久 | 精品国产伦一区二区三区观看说明 | 伊人网站在线观看 | 亚洲欧美视频 | 91精品国产91久久久久久吃药 | 欧洲一级毛片 | 日韩欧美一区二区三区免费观看 | 久久亚洲一区二区三区四区 | 久久天天躁狠狠躁夜夜躁2014 | 九色 在线| 亚洲在线| 毛片链接 | 久久久久一区二区三区 | 午夜理伦三级理论三级在线观看 | 久久久天天 | 91精品国模一区二区三区 | 综合精品久久久 | 日本特黄a级高清免费大片 国产精品久久性 | 台湾佬久久| 羞羞视频免费在线 | 色偷偷888欧美精品久久久 | 亚州精品天堂中文字幕 | 伦理午夜电影免费观看 | 久久手机视频 | 天天操天天操 | 999在线精品 | 国产精品1区2区 | 久久国产精品视频 | 国产免费一区二区三区最新6 | 颜色网站在线观看 | 久久精品一区二区 | a在线视频观看 | 亚洲国产一区二区三区在线观看 | 欧美成年黄网站色视频 | 午夜精品一区二区三区在线视频 | 中文字幕高清 | 狠狠av | 毛片区 |