1. nagios监控mysql服务器: 
  2. 方法:定期去select下某个空闲的数据库 
  3. 使用插件:check_mysql  
  4.  
  5. 问题:安装完成nagios后,发现居然没有这个插件,怎么办?
  6. 解决方法:
  7. # yum install mysql-devel  <我系统默认没装mysql的>
  8. 重装下nagios-plugins插件包
  9. [root@svr4 nagios-plugins-1.4.15]# ./configure 
  10.             --with-apt-get-command:  
  11.               --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s 
  12.                --with-ping-command: /bin/ping -n -U -w %d -c %d %s 
  13.                        --with-ipv6: yes 
  14.                       --with-mysql: /usr/bin/mysql_config 
  15.                     --with-openssl: yes 
  16.                      --with-gnutls: no 
  17.                --enable-extra-opts: no 
  18.                        --with-perl: /usr/bin/perl 
  19.              --enable-perl-modules: no 
  20.                      --with-cgiurl: /nagios/cgi-bin 
  21.                --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin 
  22.                    --enable-libtap: no 
  23. [root@svr4 nagios-plugins-1.4.15]# make && make install  
  24.  
  25. 结果:这个插件有了!
  26. [root@svr4 nagios-plugins-1.4.15]# ll /usr/local/nagios/libexec/check_mysql* 
  27. -rwxr-xr-x 1 root root 124343 Aug 31 13:13 /usr/local/nagios/libexec/check_mysql 
  28. -rwxr-xr-x 1 root root 120909 Aug 31 13:13 /usr/local/nagios/libexec/check_mysql_query