os: ubuntu 16.04
zabbix: 3.4

ip 规划
192.168.56.101 node1 pgsql 9.6 master
192.168.56.102 node2 pgsql 9.6 slave
192.168.56.103 node3 zabbix proxy
192.168.56.104 node4 zabbix server

本篇blog介绍在 node1、node2 节点上使用 shell脚本 监控 postgresql的具体过程。
使用 shell 脚本监控,就是比较灵活一点。

创建 shell_postgresql96.conf

# egrep ^[A-Z] /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=192.168.56.103
ServerActive=192.168.56.103
Hostname=node2
AllowRoot=1
Include=/etc/zabbix/zabbix_agentd.d/*.conf
LoadModulePath=/usr/lib/zabbix/modules
LoadModule=libzbxpgsql.so# vi /etc/zabbix/zabbix_agentd.d/shell_postgresql96.conf#postgresql
UserParameter=shell_postgresql96[*],/etc/zabbix/shell_postgresql96.sh $1 $2

创建 shell_postgresql96.sh

# cd /etc/zabbix
# vi shell_postgresql96.sh#!/bin/bash
# -------------------------------------------------------------------------------
# Filename:    shell_postgresql96.sh
# Revision:    1.0
# Date:        2018/09/06
# Description: zabbix 3.4 monitor postgresql-9.6 additional measure
# Notes:
# -------------------------------------------------------------------------------
#
#
# 2018/09/06    peiyongbin    initialization this shell scriptPGSQLHOST=localhost
PGSQLPORT=5432
PGSQLDATABASE=postgres
PGSQLUSER=zabbixsql=""
case $1 in'db_size')if [[ $2 == "" ]];thensql="select sum(pg_database_size(datid)) as db_size from pg_stat_database"elsesql="select pg_database_size(datid) as db_size from pg_stat_database where datname = '$2'"fi;;'db_cache_hit_ratio')if [[ $2 == "" ]];thensql="select cast(sum(blks_hit)/(sum(blks_read)+sum(blks_hit)+0.000001)*100.0 as numeric(5,2)) as cache_hit from pg_stat_database"else sql="select cast(blks_hit/(blks_read+blks_hit+0.000001)*100.0 as numeric(5,2)) as cache_hit from pg_stat_database where datname = '$2'"fi;;'db_commit_count')if [[ $2 == "" ]];thensql="select sum(xact_commit) as db_commit_count from pg_stat_database"else sql="select xact_commit as db_commit_count from pg_stat_database where datname = '$2'"fi;;'db_rollback_count')if [[ $2 == "" ]];thensql="select sum(xact_rollback) as db_rollback_count from pg_stat_database"else sql="select xact_rollback as db_rollback_count from pg_stat_database where datname = '$2'"fi;;'db_commit_ratio')if [[ $2 == "" ]];thensql="select cast(sum(xact_commit)/(sum(xact_rollback)+sum(xact_commit)+0.000001)*100.0 as numeric(5,2)) as db_commit_ratio from pg_stat_database"else sql="select cast(xact_commit/(xact_rollback+xact_commit+0.000001)*100.0 as numeric(5,2)) as db_commit_ratio from pg_stat_database where datname = '$2'"fi;;'db_rollback_ratio')if [[ $2 == "" ]];thensql="select cast(sum(xact_rollback)/(sum(xact_rollback)+sum(xact_commit)+0.000001)*100.0 as numeric(5,2)) as db_rollback_ratio from pg_stat_database"else sql="select cast(xact_rollback/(xact_rollback+xact_commit+0.000001)*100.0 as numeric(5,2)) as db_rollback_ratio from pg_stat_database where datname = '$2'"fi;;'db_max_connection')sql="select current_setting('max_connections')::int8";;'db_current_connection')if [[ $2 == "" ]];thensql="select sum(numbackends) from pg_stat_database "else sql="select numbackends from pg_stat_database where datname = '$2'"fi;;'db_current_connection_ratio')sql="select cast(sum(numbackends)/cast(current_setting('max_connections') as int8)*100.0 as numeric(5,2)) as conn_ratio from pg_stat_database ";;'db_current_connection_idle')if [[ $2 == "" ]];thensql="select count(1) from pg_stat_activity where state = 'idle'"else sql="select count(1) from pg_stat_activity where state = 'idle' and datname = '$2'"fi;;'db_current_connection_active')if [[ $2 == "" ]];thensql="select count(1) from pg_stat_activity where state = 'active' "else sql="select count(1) from pg_stat_activity where state = 'active' and datname = '$2'"fi;;'db_current_connection_intrans')if [[ $2 == "" ]];thensql="select count(1) from pg_stat_activity where state in ( 'idle in transaction','idle in transaction (aborted)' )"else sql="select count(1) from pg_stat_activity where state in ( 'idle in transaction','idle in transaction (aborted)' ) and datname = '$2'"fi;;'db_current_connection_waiting')if [[ $2 == "" ]];thensql="select count(1) from pg_stat_activity where wait_event like '%Lock%' "else sql="select count(1) from pg_stat_activity where wait_event like '%Lock%' and datname = '$2'"fi;;'db_current_connection_longtrans')if [[ $2 == "" ]];thensql="select count(1) as longtrans from pg_stat_activity where state <> 'idle' and extract(epoch FROM (clock_timestamp() - xact_start )) > 300 "else sql="select count(1) as longtrans from pg_stat_activity where state <> 'idle' and extract(epoch FROM (clock_timestamp() - xact_start )) > 300 and datname = '$2'"fi;;'db_current_connection_transtimemax')if [[ $2 == "" ]];thensql="select max(extract(epoch FROM (clock_timestamp() - xact_start ))) as longtrans from pg_stat_activity where state <> 'idle' "else sql="select max(extract(epoch FROM (clock_timestamp() - xact_start ))) as longtrans from pg_stat_activity where state <> 'idle' and datname = '$2'"fi;;'db_checkpoint_count')sql="select sum(checkpoints_timed + checkpoints_req) AS checkpoint_count from pg_stat_bgwriter where state <> 'idle'";;'db_stream_replica_count')sql="select count(1) as stream_count  from pg_stat_replication";;'db_stream_replica_delaymin')sql="select coalesce(min(pg_xlog_location_diff(sent_location, replay_location)),0) as stream_delaymin  from pg_stat_replication";;'db_stream_replica_delaymax')sql="select coalesce(max(pg_xlog_location_diff(sent_location, replay_location)),0) as stream_delaymax  from pg_stat_replication";;'db_tup_returned')if [[ $2 == "" ]];thensql="select sum(tup_returned) from pg_stat_database "else sql="select tup_returned from pg_stat_database where datname = '$2'"fi;;'db_tup_fetched')if [[ $2 == "" ]];thensql="select sum(tup_fetched) from pg_stat_database "else sql="select tup_fetched from pg_stat_database where datname = '$2'"fi;;'db_tup_inserted')if [[ $2 == "" ]];thensql="select sum(tup_inserted) from pg_stat_database "else sql="select tup_inserted from pg_stat_database where datname = '$2'"fi;;'db_tup_updated')if [[ $2 == "" ]];thensql="select sum(tup_updated) from pg_stat_database "else sql="select tup_updated from pg_stat_database where datname = '$2'"fi;;'db_tup_deleted')if [[ $2 == "" ]];thensql="select sum(tup_deleted) from pg_stat_database "else sql="select tup_deleted from pg_stat_database where datname = '$2'"fi;;'db_version')sql="select setting from pg_settings where name='server_version'";;
esacsu - postgres -c "psql -h $PGSQLHOST -U $PGSQLUSER -p $PGSQLPORT $PGSQLDATABASE -Atqc \"$sql\""

导入监控模版

zabbix web 页面操作

Configuration -> Templates -> Import

可以看到模版 Template_Shell_PostgreSQL96.xml

需要注意的是模版文件的 value_type 需要和 Shell_postgresql96.conf 对应之类型一致,否则会报错。
value_type integer
0 - 浮点数
1 - 字符
2 - 日志
3 - 数字(无正负)
4 - 文本

主机配置模板

zabbix web 页面操作

Configuration -> Hosts

点击某台机器,进去选择 Templates,
点击Select,选中 Template DB Shell PostgreSQL96 ,点击页下面的 Select
点击 Add
点击 Update

这个 shell 脚本是对 postgresql 监控的补充。

参考:
https://www.zabbix.com/documentation/3.4/zh/manual/config/items/userparameters
https://www.zabbix.com/documentation/3.4/zh/manual/config/items/userparameters/extending_agent

https://www.zabbix.com/documentation/3.4/zh/manual/xml_export_import/templates?s[]=value&s[]=type

Template_Shell_PostgreSQL96.xml 的具体内容,内容有点偏长

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export><version>3.4</version><date>2018-09-06T17:30:31Z</date><groups><group><name>Templates/Databases</name></group></groups><templates><template><template>Template DB Shell PostgreSQL96</template><name>Template DB Shell PostgreSQL96</name><description/><groups><group><name>Templates/Databases</name></group></groups><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application><application><name>Shell PostgreSQL96 Stream Replication</name></application></applications><items><item><name>Shell PostgreSQL Status</name><type>0</type><snmp_community/><snmp_oid/><key>net.tcp.listen[5432]</key><delay>30s</delay><history>90d</history><trends>365d</trends><status>0</status><value_type>3</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications/><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Max Connection</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_max_connection]</key><delay>60s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection]</key><delay>60s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection Ratio</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection_ratio]</key><delay>60s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection Idle</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection_idle]</key><delay>30s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection Active</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection_active]</key><delay>30s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection Intrans</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection_intrans]</key><delay>30s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection Waiting</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection_waiting]</key><delay>30s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection LongTrans</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection_longtrans]</key><delay>30s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Current Connection TransTimeMax</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_current_connection_transtimemax]</key><delay>30s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Backend Connections</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Stream Replication count</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_stream_replica_count]</key><delay>60s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Stream Replication</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Stream Replication DelayMin</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_stream_replica_delaymin]</key><delay>60s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Stream Replication</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL96 Stream Replication DelayMax</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_stream_replica_delaymax]</key><delay>60s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>0</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications><application><name>Shell PostgreSQL96 Stream Replication</name></application></applications><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item><item><name>Shell PostgreSQL Version</name><type>0</type><snmp_community/><snmp_oid/><key>shell_postgresql96[db_version]</key><delay>60s</delay><history>90d</history><trends>0</trends><status>0</status><value_type>1</value_type><allowed_hosts/><units/><snmpv3_contextname/><snmpv3_securityname/><snmpv3_securitylevel>0</snmpv3_securitylevel><snmpv3_authprotocol>0</snmpv3_authprotocol><snmpv3_authpassphrase/><snmpv3_privprotocol>0</snmpv3_privprotocol><snmpv3_privpassphrase/><params/><ipmi_sensor/><authtype>0</authtype><username/><password/><publickey/><privatekey/><port/><description/><inventory_link>0</inventory_link><applications/><valuemap/><logtimefmt/><preprocessing/><jmx_endpoint/><master_item/></item></items><discovery_rules/><httptests/><macros/><templates/><screens/></template></templates><triggers><trigger><expression>{Template DB Shell PostgreSQL96:net.tcp.listen[5432].last()}=0</expression><recovery_mode>0</recovery_mode><recovery_expression/><name>PostgreSQL is down</name><correlation_mode>0</correlation_mode><correlation_tag/><url/><status>0</status><priority>4</priority><description/><type>0</type><manual_close>0</manual_close><dependencies/><tags/></trigger><trigger><expression>{Template DB Shell PostgreSQL96:shell_postgresql96[db_current_connection_ratio].last()}>0.8</expression><recovery_mode>0</recovery_mode><recovery_expression/><name>PostgreSQL Current Connection Too Many</name><correlation_mode>0</correlation_mode><correlation_tag/><url/><status>0</status><priority>4</priority><description/><type>0</type><manual_close>0</manual_close><dependencies/><tags/></trigger><trigger><expression>{Template DB Shell PostgreSQL96:shell_postgresql96[db_current_connection_intrans].last()}>10</expression><recovery_mode>0</recovery_mode><recovery_expression/><name>PostgreSQL Current Connection Intrans Too Many</name><correlation_mode>0</correlation_mode><correlation_tag/><url/><status>0</status><priority>4</priority><description/><type>0</type><manual_close>0</manual_close><dependencies/><tags/></trigger><trigger><expression>{Template DB Shell PostgreSQL96:shell_postgresql96[db_current_connection_longtrans].last()}>5</expression><recovery_mode>0</recovery_mode><recovery_expression/><name>PostgreSQL Current Connection Longtrans Too Many</name><correlation_mode>0</correlation_mode><correlation_tag/><url/><status>0</status><priority>4</priority><description/><type>0</type><manual_close>0</manual_close><dependencies/><tags/></trigger><trigger><expression>{Template DB Shell PostgreSQL96:shell_postgresql96[db_stream_replica_count].last()}=0</expression><recovery_mode>0</recovery_mode><recovery_expression/><name>PostgreSQL Stream Replication is Offline</name><correlation_mode>0</correlation_mode><correlation_tag/><url/><status>0</status><priority>4</priority><description/><type>0</type><manual_close>0</manual_close><dependencies/><tags/></trigger><trigger><expression>{Template DB Shell PostgreSQL96:shell_postgresql96[db_stream_replica_delaymin].last()}>10240000</expression><recovery_mode>0</recovery_mode><recovery_expression/><name>PostgreSQL Stream Replication Delay Too Long</name><correlation_mode>0</correlation_mode><correlation_tag/><url/><status>0</status><priority>4</priority><description/><type>0</type><manual_close>0</manual_close><dependencies/><tags/></trigger></triggers><graphs><graph><name>Shell PostgreSQL96 Connection</name><width>900</width><height>200</height><yaxismin>0.0000</yaxismin><yaxismax>100.0000</yaxismax><show_work_period>1</show_work_period><show_triggers>1</show_triggers><type>0</type><show_legend>1</show_legend><show_3d>0</show_3d><percent_left>0.0000</percent_left><percent_right>0.0000</percent_right><ymin_type_1>0</ymin_type_1><ymax_type_1>0</ymax_type_1><ymin_item_1>0</ymin_item_1><ymax_item_1>0</ymax_item_1><graph_items><graph_item><sortorder>0</sortorder><drawtype>0</drawtype><color>1A7C11</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_max_connection]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>0</drawtype><color>F63100</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_current_connection]</key></item></graph_item></graph_items></graph><graph><name>Shell PostgreSQL96 Current Connection</name><width>900</width><height>200</height><yaxismin>0.0000</yaxismin><yaxismax>100.0000</yaxismax><show_work_period>1</show_work_period><show_triggers>1</show_triggers><type>0</type><show_legend>1</show_legend><show_3d>0</show_3d><percent_left>0.0000</percent_left><percent_right>0.0000</percent_right><ymin_type_1>0</ymin_type_1><ymax_type_1>0</ymax_type_1><ymin_item_1>0</ymin_item_1><ymax_item_1>0</ymax_item_1><graph_items><graph_item><sortorder>0</sortorder><drawtype>0</drawtype><color>00C800</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_current_connection_active]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>0</drawtype><color>C80000</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_current_connection_intrans]</key></item></graph_item><graph_item><sortorder>2</sortorder><drawtype>0</drawtype><color>0000C8</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_current_connection_waiting]</key></item></graph_item><graph_item><sortorder>3</sortorder><drawtype>0</drawtype><color>C800C8</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_current_connection_longtrans]</key></item></graph_item></graph_items></graph><graph><name>Shell PostgreSQL96 Stream Replication</name><width>900</width><height>200</height><yaxismin>0.0000</yaxismin><yaxismax>100.0000</yaxismax><show_work_period>1</show_work_period><show_triggers>1</show_triggers><type>0</type><show_legend>1</show_legend><show_3d>0</show_3d><percent_left>0.0000</percent_left><percent_right>0.0000</percent_right><ymin_type_1>0</ymin_type_1><ymax_type_1>0</ymax_type_1><ymin_item_1>0</ymin_item_1><ymax_item_1>0</ymax_item_1><graph_items><graph_item><sortorder>0</sortorder><drawtype>0</drawtype><color>1A7C11</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_stream_replica_delaymin]</key></item></graph_item><graph_item><sortorder>1</sortorder><drawtype>0</drawtype><color>F63100</color><yaxisside>0</yaxisside><calc_fnc>2</calc_fnc><type>0</type><item><host>Template DB Shell PostgreSQL96</host><key>shell_postgresql96[db_stream_replica_delaymax]</key></item></graph_item></graph_items></graph></graphs>
</zabbix_export>

转载于:https://www.cnblogs.com/ctypyb2002/p/9792882.html

ubuntu 16.04 + zabbix 3.4 + postgresql shell相关推荐

  1. ubuntu 16.04 + zabbix 3.4 + postgresql libzbxpgsql

    os: ubuntu 16.04 zabbix: 3.4 ip 规划 192.168.56.101 node1 pgsql 9.6 master 192.168.56.102 node2 pgsql ...

  2. ubuntu 16.04 + zabbix 3.4 + postgresql pg_monz

    os: ubuntu 16.04 zabbix: 3.4 pg_monz: 2.1 ip 规划 192.168.56.101 node1 pgsql 9.6 master 192.168.56.102 ...

  3. ubuntu安装pr_在Ubuntu 16.04服务器上安装Zabbix 3.2

    监控服务器 - 什么是Zabbix Zabbix是企业级开源分布式监控服务器解决方案. 该软件监控网络的不同参数和服务器的完整性,还允许为任何事件配置基于电子邮件的警报. Zabbix根据存储在数据库 ...

  4. Ubuntu 16.04安装Zabbix 3.2 版本

    系统环境:ubuntu16.04 注意:为了便于实验测试,需要关闭防火墙: parallels@zabbix-server:~$ sudo systemctl stop ufw   parallels ...

  5. 入门系列之使用Sysdig监视您的Ubuntu 16.04系统

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由乌鸦 发表于云+社区专栏 介绍 Sysdig是一个全面的开源系统活动监控,捕获和分析应用程序.它具有强大的过滤语言和可自定义的输出,以 ...

  6. 入门系列之使用Sysdig监视您的Ubuntu 16.04系统 1

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由乌鸦 发表于云+社区专栏 介绍 Sysdig是一个全面的开源系统活动监控,捕获和分析应用程序.它具有强大的过滤语言和可自定义的输出,以 ...

  7. 如何保护Ubuntu 16.04上的NGINX Web服务器

    什么是 Let's Encrypt Let's Encrypt 是互联网安全研究组织 (ISRG) 提供的免费证书认证机构.它提供了一种轻松自动的方式来获取免费的 SSL/TLS 证书 - 这是在 W ...

  8. Install Qt5 on Ubuntu 16.04

    为什么80%的码农都做不了架构师?>>>    Ubuntu 16.04 在线安装Qt5,由于某些不可描述的原因,导致在线安装很慢.所以使用镜像源安装,这里使用的是"中国科 ...

  9. Ubuntu 16.04 LTS下编译GPU版tensorflow

    Ubuntu 16.04 LTS下编译GPU版tensorflow 机器学习与数学 · 2016-06-10 13:51 作者: 比特小组 机器学习与数学出品 机器学习必然涉及到代码,本小组选择sci ...

  10. Ubuntu 16.04 和 Ubuntu 18.04 启用 点击Launcher图标,窗口实现最小化 功能

    安装了Ubuntu之后,要是每次都点击最小化按钮来实现窗口的最小化,操作起来很不方便,那么怎样才能方便操作呢, Ubuntu 16.04 本身支持 点击应用程序Launcher图标实现最小化 功能,只 ...

最新文章

  1. 完全平方数(打表+二分)
  2. SQL Loader 的使用详解
  3. Android相机的实现
  4. 如何将Wav文件做到EXE文件里
  5. 逆向推导https的设计过程
  6. DiscuzNT 1.0正式版推出了
  7. html页面中文乱码处理
  8. 10. IDENTITY属性使用小结
  9. 小谈android/Linux rootkit(基于LKM)
  10. tensorflow之saver
  11. 启用zhparser插件时一直报Permission denied
  12. IDEA代码格式化会快捷键Ctrl+Alt+L失效
  13. 下载谷歌浏览器和谷歌驱动
  14. mike21换成计算机名称,MIKE 21
  15. JVM——Java类加载机制总结
  16. CAD卸载不干净不能重新安装(恶心死我了)
  17. matlab中men,matlab blackman函数
  18. 技术经理成长复盘-激励
  19. linux 查看mmc分区_Linux MMC介绍
  20. vue改变class内的属性_vue 绑定 添加class 属性 4种方法 添加style 3中方法 v-bind /:...

热门文章

  1. oracle滚动统计,sql – 按月滚动或运行Oracle总计
  2. java lombok ppt,Lombok详解
  3. ubuntu开机自启动脚本
  4. python数字图像处理(15):霍夫线变换
  5. 2021-06-24相对定位
  6. C++ std::enable_shared_from_this
  7. C++ 访问成员 “->“还是“.“
  8. Hyperledger Fabric 或 Composer的configtx.yaml配置文件解析
  9. python爬虫之多线程、多进程爬虫_python 多线程,多进程,高效爬虫
  10. IO流总结-知识体系