Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Current Value is 0 #48

Open
maneeshmurali opened this issue Aug 23, 2020 · 3 comments
Open

Current Value is 0 #48

maneeshmurali opened this issue Aug 23, 2020 · 3 comments

Comments

@maneeshmurali
Copy link

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.

@chankh
Copy link
Contributor

chankh commented Aug 25, 2020

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

@chankh
Copy link
Contributor

chankh commented Sep 16, 2020

@maneeshmurali is this issue resolved?

@devoprock
Copy link

devoprock commented Oct 27, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants