k8s-cloudwatch-adapter
k8s-cloudwatch-adapter copied to clipboard
Current Value is 0
I am getting the current value as 0.
Metrics: ( current / target ) "app-memory" (target value): 0 / 80 Min replicas: 1 Max replicas: 5 Deployment pods: 1 current / 1 desired
But in metrics I can see 60-70 % utilization. Pasting the External Metrics YAML.
apiVersion: metrics.aws/v1alpha1 kind: ExternalMetric metadata: name: app-memory spec: name: app-memory resource: resource: "deployment" queries: - id: app_memory metricStat: metric: namespace: "Custom/ContainerInsights" metricName: "pod_memory_utilization_over_pod_limit" dimensions: - name: PodName value: app-memory - name: ClusterName value: dzstaging.k8s.local - name: Namespace value: dz-staging period: 10 unit: Count stat: Average returnData: true
I tried to change the "Unit" to Percent but no hope.
@maneeshmurali looks like the metrics are in ContainerInsights namespace, instead of Custom/ContainerInsights as stated here
@maneeshmurali is this issue resolved?
@maneeshmurali @chankh ,
I am also getting same issue with below setting did issue is resolved ? Here i am using roleArn / region to get cross account metrics,Same thing is getting data from EC2 source using awscli. No errror event on HPA/externalmetrics.
Followed document for cross account metrics access for k8s-cloudwatch-adapter
https://github.com/awslabs/k8s-cloudwatch-adapter/blob/master/docs/cross-account.md
apiVersion: metrics.aws/v1alpha1 kind: ExternalMetric metadata: name: internal-xdxd-sqs namespace: partner-nssss labels: spec: name: internal-xdxd-sqs roleArn: arn:aws:iam::xxxxxxxx:role/target-cloudwatch-role region: eu-west-3 queries: - id: m1 metricStat: metric: namespace: "AWS/SQS" metricName: "SentMessageSize" dimensions: - name: QueueName value: internal-xdxd-sqs period: 60 stat: Average unit: Count returnData: true resource: resource: "deployment"