Hi, Janaka,

Could you show how you got it working exactly? I tried setting everything 
up according to the documentation proposed in the PR, but it's a bit 
unclear how the endpoint should be structured.  

My steps:

   - Enabled custom metrics on the cluster
   - Created an endpoint on my application that returns the number of open 
   connections
   - Created this exact ConfigMap: 
   apiVersion: v1
   kind: ConfigMap
   metadata:
     name: cm-config
   data:
     # Use Prometheus structure, see 
   https://github.com/google/cadvisor/blob/master/docs/application_metrics.md
     definition.json: "{\"endpoint\" : \"http://localhost:8443/metrics\";, 
   {\"metrics_config\" : [{\"name\" : \"connections\", \"metric_type\" : 
   \"gauge\", \"data_type\" : \"int\", \"polling_frequency\" : 10, \"units\" : 
   \"number of active connections\"}]}}"
   
   - Mapped the hostPort and containerPort in the RC
   - Mounted the ConfigMap in my ReplicationController to 
   /etc/custom-metrics
   - Added this exact annotation to my HPA: 
   alpha/target.custom-metrics.podautoscaler.kubernetes.io: 
'{"items":[{"name":"connections", 
   "value": "1000"}]}'
   
However, the HPA is unable to get my custom metrics. I also couldn't find 
any way to debug the setup, all I see is 'FailedGetCustomMetrics metrics 
obtained for 0/1 of pods' when I check the HPA events.

Cheers, 

Sander

On Wednesday, May 4, 2016 at 6:17:50 PM UTC+2, Janaka Bandara wrote:
>
> Hi Jerzy,
>
> Thanks!
> I tried the approach in the PR and it worked fine.
>
>
> (I found the same links a few days ago from a different source, but could 
> not update this thread on time.)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to