amazon-archives / k8s-cloudwatch-adapter

An implementation of Kubernetes Custom Metrics API for Amazon CloudWatch
Apache License 2.0
158 stars 98 forks source link

Current Value is 0 #48

Open maneeshmurali opened 4 years ago

maneeshmurali commented 4 years ago

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:

I tried to change the "Unit" to Percent but no hope.

chankh commented 4 years ago

@maneeshmurali looks like the metrics are in ContainerInsights namespace, instead of Custom/ContainerInsights as stated here

chankh commented 4 years ago

@maneeshmurali is this issue resolved?

devoprock commented 4 years ago

@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: