Finish MetricsGrabber

This commit is contained in:
gmarek
2015-12-23 13:53:09 +01:00
parent 9bdc4100d5
commit 2c6c8d8371
3 changed files with 68 additions and 14 deletions

View File

@@ -116,11 +116,11 @@ func parseKubeletMetrics(data string, unknownMetrics sets.String) (KubeletMetric
return result, nil
}
func (g *MetricsGrabber) getMetricsFromNode(nodeName string) (string, error) {
func (g *MetricsGrabber) getMetricsFromNode(nodeName string, kubeletPort int) (string, error) {
rawOutput, err := g.client.Get().
Prefix("proxy").
Resource("nodes").
Name(fmt.Sprintf("%v:%v", nodeName, g.kubeletPort)).
Name(fmt.Sprintf("%v:%v", nodeName, kubeletPort)).
Suffix("metrics").
Do().Raw()
if err != nil {