压在透明的玻璃上c-国产精品国产一级A片精品免费-国产精品视频网-成人黄网站18秘 免费看|www.tcsft.com

nagios腳本監控內存使用情況

  nagios監控客戶端內存使用量的配置:

  本例中以train為例進行配置說明

  被監控端的配置

  1.下載check_memory.pl腳本,此腳本我上傳在360云盤并共享出來了。

  http://yunpan.cn/QztDd48uEYcXJ

  2.將此腳本上傳至/usr/local/nagios/libexec目錄下并更改權限

  chmod +x check_memory.pl

  chown nagios:nagios check_memory.pl

  3.修改nrpe配置文件

  vim /usr/local/nagios/etc/nrpe.cfg

  添加以下內容

  command[check_free_mem]=/usr/local/nagios/libexec/check_memory.pl -f -w 10 -c 5

  4.重啟nrpe服務

  /etc/init.d/xinetd restart (本例中我配置成了nrpe受xinetd管理)

  若沒有安裝配置xinetd,使用這種方式重啟服務

  /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d

  服務端的配置

  5.修改主機配置文件

  vim /usr/local/nagios/etc/servers/trainsystem.cfg

  添加以下內容

  define service{

  use                             generic-service

  host_name                       train

  service_description             Memory Usage

  check_command                   check_nrpe!check_free_mem

  register                        1

  }

  6.檢查配置文件正確性并重載配置文件

  /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

  service nagios reload

  7.配置完畢,過一會監控內存使用情況就出來了!

 

上一篇:安卓防火墻 PS DroidWall

下一篇:強大的嗅探工具ettercap使用教程