zabbix监控mysql数据库信息脚本
---恢复内容开始---
在/usr/local/zabbix/etc/zabbix_agentd.conf增加
# 获取mysql性能指标
UserParameter=mysql.status[*],/usr/local/zabbix/bin/check_mysql.sh $
/usr/local/zabbix/bin/check_mysql.sh脚本内容为
#!/bin/bash
# -------------------------------------------------------------------------------
# FileName: check_mysql.sh MYSQL_CONN="/usr/bin/mysqladmin" # 参数是否正确
if [ $# -ne "" ];then
echo "arg error!"
fi # 获取数据
case $ in
Uptime)
result=`${MYSQL_CONN} status|cut -f2 -d":"|cut -f1 -d"T"`
echo $result
;;
Com_update)
result=`${MYSQL_CONN} extended-status |grep -w "Com_update"|cut -d"|" -f3`
echo $result
;;
Slow_queries)
result=`${MYSQL_CONN} status |cut -f5 -d":"|cut -f1 -d"O"`
echo $result
;;
Com_select)
result=`${MYSQL_CONN} extended-status |grep -w "Com_select"|cut -d"|" -f3`
echo $result
;;
Com_rollback)
result=`${MYSQL_CONN} extended-status |grep -w "Com_rollback"|cut -d"|" -f3`
echo $result
;;
Questions)
result=`${MYSQL_CONN} status|cut -f4 -d":"|cut -f1 -d"S"`
echo $result
;;
Com_insert)
result=`${MYSQL_CONN} extended-status |grep -w "Com_insert"|cut -d"|" -f3`
echo $result
;;
Com_delete)
result=`${MYSQL_CONN} extended-status |grep -w "Com_delete"|cut -d"|" -f3`
echo $result
;;
Com_commit)
result=`${MYSQL_CONN} extended-status |grep -w "Com_commit"|cut -d"|" -f3`
echo $result
;;
Bytes_sent)
result=`${MYSQL_CONN} extended-status |grep -w "Bytes_sent" |cut -d"|" -f3`
echo $result
;;
Bytes_received)
result=`${MYSQL_CONN} extended-status |grep -w "Bytes_received" |cut -d"|" -f3`
echo $result
;;
Com_begin)
result=`${MYSQL_CONN} extended-status |grep -w "Com_begin"|cut -d"|" -f3`
echo $result
;;
Slave)
# result=`${MYSQL_CONN} extended-status |grep -w "Com_begin"|cut -d"|" -f3`
# echo $result
array=(`/usr/bin/mysql -e "show slave status\G"|grep "Running" |awk '{print $2}'`)
if [ "${array[0]}" == "Yes" ] && [ "${array[1]}" == "Yes" ]
then
echo
else
echo
fi ;; *)
echo "Usage:$0(Uptime|Com_update|Slow_queries|Com_select|Com_rollback|Questions|Com_insert|Com_delete|Com_commit|Bytes_sent|Bytes_received|Com_begin|Slave)"
;;
esac
zabbix模版内容:
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>3.4</version>
<date>--07T06::56Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template App MySQL</template>
<name>Template App MySQL</name>
<description/>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<items>
<item>
<name>MySQL status</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.ping</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.ping, which is defined in userparameter_mysql.conf.&#;
&#;
- MySQL server is down&#;
- MySQL server is up</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap>
<name>Service state</name>
</valuemap>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL bytes received per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Bytes_received]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>Bps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>The number of bytes received from all clients. &#;
&#;
It requires user parameter mysql.status[*], which is defined in &#;
userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL bytes sent per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Bytes_sent]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>Bps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>The number of bytes sent to all clients.&#;
&#;
It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL begin operations per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Com_begin]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL commit operations per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Com_commit]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL delete operations per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Com_delete]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL insert operations per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Com_insert]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL rollback operations per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Com_rollback]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL select operations per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Com_select]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL update operations per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Com_update]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL queries per second</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Questions]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>qps</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing>
<step>
<type></type>
<params/>
</step>
</preprocessing>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL slow queries</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Slow_queries]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL uptime</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.status[Uptime]</key>
<delay>1m</delay>
<history>1w</history>
<trends>365d</trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units>uptime</units>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.status[*], which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<master_item/>
</item>
<item>
<name>MySQL version</name>
<type></type>
<snmp_community/>
<snmp_oid/>
<key>mysql.version</key>
<delay>1h</delay>
<history>1w</history>
<trends></trends>
<status></status>
<value_type></value_type>
<allowed_hosts/>
<units/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel></snmpv3_securitylevel>
<snmpv3_authprotocol></snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol></snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<params/>
<ipmi_sensor/>
<authtype></authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description>It requires user parameter mysql.version, which is defined in userparameter_mysql.conf.</description>
<inventory_link></inventory_link>
<applications>
<application>
<name>MySQL</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<master_item/>
</item>
</items>
<discovery_rules/>
<httptests/>
<macros/>
<templates/>
<screens>
<screen>
<name>MySQL performance</name>
<hsize></hsize>
<vsize></vsize>
<screen_items>
<screen_item>
<resourcetype></resourcetype>
<width></width>
<height></height>
<x></x>
<y></y>
<colspan></colspan>
<rowspan></rowspan>
<elements></elements>
<valign></valign>
<halign></halign>
<style></style>
<url/>
<dynamic></dynamic>
<sort_triggers></sort_triggers>
<resource>
<name>MySQL operations</name>
<host>Template App MySQL</host>
</resource>
<max_columns></max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype></resourcetype>
<width></width>
<height></height>
<x></x>
<y></y>
<colspan></colspan>
<rowspan></rowspan>
<elements></elements>
<valign></valign>
<halign></halign>
<style></style>
<url/>
<dynamic></dynamic>
<sort_triggers></sort_triggers>
<resource>
<name>MySQL bandwidth</name>
<host>Template App MySQL</host>
</resource>
<max_columns></max_columns>
<application/>
</screen_item>
</screen_items>
</screen>
</screens>
</template>
</templates>
<triggers>
<trigger>
<expression>{Template App MySQL:mysql.ping.last()}=</expression>
<recovery_mode></recovery_mode>
<recovery_expression/>
<name>MySQL is down</name>
<correlation_mode></correlation_mode>
<correlation_tag/>
<url/>
<status></status>
<priority></priority>
<description/>
<type></type>
<manual_close></manual_close>
<dependencies/>
<tags/>
</trigger>
</triggers>
<graphs>
<graph>
<name>MySQL bandwidth</name>
<width></width>
<height></height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period></show_work_period>
<show_triggers></show_triggers>
<type></type>
<show_legend></show_legend>
<show_3d></show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1></ymin_type_1>
<ymax_type_1></ymax_type_1>
<ymin_item_1></ymin_item_1>
<ymax_item_1></ymax_item_1>
<graph_items>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color>00AA00</color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Bytes_received]</key>
</item>
</graph_item>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color>3333FF</color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Bytes_sent]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>MySQL operations</name>
<width></width>
<height></height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period></show_work_period>
<show_triggers></show_triggers>
<type></type>
<show_legend></show_legend>
<show_3d></show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1></ymin_type_1>
<ymax_type_1></ymax_type_1>
<ymin_item_1></ymin_item_1>
<ymax_item_1></ymax_item_1>
<graph_items>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color>C8C800</color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Com_begin]</key>
</item>
</graph_item>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color></color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Com_commit]</key>
</item>
</graph_item>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color>C80000</color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Com_delete]</key>
</item>
</graph_item>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color>0000EE</color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Com_insert]</key>
</item>
</graph_item>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color></color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Com_rollback]</key>
</item>
</graph_item>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color>00C800</color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Com_select]</key>
</item>
</graph_item>
<graph_item>
<sortorder></sortorder>
<drawtype></drawtype>
<color>C800C8</color>
<yaxisside></yaxisside>
<calc_fnc></calc_fnc>
<type></type>
<item>
<host>Template App MySQL</host>
<key>mysql.status[Com_update]</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
<value_maps>
<value_map>
<name>Service state</name>
<mappings>
<mapping>
<value></value>
<newvalue>Down</newvalue>
</mapping>
<mapping>
<value></value>
<newvalue>Up</newvalue>
</mapping>
</mappings>
</value_map>
</value_maps>
</zabbix_export>
zabbix监控mysql数据库信息脚本的更多相关文章
- CentOS 6.3下Zabbix监控MySQL数据库参数
系统环境:CentOS 6.3 x64 http://www.linuxidc.com/Linux/2012-12/76583.htm mysql: mysql-5.6.10 http://w ...
- zabbix监控 -mysql数据库
1.禁用安装防护[root@mysql213 ~]# vi /etc/selinux/config #关闭安装 SELINUX=disabled 2.授权zabbix监控账号 mysql -uroot ...
- zabbix实现mysql数据库的监控(四)
前面介绍的内容都是用第三方开发好的插件进行mysql监控的,可能有些我们关心的监控内容并不在其中,这时一种常用的方法就是定义我们自己的脚本并将它整合到zabbix中,从而在原有监控的基础上进行有力的补 ...
- zabbix实现mysql数据库的监控(二)
上章我们把zabbix的服务端和客户端都部署完成了,本章接着进行两部分的设置: 1 添加对mysql数据库主机的监控 2 添加对mysql数据库的监控 一.对数据库服务器主机监控 1 创建主机 步 ...
- zabbix实现mysql数据库的监控(三)
上面一章“zabbix实现mysql数据库的监控(二)”使用MPM来监控mysql,但是遇到安装问题始终解决不了,这里改用percona-monitoring-plugins进行zabbxi上监控my ...
- zabbix通过第三方插件percona监控mysql数据库
zabbix通过第三方插件percona监控mysql数据库 ...
- zabbix利用自带的模板监控mysql数据库
zabbix利用自带的模板监控mysql数据库 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 有些东西你不会的时候觉得它特别难,但是当你去做的时候就发现如此的简单~zabbix功能 ...
- centos 7中监控mysql 数据库脚本(监控端口)
centos 7中监控mysql 数据库脚本(监控端口) 监控mysql数据库的方法如下: 1.监控端口 netstat -nltp |grep 3306 2.监控进程 ps -ef |grep 33 ...
- 分布式数据存储 - Zabbix监控MySQL性能
Zabbix如何监控mysql性能,我们可以使用mysql自带的模板,可以监控如下内容:OPS(增删改查).mysql请求流量带宽,mysql响应流量带宽,最后会附上相应的监控图! 编写check_m ...
随机推荐
- git的基础使用
GIT """ 什么是git:版本控制器 - 控制的对象是开发的项目代码 代码开发时间轴:需求1 > 版本库1 > 需求2 > 版本库2 > 版本 ...
- windows安装theano和keras
系统: Windows 2008 python版本: Anaconda3 1. theano 安装 pip install theano 2. 安装g++ 下载安装mingw, 推荐版本tdm64-g ...
- 设置Schema-Registry的配置,以支持Schema变化
设置Schema-Registry的配置,以支持Schema变化 https://blog.csdn.net/lzufeng/article/details/81566766 curl -X PUT ...
- LeetCode No.157,158,159
No.157 Read 用 Read4 读取 N 个字符 题目 给你一个文件,并且该文件只能通过给定的 read4 方法来读取,请实现一个方法使其能够读取 n 个字符. read4 方法: API r ...
- Debian8.8同步时间
1.安装ntpdate 2.设置当前年月 如:sudo date -s 2017-05-18 3.同步:sudo ntpdate /usr/sbin/ntpdate time.nist.gov
- js获取当前页面名称
// 取当前页面名称(不带后缀名) function pageName() { var a = location.href; var b = a.split("/"); var c ...
- HDU-3974 Assign the task(多叉树DFS时间戳建线段树)
http://acm.hdu.edu.cn/showproblem.php?pid=3974 Time Limit: 15000/5000 MS (Java/Others) Memory Lim ...
- 5)关于CSS和js静态文件引入路径
(1)参考资料 thinkphp5手册 视图--->输出替换 (2)方法(1)在我们的application中,找到config.php,在里面输入这样的配置: <?php ...
- LeetCode No.118,119,120
No.118 Generate 杨辉三角 题目 给定一个非负整数 numRows,生成杨辉三角的前 numRows 行. 在杨辉三角中,每个数是它左上方和右上方的数的和. 示例 输入: 5 输出: [ ...
- Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionExcep linux下mysql修改连接超时wait_timeout修改后就ok了
Linux下mysql修改连接超时wait_timeout 1,首先: show variables like '%timeout%': 显示结果: +------------------------ ...