Skip to content

Commit

Permalink
Change SQS metrics statistic method (#40207)
Browse files Browse the repository at this point in the history
* Change SQS metrics statistic method

* add doc change and changelog
  • Loading branch information
kaiyan-sheng authored Jul 24, 2024
1 parent 5195020 commit 918edab
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Fix behavior of pagetypeinfo metrics {pull}39985[39985]
- Fix query logic for temp and non-temp tablespaces in Oracle module. {issue}38051[38051] {pull}39787[39787]
- Set GCP metrics config period to the default (60s) when the value is below the minimum allowed period. {issue}30434[30434] {pull}40020[40020]
- Fix statistic methods for metrics collected for SQS. {pull}40207[40207]
- Add GCP 'instance_id' resource label in ECS cloud fields. {issue}40033[40033] {pull}40062[40062]
- Fix missing metrics from CloudWatch when include_linked_accounts set to false. {issue}40071[40071] {pull}40135[40135]
- Update beat module with apm-server monitoring metrics fields {pull}40127[40127]
Expand Down
10 changes: 5 additions & 5 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4853,7 +4853,7 @@ type: long
*`aws.sqs.oldest_message_age.sec`*::
+
--
The approximate age of the oldest non-deleted message in the queue.
The maximum approximate age of the oldest non-deleted message in the queue.


type: long
Expand Down Expand Up @@ -4895,7 +4895,7 @@ type: long
*`aws.sqs.messages.deleted`*::
+
--
The number of messages deleted from the queue.
The total number of messages deleted from the queue.


type: long
Expand All @@ -4905,7 +4905,7 @@ type: long
*`aws.sqs.messages.received`*::
+
--
The number of messages returned by calls to the ReceiveMessage action.
The total number of messages returned by calls to the ReceiveMessage action.


type: long
Expand All @@ -4915,7 +4915,7 @@ type: long
*`aws.sqs.messages.sent`*::
+
--
The number of messages added to a queue.
The total number of messages added to a queue.


type: long
Expand All @@ -4925,7 +4925,7 @@ type: long
*`aws.sqs.empty_receives`*::
+
--
The number of ReceiveMessage API calls that did not return a message.
The total number of ReceiveMessage API calls that did not return a message.


type: long
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/aws/fields.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions x-pack/metricbeat/module/aws/sqs/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
type: long
format: duration
description: >
The approximate age of the oldest non-deleted message in the queue.
The maximum approximate age of the oldest non-deleted message in the queue.
- name: messages.delayed
type: long
description: >
Expand All @@ -24,19 +24,19 @@
- name: messages.deleted
type: long
description: >
The number of messages deleted from the queue.
The total number of messages deleted from the queue.
- name: messages.received
type: long
description: >
The number of messages returned by calls to the ReceiveMessage action.
The total number of messages returned by calls to the ReceiveMessage action.
- name: messages.sent
type: long
description: >
The number of messages added to a queue.
The total number of messages added to a queue.
- name: empty_receives
type: long
description: >
The number of ReceiveMessage API calls that did not return a message.
The total number of ReceiveMessage API calls that did not return a message.
- name: sent_message_size.bytes
type: long
format: bytes
Expand Down
24 changes: 16 additions & 8 deletions x-pack/metricbeat/module/aws/sqs/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,44 @@ input:
metrics:
- namespace: AWS/SQS
resource_type: sqs
statistic: ["Average"]
statistic: [ "Maximum" ]
name:
- ApproximateAgeOfOldestMessage
- namespace: AWS/SQS
resource_type: sqs
statistic: [ "Average" ]
name:
- ApproximateNumberOfMessagesDelayed
- ApproximateNumberOfMessagesNotVisible
- ApproximateNumberOfMessagesVisible
- SentMessageSize
- namespace: AWS/SQS
resource_type: sqs
statistic: [ "Sum" ]
name:
- NumberOfMessagesDeleted
- NumberOfEmptyReceives
- NumberOfMessagesReceived
- NumberOfMessagesSent
- NumberOfEmptyReceives
- SentMessageSize
processors:
- rename:
ignore_missing: true
fields:
- from: "aws.sqs.metrics.ApproximateAgeOfOldestMessage.avg"
- from: "aws.sqs.metrics.ApproximateAgeOfOldestMessage.max"
to: "aws.sqs.oldest_message_age.sec"
- from: "aws.sqs.metrics.ApproximateNumberOfMessagesDelayed.avg"
to: "aws.sqs.messages.delayed"
- from: "aws.sqs.metrics.ApproximateNumberOfMessagesNotVisible.avg"
to: "aws.sqs.messages.not_visible"
- from: "aws.sqs.metrics.ApproximateNumberOfMessagesVisible.avg"
to: "aws.sqs.messages.visible"
- from: "aws.sqs.metrics.NumberOfMessagesDeleted.avg"
- from: "aws.sqs.metrics.NumberOfMessagesDeleted.sum"
to: "aws.sqs.messages.deleted"
- from: "aws.sqs.metrics.NumberOfMessagesReceived.avg"
- from: "aws.sqs.metrics.NumberOfMessagesReceived.sum"
to: "aws.sqs.messages.received"
- from: "aws.sqs.metrics.NumberOfMessagesSent.avg"
- from: "aws.sqs.metrics.NumberOfMessagesSent.sum"
to: "aws.sqs.messages.sent"
- from: "aws.sqs.metrics.NumberOfEmptyReceives.avg"
- from: "aws.sqs.metrics.NumberOfEmptyReceives.sum"
to: "aws.sqs.empty_receives"
- from: "aws.sqs.metrics.SentMessageSize.avg"
to: "aws.sqs.sent_message_size.bytes"
Expand Down

0 comments on commit 918edab

Please sign in to comment.