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

(cherry picked from commit 918edab)

# Conflicts:
#	x-pack/metricbeat/module/aws/fields.go
  • Loading branch information
kaiyan-sheng authored and mergify[bot] committed Jul 24, 2024
1 parent 30c05b0 commit b893609
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 18 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d

*Metricbeat*

- Fix `namespace` filter option on metricset `state_namespace` enricher. {pull}39934[39934]
- Fix `namespace` filter option at Kubernetes provider level. {pull}39881[39881]
- Fix Azure Monitor 429 error by causing metricbeat to retry the request again. {pull}38294[38294]
- Fix fields not being parsed correctly in postgresql/database {issue}25301[25301] {pull}37720[37720]
- rabbitmq/queue - Change the mapping type of `rabbitmq.queue.consumers.utilisation.pct` to `scaled_float` from `long` because the values fall within the range of `[0.0, 1.0]`. Previously, conversion to integer resulted in reporting either `0` or `1`.
- Fix timeout caused by the retrival of which indices are hidden {pull}39165[39165]
- Fix Azure Monitor support for multiple aggregation types {issue}39192[39192] {pull}39204[39204]
- Fix handling of access errors when reading process metrics {pull}39627[39627]
- Fix behavior of cgroups path discovery when monitoring the host system from within a container {pull}39627[39627]
- Fix issue where beats may report incorrect metrics for its own process when running inside a container {pull}39627[39627]
- Fix for MySQL/Performance - Query failure for MySQL versions below v8.0.1, for performance metric `quantile_95`. {pull}38710[38710]
- Fix Prometheus helper text parser to store each metric family type. {pull}39743[39743]
- Normalize AWS RDS CPU Utilization values before making the metadata API call. {pull}39664[39664]
- 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]

*Osquerybeat*


*Packetbeat*

Expand Down
10 changes: 5 additions & 5 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4906,7 +4906,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 @@ -4948,7 +4948,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 @@ -4958,7 +4958,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 @@ -4968,7 +4968,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 @@ -4978,7 +4978,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
4 changes: 4 additions & 0 deletions 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 b893609

Please sign in to comment.