aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPep Turró Mauri <pep@redhat.com>2017-09-07 13:33:49 +0200
committerBryn M. Reeves <bmr@redhat.com>2018-04-04 16:24:49 +0100
commit903e1c1508eeae6f218e01e56825c68726f017e8 (patch)
tree0f99607b46ca272abf5fac53f22a459e81871cfd
parent9fc6eb234682ce695c2b1b1608f755928d441585 (diff)
downloadsos-903e1c1508eeae6f218e01e56825c68726f017e8.tar.gz
[kubernetes] Collect metrics from master
Add an invocation to 'kubectl get --raw /metrics' to obtain metrics from the kubernetes master. Resolves: #1099 Signed-off-by: Pep Turró Mauri <pep@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/kubernetes.py6
1 files 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: