-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQS aws_sqs_approximate_number_of_messages_visible_average - Need your help! #680
Comments
Good day, Guys! Just a small update regarding this issue. Using this rule Prometheus-adapter sends next request to the Prometheus-server: I've made a test and sent the same request to the Prometheus-server. It's the response from the server: Hope this information will help! |
/triage accepted We sadly don't have enough resources to look after support issues for prometheus-adapter right now. |
/triage accepted |
Good day, Guys!
I want to ask for your assistance with configuring of Prometheus adapter for collecting required metrics from AWS CloudWatch for SQS.
Currently, from my side I have the next:
What do I have:
CloudWatch exporter is configured to collect only three metrics:
aws_namespace: AWS/EC2
aws_metric_name: CPUUtilization
aws_statistics: Average
aws_namespace: AWS/SQS
aws_metric_name: ApproximateNumberOfMessagesVisible
aws_statistics: Average
aws_namespace: AWS/SQS
aws_metric_name: ApproximateNumberOfMessagesVisible
aws_statistics: Average
I can view all these metrics in Prometheus server.
I can get data and values about these metrics from Prometheus server via it's API:
$ curl http://prometheus-server/api/v1/label/__name__/values
name = aws_ec2_cpuutilization_average
name = aws_sqs_approximate_number_of_messages_visible_average
$ curl -g 'http://prometheus-server/api/v1/series?' --data-urlencode 'match[]=aws_ec2_cpuutilization_average' \
--data-urlencode 'match[]=aws_sqs_approximate_number_of_messages_visible_average'
{"status":"success",
"data":[
{"name":"aws_ec2_cpuutilization_average",
"exported_job":"aws_ec2",
"instance":"cloudwatch-exporter-prometheus-cloudwatch-exporter:9106",
"instance_id":"i-075ddced357e55d4a",
"job":"cloudwatch"},
$ curl 'http://prometheus-server/api/v1/query_range?query=aws_ec2_cpuutilization_average&start=2024-09-25T00:01:00Z&&end=2024-09-25T00:02:00Z&step=15s'
{"status":"success","data":
{"resultType":
"matrix","result":
[{"metric": {
"name":"aws_ec2_cpuutilization_average",
"exported_job":"aws_ec2",
"instance":"cloudwatch-exporter-prometheus-cloudwatch-exporter:9106",
"instance_id":"i-075ddced357e55d4a",
"job":"cloudwatch"},
"values":[[1727222460,"1.5928961748595722"],
[1727222475,"1.5928961748595722"],
[1727222490,"1.5928961748595722"],
[1727222505,"1.5928961748595722"],
[1727222520,"1.374314384894086"]]}]}}
Currently, for Prometheus adapter I have next configuration (just for one metric):
externalRules:
- seriesQuery: 'name="aws_sqs_approximate_number_of_messages_visible_average"'
name:
matches: ""
as: "aws_sqs_dev"
resources:
namespaced: false
metricsQuery: sum(rate(aws_sqs_approximate_number_of_messages_visible_average{"exported_job":"aws_sqs","instance":"cloudwatch-exporter-prometheus-cloudwatch-exporter:9106","job":"cloudwatch","queue_name":"cosmos-dev-delivery-highPrio.fifo"}))
Unfortunately, I don't have any results for it:
$ kubectl get --raw /apis/external.metrics.k8s.io/v1beta1 | jq
{
"kind": "APIResourceList",
"apiVersion": "v1",
"groupVersion": "external.metrics.k8s.io/v1beta1",
"resources": []
}
Guys, could you, please, help me to create appropriate configuration for Prometheus adapter to get this metrics for future use with HPA (SQS)? You are my last chance to get it done....
Thank you in advance!
BR,
Daniil
The text was updated successfully, but these errors were encountered: