1,将监控项写进脚本
[root@localhost scripts] vim check_mysql.sh
[root@localhost scripts] cat check_mysql.sh
#!/bin/bash
case $1 in
slave_status) #主从状态
mysql -ucheck -p123 -e "show slave status \G"|grep "Running"|grep "Yes"|
1,将监控项写进脚本
[root@localhost scripts] vim check_mysql.sh
[root@localhost scripts] cat check_mysql.sh
#!/bin/bash
case $1 in
slave_status) #主从状态
mysql -ucheck -p123 -e "show slave status \G"|grep "Running"|grep "Yes"|