Skip to content

Commit

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

* Change SQS metrics statistic method

* add doc change and changelog

(cherry picked from commit 918edab)

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: kaiyan-sheng <[email protected]>
  • Loading branch information
mergify[bot] and kaiyan-sheng authored Jul 24, 2024
1 parent a09225a commit 610db33
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 @@ -87,6 +87,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]

*Metricbeat*

- Fix statistic methods for metrics collected for SQS. {pull}40207[40207]

*Osquerybeat*

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 610db33

Please sign in to comment.