7/29/2023 0 Comments Sqs queue metrics![]() parameter: awsSecretAccessKey # Required. QueueLength: "5" awsRegion: "eu-west-1" Scaling on ApproximateNumberOfMessages only key: AWS_SESSION_TOKEN # Required when using temporary credentials. name: test-secrets # Required when using temporary credentials. parameter: awsSessionToken # Required when using temporary credentials. AWS_SESSION_TOKEN: # Required when using temporary credentials. Example Scaling a deployment using podIdentity providersĪWS_ACCESS_KEY_ID: # Required. The user will need access to read properties from the specified AWS SQS queue. awsSessionToken - Session token, only required when using temporary credentials. ![]() awsSecretAccessKey - Access key for the user to authenticate with.awsRoleArn - Amazon Resource Names (ARNs) uniquely identify AWS resource.podIdentity.provider - Needs to be set to either aws-kiam or aws-eks on the TriggerAuthentication and the pod/service account must be configured correctly for your pod identity provider.You can use TriggerAuthentication CRD to configure the authenticate by providing either a role ARN or a set of IAM credentials. These parameters are relevant only when identityOwner is set to pod. Additional Authentication Parameters are not required. When identityOwner set to operator - the only requirement is that the KEDA operator has the correct IAM permissions on the SQS queue. (Values: pod, operator, Default: pod, Optional) ![]() identityOwner - Receive permissions on the SQS Queue via Pod Identity or from the KEDA operator itself (see below).awsEndpoint - Endpoint URL to override the default AWS endpoint.awsRegion - AWS Region for the SQS Queue.When set to true “actual messages” is equal to ApproximateNumberOfMessages + ApproximateNumberOfMessagesNotVisible, since NotVisible in SQS terms means the message is still in-flight/processing. When set to false “actual messages” is equal to ApproximateNumberOfMessages.scaleOnInFlight - Indication whether or not to scale on queued messages or to include in-flight messages as well.If you wish to only scale on ApproximateNumberOfMessages set scaleOnInFlight to false. Learn more about activation here.(Default: 0, Optional)įor the purposes of scaling, the default formula for “actual messages” is equal to ApproximateNumberOfMessages + ApproximateNumberOfMessagesNotVisible, since NotVisible in SQS terms means the message is still in-flight/processing. activationQueueLength - Target value for activating the scaler.If the actual messages in the SQS Queue is 30, the scaler scales to 3 pods. Example: if one pod can handle 10 messages, set the queue length target to 10. queueLength - Target value for queue length passed to the scaler.(Optional, You can use this instead of queueURL parameter) queueURLFromEnv - Name of the environment variable on the scale target to read the queue URL from.(Optional, You can use this instead of queueURLFromEnv parameter) The simple name of the queue can be used in case there’s no ambiguity. queueURL - Full URL for the SQS Queue.You can use this instead of `queueURL` parameter queueLength: "5" # Default: "5" # Required: awsRegion awsRegion: "eu-west-1" # Optional: awsEndpoint awsEndpoint: "" identityOwner: pod | operator # Optional. If both provided, uses queueURL queueURL: Now I wanted to get alerted more often so I chose to build a lambda function that checks how many messages are in the DLQueue.# Required: queueURL or queueURLFromEnv. It was ApproximateNumberOfMessagesVisible, which sounded suitable, so I used it. Now I looked at the queue in the AWS console under the monitoring-tab and I checked which metric spiked. That is nice to know, but I was missing the information: which metric shall I use if NumberOfMessagesSent won't work? I was being pragmatic here so I created an error, a message was sent to the DLQ as a result of a failed processing attempt. Thus, it is possible for the values of NumberOfMessagesSent and NumberOfMessagesReceived to be different. However, if a message is sent to a dead-letter queue as a result of a failed processing attempt, it isn't captured by this metric. If you send a message to a dead-letter queue manually, it is captured by the NumberOfMessagesSent metric. The NumberOfMessagesSent and NumberOfMessagesReceived for a dead-letter queue don't match I chose the 'ApproximateNumberOfMessagesVisible' metric since 'NumberOfMessagesSent' (which was my first choice) does not work for DLQueues. I have following simple task to solve:Ĭreate a lambda that checks if a dead letter queue has messages and if it has, read how many.īefore I did that I had an alarm set on an SQS metric. ![]() I somehow can't find the right information.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |