From 30913606003f7befedac99a68b9f437f780b545f Mon Sep 17 00:00:00 2001 From: Jan Poctavek Date: Sat, 29 Aug 2020 22:32:48 +0000 Subject: [PATCH] fix zabbix template for checking newer pgsql --- .../files/zabbix_templates/t_svc-db-ha.json | 193 ++++ .../files/zabbix_templates/t_zabbix-db.json | 933 ++++++++++++++++++ ans/upgrade/mon/v4.3.1/main.yml | 6 + 3 files changed, 1132 insertions(+) create mode 100644 ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_svc-db-ha.json create mode 100644 ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_zabbix-db.json create mode 100644 ans/upgrade/mon/v4.3.1/main.yml diff --git a/ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_svc-db-ha.json b/ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_svc-db-ha.json new file mode 100644 index 00000000..f9088d6d --- /dev/null +++ b/ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_svc-db-ha.json @@ -0,0 +1,193 @@ +{ + "zabbix_export": { + "date": "2015-12-03T21:45:28Z", + "templates": [ + { + "templates": [], + "name": "t_svc-db-ha", + "macros": [ + { + "macro": "{$PG_HA_SLAVES_COUNT}", + "value": "2" + } + ], + + "items": [ + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "120", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "pgsql.ha.connected_slaves", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "PostgreSQL connected slaves", + "applications": [ + { + "name": "Service - Database - HA" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "120", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "pgsql.ha.is_slave", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "PostgreSQL is slave?", + "applications": [ + { + "name": "Service - Database - HA" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "120", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "pgsql.ha.master_exists", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "PostgreSQL master exists?", + "applications": [ + { + "name": "Service - Database - HA" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + } + + ], + "screens": [], + "applications": [ + { + "name": "Service - Database - HA" + } + ], + "discovery_rules": [], + "groups": [ + { + "name": "Templates" + } + ], + "template": "t_svc-db-ha" + } + ], + "version": "2.0", + "groups": [ + { + "name": "Templates" + } + ], + "triggers": [ + { + "status": "0", + "description": "", + "url": "", + "type": "0", + "priority": "4", + "dependencies": [], + "expression": "({t_svc-db-ha:pgsql.ha.is_slave.max(#2)}<1 & {t_svc-db-ha:pgsql.ha.connected_slaves.max(#2)}<{$PG_HA_SLAVES_COUNT})", + "name": "PostgreSQL replication problem - less than {$PG_HA_SLAVES_COUNT} slaves connected" + }, + { + "status": "0", + "description": "", + "url": "", + "type": "0", + "priority": "4", + "dependencies": [], + "expression": "({t_svc-db-ha:pgsql.ha.master_exists.max(#2)}<1)", + "name": "No PostgreSQL master is running" + } + ] + } +} diff --git a/ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_zabbix-db.json b/ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_zabbix-db.json new file mode 100644 index 00000000..1ee8bafc --- /dev/null +++ b/ans/upgrade/mon/v4.3.1/files/zabbix_templates/t_zabbix-db.json @@ -0,0 +1,933 @@ +{ + "zabbix_export": { + "date": "2020-08-29T18:18:45Z", + "templates": [ + { + "templates": [], + "name": "t_zabbix-db", + "macros": [ + { + "macro": "{$PGCACHEHIT_THRESHOLD}", + "value": "75" + } + ], + "items": [ + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "1", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "30", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "0.000001", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Average database query duration. High values might mean performance issues.", + "data_type": "0", + "delay_flex": "", + "units": "s", + "value_type": "0", + "key": "pgbouncer.avg.qdur[zabbix]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database $1 average query duration", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Average number of queries over time.", + "data_type": "0", + "delay_flex": "", + "units": "qps", + "value_type": "3", + "key": "pgbouncer.avg.qps[zabbix]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database $1 queries", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Application specific \"ping\" check", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "pgbouncer.ping", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database pooler is responding", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Number of connected clients to database pooler.", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "pgbouncer.pool.cl_active[zabbix]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database $1 connected clients", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "", + "data_type": "0", + "delay_flex": "", + "units": "%", + "value_type": "0", + "key": "pgsql.cachehit_ratio[zabbix]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - cache hit ratio", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Number of connections to the database.", + "data_type": "0", + "delay_flex": "", + "units": "conn", + "value_type": "0", + "key": "pgsql.db.connections[zabbix]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - connections", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Overall size of the monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.db.size[zabbix]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Application specific \"ping\" check", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "pgsql.ping", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database is responding", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "'history_log' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[history_log]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table history_log size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "'history_str' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[history_str]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table history_str size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "1", + "authtype": "0", + "snmp_community": "", + "description": "'history_str_sync' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[history_str_sync]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table history_str_sync size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "1", + "authtype": "0", + "snmp_community": "", + "description": "'history_sync' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[history_sync]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table history_sync size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "'history_text' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[history_text]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table history_text size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "'history_uint' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[history_uint]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table history_uint size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "1", + "authtype": "0", + "snmp_community": "", + "description": "'history_uint_sync' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[history_uint_sync]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table history_uint_sync size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "300", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "'trends_uint' table size of monitoring database.", + "data_type": "0", + "delay_flex": "", + "units": "B", + "value_type": "0", + "key": "pgsql.table.size[trends_uint]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database zabbix - table trends_uint size", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Number of database pooler processes", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "proc.num[pgbouncer]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database pooler is running", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Number of database processes.", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "proc.num[postgres]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database is running (postgres process)", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + }, + { + "username": "", + "snmpv3_contextname": "", + "inventory_link": "0", + "multiplier": "0", + "trends": "365", + "snmpv3_authpassphrase": "", + "snmp_oid": "", + "snmpv3_securitylevel": "0", + "port": "", + "logtimefmt": "", + "delay": "60", + "publickey": "", + "params": "", + "snmpv3_securityname": "", + "formula": "1", + "type": "0", + "snmpv3_authprotocol": "0", + "valuemap": [], + "ipmi_sensor": "", + "status": "0", + "authtype": "0", + "snmp_community": "", + "description": "Number of database processes.", + "data_type": "0", + "delay_flex": "", + "units": "", + "value_type": "3", + "key": "proc.num[postmaster]", + "delta": "0", + "password": "", + "snmpv3_privpassphrase": "", + "snmpv3_privprotocol": "0", + "name": "Database is running (postmaster process)", + "applications": [ + { + "name": "Zabbix database" + } + ], + "privatekey": "", + "allowed_hosts": "", + "history": "7" + } + ], + "description": "", + "screens": [], + "applications": [ + { + "name": "Zabbix database" + } + ], + "discovery_rules": [], + "groups": [ + { + "name": "Templates" + } + ], + "template": "t_zabbix-db" + } + ], + "version": "3.0", + "groups": [ + { + "name": "Templates" + } + ], + "triggers": [ + { + "status": "1", + "description": "Cache hit ratio of last 5 minutes is too low, which might indicate bad database performance.", + "url": "", + "type": "0", + "priority": "1", + "dependencies": [ + { + "expression": "{t_zabbix-agent:agent.ping.nodata(3m)}=1", + "name": "Zabbix agent on {HOST.NAME} is unreachable for 3 minutes" + } + ], + "expression": "{t_zabbix-db:pgsql.cachehit_ratio[zabbix].avg(5m)}<{$PGCACHEHIT_THRESHOLD}", + "name": "Cache hit ratio of database \"zabbix\" is below {$PGCACHEHIT_THRESHOLD}%" + }, + { + "status": "0", + "description": "Monitoring database is not responding to \"ping\" checks and there might be problem connecting to the database.", + "url": "", + "type": "0", + "priority": "5", + "dependencies": [ + { + "expression": "{t_zabbix-db:proc.num[postgres].max(5m)}=0 and {t_zabbix-db:proc.num[postgres].max(5m)}=0", + "name": "Database is not running" + } + ], + "expression": "({TRIGGER.VALUE}=0 and {t_zabbix-db:pgsql.ping.min(3m)}>0) or ({TRIGGER.VALUE}=1 and {t_zabbix-db:pgsql.ping.max(5m)}>0)", + "name": "Database is not responding" + }, + { + "status": "0", + "description": "The database process \"postgres\" is not running and the monitoring system experiences problems. Further investigation why is it not running is needed.", + "url": "", + "type": "0", + "priority": "5", + "dependencies": [ + { + "expression": "{t_zabbix-agent:agent.ping.nodata(3m)}=1", + "name": "Zabbix agent on {HOST.NAME} is unreachable for 3 minutes" + } + ], + "expression": "{t_zabbix-db:proc.num[postgres].max(5m)}=0 and {t_zabbix-db:proc.num[postgres].max(5m)}=0", + "name": "Database is not running" + }, + { + "status": "0", + "description": "Database pooler is not responding to \"ping\" checks, monitoring system might experience troubles connecting to the database.", + "url": "", + "type": "0", + "priority": "5", + "dependencies": [ + { + "expression": "{t_zabbix-db:proc.num[pgbouncer].max(5m)}=0", + "name": "Database pooler is not running" + } + ], + "expression": "({TRIGGER.VALUE}=0 and {t_zabbix-db:pgbouncer.ping.min(3m)}>0) or ({TRIGGER.VALUE}=1 and {t_zabbix-db:pgbouncer.ping.max(5m)}>0)", + "name": "Database pooler is not responding" + }, + { + "status": "0", + "description": "The database pooler process \"pgbouncer\" is not running and the monitoring system experiences problems. Further investigation why is it not running is needed.", + "url": "", + "type": "0", + "priority": "5", + "dependencies": [ + { + "expression": "{t_zabbix-agent:agent.ping.nodata(3m)}=1", + "name": "Zabbix agent on {HOST.NAME} is unreachable for 3 minutes" + } + ], + "expression": "{t_zabbix-db:proc.num[pgbouncer].max(5m)}=0", + "name": "Database pooler is not running" + } + ] + } +} diff --git a/ans/upgrade/mon/v4.3.1/main.yml b/ans/upgrade/mon/v4.3.1/main.yml new file mode 100644 index 00000000..67819f73 --- /dev/null +++ b/ans/upgrade/mon/v4.3.1/main.yml @@ -0,0 +1,6 @@ +- name: Load Zabbix credentials + include: "{{ upg_base }}/lib/zabbix_credentials.yml" + +# https://github.com/erigones/esdc-ce/issues/387 +- name: Update fixed templates + include: "{{ upg_base }}/lib/zabbix_import_templates.yml"