Skip to content

Commit

Permalink
Merge pull request #34 from tmclaugh/add_rds_support
Browse files Browse the repository at this point in the history
Add RDS example
  • Loading branch information
crccheck committed Mar 5, 2016
2 parents c097fd1 + 3ebec73 commit 8c8841e
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions sample_templates/rds.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{#- config template for RDS -#}

{%- set metrics = {
'BinLogDiskUsage': {'stat': 'Average', 'unit': 'Bytes'},
'CPUCreditUsage': {'stat': 'Sum', 'unit': 'Count'},
'CPUCreditBalance': {'stat': 'Sum', 'unit': 'Count'},
'CPUUtilization': {'stat': 'Average', 'unit': 'Percent'},
'DatabaseConnections': {'stat': 'Average', 'unit': 'Count'},
'DiskQueueDepth': {'stat': 'Average', 'unit': 'Count'},
'FreeableMemory': {'stat': 'Average', 'unit': 'Bytes'},
'FreeStorageSpace': {'stat': 'Average', 'unit': 'Bytes'},
'ReplicaLag': {'stat': 'Average', 'unit': 'Seconds'},
'SwapUsage': {'stat': 'Average', 'unit': 'Bytes'},
'ReadIOPS': {'stat': 'Average', 'unit': 'Count/Second'},
'WriteIOPS': {'stat': 'Average', 'unit': 'Count/Second'},
'ReadLatency': {'stat': 'Average', 'unit': 'Seconds'},
'WriteLatency': {'stat': 'Average', 'unit': 'Seconds'},
'ReadThroughput': {'stat': 'Average', 'unit': 'Bytes/Second'},
'WriteThroughput': {'stat': 'Average', 'unit': 'Bytes/Second'},
'NetworkReceiveThroughput': {'stat': 'Average', 'unit': 'Bytes/Second'},
'NetworkTransmitThroughput': {'stat': 'Average', 'unit': 'Bytes/Second'},
}
-%}

Auth:
region: "{{ region }}"

Metrics:
{%- for rds in resources %}
{%- for metric in metrics %}
- Namespace: "AWS/RDS"
MetricName: "{{ metric }}"
Statistics:
- "{{ metrics[metric]['stat'] }}"
Unit: "{{ metrics[metric]['unit'] }}"
Dimensions:
DBInstanceIdentifier: "{{ rds.id }}"
Options:
Formatter: 'cloudwatch.%(Namespace)s.{{ rds }}.%(MetricName)s.%(statistic)s.%(Unit)s'
{%- endfor %}
{%- endfor %}

0 comments on commit 8c8841e

Please sign in to comment.