From 903e1c1508eeae6f218e01e56825c68726f017e8 Mon Sep 17 00:00:00 2001 From: Pep TurrĂ³ Mauri Date: Thu, 7 Sep 2017 13:33:49 +0200 Subject: [kubernetes] Collect metrics from master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an invocation to 'kubectl get --raw /metrics' to obtain metrics from the kubernetes master. Resolves: #1099 Signed-off-by: Pep TurrĂ³ Mauri Signed-off-by: Bryn M. Reeves --- sos/plugins/kubernetes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sos/plugins/kubernetes.py b/sos/plugins/kubernetes.py index 22f6656e..1010354c 100644 --- a/sos/plugins/kubernetes.py +++ b/sos/plugins/kubernetes.py @@ -83,10 +83,12 @@ class kubernetes(Plugin, RedHatPlugin): 'services' ] - # nodes and pvs are not namespaced, must pull separately + # nodes and pvs are not namespaced, must pull separately. + # Also collect master metrics self.add_cmd_output([ "{} get -o json nodes".format(kube_cmd), - "{} get -o json pv".format(kube_cmd) + "{} get -o json pv".format(kube_cmd), + "{} get --raw /metrics".format(kube_cmd) ]) if self.get_option('all'): for n in knsps: -- cgit