RAID 5 + Hot Spare 设置 (共5块磁盘)
复制状态检测插件
[root@monitor libexec]# ./check_mysql_slavestatus.sh -H 192.168.153.113 -P 3306 -u cacti -p qweszxc -w 2 -c 5 OK: Slave SQL running: Yes Slave IO running: Yes / master: 192.168.153.112 / slave is 0 seconds behind master | delay=0s [root@monitor libexec]#
取值来源
Slave_SQL_Running Slave_IO_Running Master_Host Seconds_Behind_Master
新增插件
http://www.claudiokuenzler.com/nagios-plugins/check_mysql_slavestatus.sh
定义命令
[root@monitor libexec]# vi ../etc/objects/commands.cfg
define command{ command_name check_mysql_slavestatus command_line $USER1$/check_mysql_slavestatus.sh -H $HOSTADDRESS$ -P $ARG1$ -u $ARG2$ -p $ARG3$ }
在配置文件中引用命令
define service{ use generic-service host_name dbmaster01 service_description MySQL Slave Status check_command check_nrpe!check_mysql_slavestatus!3306!cacti!qweszxc!1!5 }
优化,重定义(适用多台相同账户配置主机)
# 'check_mysql_slavestatus' define command{ command_name check_mysql_slavestatus command_line $USER1$/check_mysql_slavestatus.sh -H $HOSTADDRESS$ -P 3306 -u cacti -p qweszxc -w $ARG1$ -c $ARG2$ }
define service{ use generic-service host_name dbmaster01 service_description MySQL Slave Status check_command check_mysql_slavestatus!1!5 }
Seconds_Behind_Master 解析
http://blog.itpub.net/23721637/viewspace-1050178/
MySQL slave状态之Seconds_Behind_Master
http://blog.csdn.net/zbszhangbosen/article/details/8494921
安装后libexec目录无check_mysql命令插件
[root@monitor plugins-scripts]# rpm -q mysql-devel
package mysql-devel is not installed
[root@monitor plugins-scripts]#
Description : MySQL is a multi-user, multi-threaded SQL database server. This
: package contains the libraries and header files that are needed
: for developing MySQL client applications.
SSH登录提示慢
[root@localhost ~]# vi /etc/ssh/sshd_config
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPIAuthentication yes
GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
#UseDNS yes
UseDNS no
[root@localhost ~]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[root@localhost ~]#
相关文档:
SRX SERIES AND J SERIES NETWORK ADDRESS TRANSLATION
使用Cacti查看已监控的Juniper SRX接口的MIB信息
Data Query Debug Information
通过Nagios手动执行动态检测
[root@monitor libexec]# ./check_snmp -H 192.168.152.1 -C public -o ifOperStatus.510 -r 1 -m IF-MIB SNMP OK - up(1) | [root@monitor libexec]#
Nagios中默认监控交换机接口状态的配置
[harveymei@monitor objects]$ cat switch.cfg
# Monitor Port 1 status via SNMP define service{ use generic-service ; Inherit values from a template host_name linksys-srw224p service_description Port 1 Link Status check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB }