-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for kinesis application metrics
- Adding another template support for pulling metrics for kinesis applications. Kinesis applications cannot be "discovered" so they can't be parameterized and they have to be known in advance. In other words, the namespace field has to be filled out. The template however can discover all the shards and streams that are available Change-Id: I84793c40c3cbe3fd0c6800df58d2bad4bec58b76
- Loading branch information
Giannis Neokleous
committed
Aug 20, 2015
1 parent
914488a
commit bd9fa0e
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{%- set metrics = {'DataBytesProcessed': {'stat': 'Average', 'unit': 'Bytes'}, | ||
'KinesisDataFetcher.getRecords.Success': {'stat': 'Average', 'unit': 'Count'}, | ||
'KinesisDataFetcher.getRecords.Time': {'stat': 'Average', 'unit': 'Milliseconds'}, | ||
'MillisBehindLatest': {'stat': 'Average', 'unit': 'Milliseconds'}, | ||
'RecordsProcessed': {'stat': 'Average', 'unit': 'Count'}, | ||
'Success': {'stat': 'Average', 'unit': 'Count'}, | ||
'Time': {'stat': 'Average', 'unit': 'Milliseconds'}, | ||
'UpdateLease.Success': {'stat': 'Average', 'unit': 'Count'}, | ||
'UpdateLease.Time': {'stat': 'Average', 'unit': 'Milliseconds'} | ||
} -%} | ||
|
||
# If connecting to a different region other than default, set region | ||
Auth: | ||
region: "{{ region }}" | ||
Metrics: | ||
{%- for stream_name, shards in resources.iteritems() %} | ||
{%- for shard in shards %} | ||
{%- for metric in metrics %} | ||
- Namespace: "kinesis-application-name" | ||
MetricName: "{{ metric }}" | ||
Statistics: "{{ metrics[metric]['stat'] }}" | ||
Unit: "{{ metrics[metric]['unit'] }}" | ||
Dimensions: | ||
ShardId: "{{ shard }}" | ||
Operation: "ProcessTask" | ||
Options: | ||
Formatter: 'cloudwatch.{{ stream_name}}.%(Namespace)s.%(MetricName)s.{{ shard }}.%(statistic)s.%(Unit)s' | ||
Period: 5 | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} |