#################################
# Nagios升级安装
# Author: 楚霏
# Date: 2009-10-22
# Env: Centos 5.3 x86_64
#################################
#nagios 3.2.0出来有些时间了,决定把自己的3.1.2升级一下,同时顺便把插件从1.4.13升级到1.4.14
一、先在主监控机上升级nagios
cp -R /usr/local/nagios/etc /backup/nagios_config cd /usr/local/src/ wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz tar xvf nagios-3.2.0.tar.gz cd nagios-3.2.0 ./configure --with-command-group=nagcmd make all make install /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg service nagios restart
二、在主监控机上升级nagios-plugins
cd /usr/local/src/ wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz tar xvf nagios-plugins-1.4.14.tar.gz cd nagios-plugins-1.4.14 ./configure --with-nagios-user=nagios --with-nagios-group=nagios make make install
三、在所有的被监控机上升级nagios-plugins
#步骤实际等同于文章第二部分,写在一块,在多台被监控上执行起来省事一些
cd /usr/local/src/ && wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz tar xvf nagios-plugins-1.4.14.tar.gz && cd nagios-plugins-1.4.14 && ./configure --with-nagios-user=nagios --with-nagios-group=nagios make && make install
四、可以检查一下,/usr/local/nagios/libexec/的日期都是当前的啦
ll /usr/local/nagios/libexec/ #----------------------------引用文字-开始---------------------------- -rwxr-xr-x 1 nagios nagios 339905 Oct 22 17:34 check_apt -rwxr-xr-x 1 nagios nagios 2245 Oct 22 17:34 check_breeze -rwxr-xr-x 1 nagios nagios 110956 Oct 22 17:34 check_by_ssh lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_clamd -> check_tcp -rwxr-xr-x 1 nagios nagios 64022 Oct 22 17:34 check_cluster -r-sr-xr-x 1 root nagios 101536 Oct 22 17:34 check_dhcp -rwxr-xr-x 1 nagios nagios 103508 Oct 22 17:34 check_dig -rwxr-xr-x 1 nagios nagios 390573 Oct 22 17:34 check_disk -rwxr-xr-x 1 nagios nagios 8080 Oct 22 17:34 check_disk_smb -rwxr-xr-x 1 nagios nagios 110269 Oct 22 17:34 check_dns -rwxr-xr-x 1 nagios nagios 58713 Oct 22 17:34 check_dummy -rwxr-xr-x 1 nagios nagios 3056 Oct 22 17:34 check_file_age -rwxr-xr-x 1 nagios nagios 6318 Oct 22 17:34 check_flexlm lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_ftp -> check_tcp -rwxr-xr-x 1 nagios nagios 481109 Oct 22 17:34 check_http -r-sr-xr-x 1 root nagios 108694 Oct 22 17:34 check_icmp -rwxr-xr-x 1 nagios nagios 70743 Oct 22 17:34 check_ide_smart -rwxr-xr-x 1 nagios nagios 15137 Oct 22 17:34 check_ifoperstatus -rwxr-xr-x 1 nagios nagios 12523 Oct 22 17:34 check_ifstatus lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_imap -> check_tcp -rwxr-xr-x 1 nagios nagios 7355 Oct 22 17:34 check_ircd lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_jabber -> check_tcp -rwxr-xr-x 1 nagios nagios 98072 Oct 22 17:34 check_load -rwxr-xr-x 1 nagios nagios 6020 Oct 22 17:34 check_log -rwxr-xr-x 1 nagios nagios 20287 Oct 22 17:34 check_mailq -rwxr-xr-x 1 nagios nagios 71242 Oct 22 17:34 check_mrtg -rwxr-xr-x 1 nagios nagios 71427 Oct 22 17:34 check_mrtgtraf -rwxr-xr-x 1 nagios nagios 89016 Oct 22 17:34 check_nagios lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_nntp -> check_tcp lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_nntps -> check_tcp -rwxrwxr-x 1 nagios nagios 65853 Sep 8 09:06 check_nrpe -rwxr-xr-x 1 nagios nagios 100642 Oct 22 17:34 check_nt -rwxr-xr-x 1 nagios nagios 105427 Oct 22 17:34 check_ntp -rwxr-xr-x 1 nagios nagios 95287 Oct 22 17:34 check_ntp_peer -rwxr-xr-x 1 nagios nagios 94825 Oct 22 17:34 check_ntp_time -rwxr-xr-x 1 nagios nagios 125696 Oct 22 17:34 check_nwstat -rwxr-xr-x 1 nagios nagios 8324 Oct 22 17:34 check_oracle -rwxr-xr-x 1 nagios nagios 85798 Oct 22 17:34 check_overcr -rwxr-xr-x 1 nagios nagios 124401 Oct 22 17:34 check_ping lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_pop -> check_tcp -rwxr-xr-x 1 nagios nagios 357008 Oct 22 17:34 check_procs -rwxr-xr-x 1 nagios nagios 83442 Oct 22 17:34 check_real -rwxr-xr-x 1 nagios nagios 9584 Oct 22 17:34 check_rpc -rwxr-xr-x 1 nagios nagios 1135 Oct 22 17:34 check_sensors lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_simap -> check_tcp -rwxr-xr-x 1 nagios nagios 392331 Oct 22 17:34 check_smtp lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_spop -> check_tcp -rwxr-xr-x 1 nagios nagios 82483 Oct 22 17:34 check_ssh lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_ssmtp -> check_tcp -rwxr-xr-x 1 nagios nagios 100498 Oct 22 17:34 check_swap -rwxr-xr-x 1 nagios nagios 126810 Oct 22 17:34 check_tcp -rwxr-xr-x 1 nagios nagios 86459 Oct 22 17:34 check_time lrwxrwxrwx 1 root root 9 Oct 22 17:34 check_udp -> check_tcp -rwxr-xr-x 1 nagios nagios 92746 Oct 22 17:34 check_ups -rwxr-xr-x 1 nagios nagios 95025 Oct 22 17:34 check_users -rwxr-xr-x 1 nagios nagios 2939 Oct 22 17:34 check_wave -rwxr-xr-x 1 nagios nagios 90641 Oct 22 17:34 negate -rwxr-xr-x 1 nagios nagios 93916 Oct 22 17:34 urlize -rwxr-xr-x 1 nagios nagios 1921 Oct 22 17:34 utils.pm -rwxr-xr-x 1 nagios nagios 862 Oct 22 17:34 utils.sh #----------------------------引用文字-结束----------------------------
#保证nagios用户有权限使用这些插件
chown -R nagios:nagios /usr/local/nagios/libexec/
#完成