Skip to content

Commit ce858fb

Browse files
committed
improve comments and add example
Signed-off-by: Lukas Wöhrl <[email protected]>
1 parent e089bca commit ce858fb

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

docs/configuration.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ statistics:
137137
# Export the metric with the original CloudWatch timestamp (General Setting for all metrics in this job)
138138
[ addCloudwatchTimestamp: <boolean> ]
139139

140-
# Include any metrics in the past if they are present in the CloudWatch metric response. This is useful, for example, if a metric is setup with
141-
# period 60s and length 300s so all the 5 data points are exposed in the metrics endpoint and not just the last one
140+
# Enables the inclusion of past metric data points from the CloudWatch response if available.
141+
# This is useful when a metric is configured with a 60-second period and a 300-second duration, ensuring that all
142+
# five data points are exposed at the metrics endpoint instead of only the latest one.
143+
# Note: This option requires `addCloudwatchTimestamp` to be enabled
142144
# (General Setting for all metrics in this job)
143145
[ addHistoricalMetrics: <boolean> ]
144146

@@ -277,8 +279,10 @@ statistics:
277279
# Export the metric with the original CloudWatch timestamp (General Setting for all metrics in this job)
278280
[ addCloudwatchTimestamp: <boolean> ]
279281

280-
# Include any metrics in the past if they are present in the CloudWatch metric response. This is useful, for example, if a metric is setup with
281-
# period 60s and length 300s so all the 5 data points are exposed in the metrics endpoint and not just the last one
282+
# Enables the inclusion of past metric data points from the CloudWatch response if available.
283+
# This is useful when a metric is configured with a 60-second period and a 300-second duration, ensuring that all
284+
# five data points are exposed at the metrics endpoint instead of only the latest one.
285+
# Note: This option requires `addCloudwatchTimestamp` to be enabled
282286
# (General Setting for all metrics in this job)
283287
[ addHistoricalMetrics: <boolean> ]
284288

examples/historic-data.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: v1alpha1
2+
discovery:
3+
jobs:
4+
- type: AWS/SQS
5+
regions:
6+
- us-east-1
7+
period: 60
8+
length: 300
9+
addCloudwatchTimestamp: true
10+
addHistoricalMetrics: true
11+
metrics:
12+
- name: NumberOfMessagesSent
13+
statistics: [Sum]
14+
- name: NumberOfMessagesReceived
15+
statistics: [Sum]
16+
- name: NumberOfMessagesDeleted
17+
statistics: [Sum]
18+
- name: ApproximateAgeOfOldestMessage
19+
statistics: [Average]
20+
- name: NumberOfEmptyReceives
21+
statistics: [Sum]
22+
- name: SentMessageSize
23+
statistics: [Average]
24+
- name: ApproximateNumberOfMessagesNotVisible
25+
statistics: [Sum]
26+
- name: ApproximateNumberOfMessagesDelayed
27+
statistics: [Sum]
28+
- name: ApproximateNumberOfMessagesVisible
29+
statistics: [Sum]

0 commit comments

Comments
 (0)