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 ...
随机推荐
- Django的View(视图层)
目录 Django的View(视图层) 一.JsonResponse 二.后端接收前端的文件 三. FBV和CBV(源码分析) 四.settings.py配置文件源码分析 五. 请求对象(HttpRe ...
- 非线性支持向量机SVM
非线性支持向量机SVM 对于线性不可分的数据集, 我们引入了核(参考:核方法·核技巧·核函数) 线性支持向量机的算法如下: 将线性支持向量机转换成非线性支持向量机只需要将变为核函数即可: 非线性支持向 ...
- 【YOLO学习】召回率(Recall),精确率(Precision),平均正确率(Average_precision(AP) ),交除并(Intersection-over-Union(IoU))
摘要 在训练YOLO v2的过程中,系统会显示出一些评价训练效果的值,如Recall,IoU等等.为了怕以后忘了,现在把自己对这几种度量方式的理解记录一下. 这一文章首先假设一个测试集,然后围绕这一测 ...
- doc文件转txt
doc文件转txt # -*- coding:utf-8 -*- # 安装pywin32包 http://sourceforge.net/projects/pywin32/files/pywin32/ ...
- 17.3.15---关于GPIO控制流水灯的信息
添加一个网址: http://rmingwang.com/gpio-control-flow-lamp-code-archive.html 还有一个 http://www.openedv.com/po ...
- Codeforces Round #524 (Div. 2)C 二维坐标系求俩矩形面积交
题:https://codeforces.com/contest/1080/problem/C 题意:给n*m的二维坐标系,每个位置(xi,yi)都表示一个方格,(1,1)的位置是白色,整个坐标系黑白 ...
- 记录几个windows常用的快捷键和命令
1.打开文件夹 win+E 2.关闭当前窗口 ctrl+w 3.切换窗口 alt+tab 4.输入命令窗口 win+r 5.注册表的快捷键 regedit 6.打开远程 mstsc 7.命令设置开机启 ...
- pom配置项目build jar 包含源码的配置
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> ...
- 2017Google开发者大会
2017年12月14日有幸去上海跨国采购中心参加了2017Google开发者大会,这个大会有很多很有意思的展会以及技术分享.主题涵盖 Android.移动网络.Firebase.机器学习.云服务.AR ...
- King of the Waves
You are organising a king of the hill tournament, the Buenos Aires Paddleboarding Competition (BAPC) ...