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 ...
随机推荐
- 了解SSL证书从HTTPS开始 开发者绕不开的“劫”
微信小程序上线已经有很长一段时间了,而开发者在接入小程序的过程中,会遇到一些问题,例如小程序要求必须通过HTTPS完成服务端通信,开发者需搭建HTTPS服务,进行 SSL 证书申请.部署,完成HTTP ...
- Windows10配置Jmeter环境
注:在安装Jmeter之前,请先检查下电脑有没有装JDK:[Win+R]然后输入cmd->进入命令行界面,输入java -version 出现以下信息就是此电脑已安装了JDK.由于jmeter要 ...
- Python的变量和注释
变量 python的变量就像一个名字,一个变量对应一个内存地址.当我们定义一个变量时,Python解释器会在内存中开辟一片空间,用于存放各种数据(字符串.列表.元组.字典.对象....). 不同的变量 ...
- 控制台输出<迷你DVD管理>
使用顺序.选择.循环.跳转语句 数组 功能实现菜单显示和切换 输入的数字不符合要求直接退出程序 用户可以选择新增.查看. 删除.借出.归还.退出 思路分析 使用switch语句实现菜单选择 使用do- ...
- 小程序外链跳转web-view系列问题
1.当小程序需要跳转外链时要上小程序后台配置业务域名,配置业务域名需要上传一个验证文件到你跳转的外链的服务器上的根目录里: 2. (1)第一种方法:.当小程序在同一个页面根据后台接口获取的url进行小 ...
- ZZJ_淘淘商城项目:day02(淘淘商城01 - 项目讲解、环境搭建)
在用Eclipse的开发中,可手动排除不必要的依赖坐标传递. <!-- JPA的1.0依赖 --> <dependency> <groupId>javax.pers ...
- 虹软最新版 python 接口 完整版
虹软最新版 python 接口 完整版 当前开源的人脸检测模型,识别很多,很多小伙伴也踩过不少坑.相信不少使用过dlib和facenet人脸识别的小伙伴都有这样的疑惑,为什么论文里高达99.8以上的准 ...
- mysql_secure_installation 安全安装(用于生产环境设置)
编译安装完mysql5.6,如果用于生产环境,最好执行mysql_secure_installation来做一些常规化安全设置. 需要提前将~mysql/bin加入环境变量 /apps/mysql// ...
- The website is API(1)
Requests 自动爬取HTML页面 自动网路请求提交 robots 网络爬虫排除标准 Beautiful Soup 解析HTML页面 实战 Re 正则表达式详解提取页面关键信息 Scrapy*框架 ...
- HEX 文件格式
例 FDFFF885C3 :每行开头 第一个字节:表示本行的数据长度, 第二个,第三个字节表示本行数据的起始地址. 第四字节表示数据类型,数据类型有:0x00.0x01.0x02.0x03.0x04. ...