配置aws cli
确保被监控的rds在管理的账户下
服务器上配置取值PY脚本
vim rds_stats.py
#!/usr/bin/python
#############################################################################
# Date:9/22/2021 #
# #
#This script was used to get rds monitor data through Cloudwatch by aws-cli.#
# ***Example CMD*** #
# python3 rds_stats.py -i "$rds_name" -m "$metric" -p "$profile" #
#############################################################################
import datetime
import sys
from optparse import OptionParser
import boto3
### Arguments
parser = OptionParser()
parser.add_option("-i", "--instance-id", dest="instance_id",default="",
help="DBInstanceIdentifier")
parser.add_option("-m", "--metric", dest="metric",default="",
help="RDS cloudwatch metric")
parser.add_option("-p", "--profile", dest="profile", default="default",
help="ProfileNumber")
#map argus
(options, args) = parser.parse_args()
if (options.instance_id == None):
parser.error("-i DBInstanceIdentifier is required")
if (options.metric == None):
parser.error("-m RDS cloudwatch metric is required")
### Real code
metrics = {"CPUUtilization":{"type":"float", "value":None},
"ReadLatency":{"type":"float", "value":None},
"DatabaseConnections":{"type":"int", "value":None},
"FreeableMemory":{"type":"float", "value":None},
"ReadIOPS":{"type":"int", "value":None},
"WriteLatency":{"type":"float", "value":None},
"WriteThroughput":{"type":"float", "value":None},
"WriteIOPS":{"type":"int", "value":None},
"SwapUsage":{"type":"float", "value":None},
"ReadThroughput":{"type":"float", "value":None},
"DiskQueueDepth":{"type":"float", "value":None},
"ReplicaLag":{"type":"int", "value":None},
"DiskQueueDepth":{"type":"float", "value":None},
"ReplicaLag":{"type":"int", "value":None},
"NetworkReceiveThroughput":{"type":"float", "value":None},
"NetworkTransmitThroughput":{"type":"float", "value":None},
"FreeStorageSpace":{"type":"float", "value":None}}
end = datetime.datetime.utcnow()
start = end - datetime.timedelta(minutes=5)
### Zabbix hack for supporting FQDN addresses
### This is useful if you have instances with the same nam but in diffrent AWS locations (i.e. db1 in eu-central-1 and db1 in us-east-1)
if "." in options.instance_id:
options.instance_id = options.instance_id.split(".")[0]
connect = boto3.session.Session(profile_name=options.profile)
conn = connect.client('cloudwatch')
if options.metric in metrics.keys():
k = options.metric
vh = metrics[options.metric]
try:
res = conn.get_metric_statistics(Namespace="AWS/RDS", MetricName=k, Dimensions=[{'Name': "DBInstanceIdentifier", 'Value': options.instance_id}], StartTime=start, EndTime=end, Period=60, Statistics=["Average"])
except Exception as e:
print("status err Error running rds_stats: %s" % e)
sys.exit(1)
datapoints = res.get('Datapoints')
if len(datapoints) == 0:
print("Could not find datapoints for specified instance. Please review if provided instance (%s) and profile (%s) are correct" % (options.instance_id, options.profile)) # probably instance-id is wonrg
average = datapoints[-1].get('Average') # last item in result set
if (k == "FreeStorageSpace" or k == "FreeableMemory"):
average = average / 1024.0**3.0
if vh["type"] == "float":
metrics[k]["value"] = "%.4f" % average
if vh["type"] == "int":
metrics[k]["value"] = "%i" % average
#print "metric %s %s %s" % (k, vh["type"], vh["value"])
print("%s" % (vh["value"]))
把脚本放到 zabbix/externalscripts下面
vim rds_ping.sh
#!/bin/bash
/usr/local/bin/aws rds describe-db-instances --db-instance-identifier $1 --profile=$2 | grep DBInstanceStatus | awk -F "\"" '{print $4}'
web端控制台
Host name=数据库标识符
DNS name=终端节点
端口默认就行
创建个xml文件导入到zabbix模板,把rds这台主机添加下面这个模板
监控模板
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.0</version>
<date>2021-08-30T03:11:13Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template AWS RDS test</template>
<name>Template AWS RDS test</name>
<description/>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>AWS RDS</name>
</application>
<application>
<name>Ping</name>
</application>
</applications>
<items>
<item>
<name>FreeStorageSpace utilization</name>
<type>15</type>
<snmp_community/>
<snmp_oid/>
<key>DU[FreeStorageSpace]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>%</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>100*(last("rds_stats.py[\"--metric\",\"FreeStorageSpace\",\"--instance-id\",\"{HOST.HOST}\",\"--access-key\",\"{$AWS_ACCESS_KEY}\",\"--secret-key\",\"{$AWS_SECRET_KEY}\",\"--region\",\"{$REGION}\"]")/1500)</params>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>Memory Utilization</name>
<type>15</type>
<snmp_community/>
<snmp_oid/>
<key>DU[memory]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>%</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>100*(1-last("rds_stats.py[\"--metric\",\"FreeableMemory\",\"--instance-id\",\"{HOST.HOST}\",\"--access-key\",\"{$AWS_ACCESS_KEY}\",\"--secret-key\",\"{$AWS_SECRET_KEY}\",\"--region\",\"{$REGION}\"]")/32)</params>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>DBInstanceStatus</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_ping.sh</key>
<delay>1m</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>
<application>
<name>Ping</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>CPUUtilization</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","CPUUtilization","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>%</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>DatabaseConnections</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","DatabaseConnections","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</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>
<application>
<name>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>DiskQueueDepth</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","DiskQueueDepth","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>FreeableMemory</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","FreeableMemory","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>FreeStorageSpace</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","FreeStorageSpace","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>GB</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>Network Receive Throughput</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","NetworkReceiveThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>bps</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>Network Transmit Throughput</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","NetworkTransmitThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>bps</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>ReadIOPS</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","ReadIOPS","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>ReadLatency</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","ReadLatency","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>ms</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>ReadThroughput</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","ReadThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>Bytes/Second</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>SwapUsage</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","SwapUsage","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>Bytes</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>WriteIOPS</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","WriteIOPS","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>WriteLatency</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","WriteLatency","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>ms</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
<item>
<name>WriteThroughput</name>
<type>10</type>
<snmp_community/>
<snmp_oid/>
<key>rds_stats.py["--metric","WriteThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
<delay>5m</delay>
<history>90d</history>
<trends>365d</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>Bytes/Second</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>AWS RDS</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
<preprocessing/>
<jmx_endpoint/>
<timeout>3s</timeout>
<url/>
<query_fields/>
<posts/>
<status_codes>200</status_codes>
<follow_redirects>1</follow_redirects>
<post_type>0</post_type>
<http_proxy/>
<headers/>
<retrieve_mode>0</retrieve_mode>
<request_method>0</request_method>
<output_format>0</output_format>
<allow_traps>0</allow_traps>
<ssl_cert_file/>
<ssl_key_file/>
<ssl_key_password/>
<verify_peer>0</verify_peer>
<verify_host>0</verify_host>
<master_item/>
</item>
</items>
<discovery_rules/>
<httptests/>
<macros>
<macro>
<macro>{$AWS_ACCESS_KEY}</macro>
<value/>
</macro>
<macro>
<macro>{$AWS_SECRET_KEY}</macro>
<value/>
</macro>
<macro>
<macro>{$REGION}</macro>
<value>us-east-1</value>
</macro>
</macros>
<templates/>
<screens>
<screen>
<name>RDS Metrics</name>
<hsize>2</hsize>
<vsize>7</vsize>
<screen_items>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>0</x>
<y>0</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>CPUUtilization</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>1</x>
<y>0</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>FreeableMemory</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>0</x>
<y>1</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>ReadIOPS</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>1</x>
<y>1</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>WriteIOPS</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>0</x>
<y>2</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>ReadThroughput</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>1</x>
<y>2</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>WriteThroughput</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>0</x>
<y>3</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>ReadLatency</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>1</x>
<y>3</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>WriteLatency</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>0</x>
<y>4</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>FreeStorageSpace</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>1</x>
<y>4</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>SwapUsage</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>0</x>
<y>5</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>DatabaseConnections</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
<screen_item>
<resourcetype>0</resourcetype>
<width>500</width>
<height>100</height>
<x>1</x>
<y>5</y>
<colspan>1</colspan>
<rowspan>1</rowspan>
<elements>0</elements>
<valign>0</valign>
<halign>0</halign>
<style>0</style>
<url/>
<dynamic>0</dynamic>
<sort_triggers>0</sort_triggers>
<resource>
<name>DiskQueueDepth</name>
<host>Template AWS RDS test</host>
</resource>
<max_columns>3</max_columns>
<application/>
</screen_item>
</screen_items>
</screen>
</screens>
</template>
</templates>
<triggers>
<trigger>
<expression>{Template AWS RDS test:rds_stats.py["--metric","CPUUtilization","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"].last(#3)}>90</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>CPU utilization is critical</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 AWS RDS test:rds_stats.py["--metric","CPUUtilization","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"].last(#3)}<=90 and {Template AWS RDS test:rds_stats.py["--metric","CPUUtilization","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"].last(#3)}>80</expression>
<recovery_mode>1</recovery_mode>
<recovery_expression>{Template AWS RDS test:rds_stats.py["--metric","CPUUtilization","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"].last(#3)}<=80</recovery_expression>
<name>CPU utilization is Warning</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<manual_close>0</manual_close>
<dependencies/>
<tags/>
</trigger>
<trigger>
<expression>{Template AWS RDS test:DU[FreeStorageSpace].last(#1)}<10</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>FreeStorageSpace is Critical</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 AWS RDS test:DU[FreeStorageSpace].last(#1)}>=10 and {Template AWS RDS test:DU[FreeStorageSpace].last(#1)}<20</expression>
<recovery_mode>1</recovery_mode>
<recovery_expression>{Template AWS RDS test:DU[FreeStorageSpace].last(#1)}>=20</recovery_expression>
<name>FreeStorageSpace is Warning</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<manual_close>0</manual_close>
<dependencies/>
<tags/>
</trigger>
<trigger>
<expression>{Template AWS RDS test:DU[memory].avg(3)}>90</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>Memory utilization is critical</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 AWS RDS test:DU[memory].last(#3)}>85 and {Template AWS RDS test:DU[memory].avg(3)}<=90</expression>
<recovery_mode>1</recovery_mode>
<recovery_expression>{Template AWS RDS test:DU[memory].avg(3)}<=85</recovery_expression>
<name>Memory utilization is Warning</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<manual_close>0</manual_close>
<dependencies/>
<tags/>
</trigger>
<trigger>
<expression>{Template AWS RDS test:rds_ping.sh.str(“available”,#1)}=1 or {Template AWS RDS test:rds_ping.sh.str(“backing-up”,#1)}=1</expression>
<recovery_mode>0</recovery_mode>
<recovery_expression/>
<name>RDS pssp-prd is Down</name>
<correlation_mode>0</correlation_mode>
<correlation_tag/>
<url/>
<status>0</status>
<priority>5</priority>
<description/>
<type>0</type>
<manual_close>0</manual_close>
<dependencies/>
<tags/>
</trigger>
</triggers>
<graphs>
<graph>
<name>CPUUtilization</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>0000EE</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","CPUUtilization","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>DatabaseConnections</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","DatabaseConnections","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>DiskQueueDepth</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","DiskQueueDepth","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>FreeableMemory</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","FreeableMemory","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>FreeStorageSpace</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","FreeStorageSpace","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>IOPS</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","ReadIOPS","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>0</drawtype>
<color>00C800</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","WriteIOPS","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>Network Usage</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>3333FF</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","NetworkReceiveThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>0</drawtype>
<color>00C800</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","NetworkTransmitThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>ReadIOPS</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","ReadIOPS","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>ReadLatency</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","ReadLatency","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>ReadThroughput</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","ReadThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>SwapUsage</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","SwapUsage","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>WriteIOPS</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","WriteIOPS","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>WriteLatency</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","WriteLatency","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>WriteThroughput</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>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template AWS RDS test</host>
<key>rds_stats.py["--metric","WriteThroughput","--instance-id","{HOST.HOST}","--access-key","{$AWS_ACCESS_KEY}","--secret-key","{$AWS_SECRET_KEY}","--region","{$REGION}"]</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
</zabbix_export>
添加item
模板里需要更改的有下面两个item,因为应用了变量TOTAL_MEMORY、TOTAL_STORAGE
Memory Utilization
100*(1-last("rds_stats.py[\"--metric\",\"FreeableMemory\",\"--instance-id\",\"{HOST.HOST}\",\"--access-key\",\"{$AWS_ACCESS_KEY}\",\"--secret-key\",\"{$AWS_SECRET_KEY}\",\"--region\",\"{$REGION}\"]")/{$TOTAL_MEMORY})
FreeStorageSpace utilization
100*(last("rds_stats.py[\"--metric\",\"FreeStorageSpace\",\"--instance-id\",\"{HOST.HOST}\",\"--access-key\",\"{$AWS_ACCESS_KEY}\",\"--secret-key\",\"{$AWS_SECRET_KEY}\",\"--region\",\"{$REGION}\"]")/{$TOTAL_STORAGE})
查看数据获取是否正常