Zabbix Monitor MySQL down when no alarm resolution method

Source: Internet
Author: User

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8B/77/wKioL1hPRkDQK0lFAAA8XQsvMcc784.png-wh_500x0-wm_3 -wmp_4-s_1746572393.png "title="}t]fogwc86{2{96~0@4me9r.png "alt=" Wkiol1hprkdqk0lfaaa8xqsvmcc784.png-wh_50 "/>

When MySQL is down, Zabbix displays the following results

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8B/77/wKioL1hPRweCfcl2AAA6PKF9JfA282.png-wh_500x0-wm_3 -wmp_4-s_4191731075.png "title=" 1.png "alt=" wkiol1hprwecfcl2aaa6pkf9jfa282.png-wh_50 "/>650) this.width=650;" Src= "http://s2.51cto.com/wyfs02/M00/8B/7B/wKiom1hPR1jgIdJ4AAAavvbVrUc233.png-wh_500x0-wm_3-wmp_4-s_3882009054. PNG "title=" 3.png "alt=" Wkiom1hpr1jgidj4aaaavvbvruc233.png-wh_50 "/>

Using a sequence of commands from the Mysqladmin component and retrieving the alive to get the result set, the fetch to return 1 indicates that the MySQL service is on, and returns 0 means that the MySQL service is turned off, but in fact? can return 1 but not return 0, because the mysqladmin command will first error message out, so zabbix-server call when the return is not a pure number, but the string + familiar, Zabbix-server trigger inside cannot recognize

So you can know that mysqladmin in the MySQL service down, the return of the string alarm + number 0, completely trigger the Zabbix alarm conditions, it is necessary to consider other ways to judge.

Search for relevant data telnet is also unable to meet the MySQL down when the alarm triggered by the demand, now with Netstat try

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8B/77/wKioL1hPSJ6Rxsl1AAAOEEQVSXs707.png-wh_500x0-wm_3 -wmp_4-s_3082425061.png "title=" 4.png "alt=" Wkiol1hpsj6rxsl1aaaoeeqvsxs707.png-wh_50 "/>

Netstat-lntup|grep 3306|grep Mysql|wc|awk ' {print $} '

Mysqladmin Ping in the configuration file | Grep-c alive Change to the above command try

Restart Zabbix_agentd

Found or not, finally found that the netstat was remotely invoked when the failure to execute:

chmod +s/bin/netstat

It worked





This article from "Little Fart Babe" blog, declined reprint!

Zabbix Monitor MySQL down when no alarm resolution method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.