1
0
forked from rpms/sos
sos/sos-collect-docker-daemon-logs.patch

66 lines
2.4 KiB
Diff
Raw Normal View History

From 4edd40d584879ebd81bce88f04bc294789175eb0 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Wed, 7 Oct 2015 12:56:55 +0100
Subject: [PATCH 1/2] [kubernetes] do not reverse-sort journald logs
Drop the '-r' when obtaining logs from journald to be consistent
with other plugins: users can sort log entries in whatever order
they prefer on the analysis system.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/kubernetes.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sos/plugins/kubernetes.py b/sos/plugins/kubernetes.py
index 59b6b53..3399b2e 100644
--- a/sos/plugins/kubernetes.py
+++ b/sos/plugins/kubernetes.py
@@ -35,11 +35,11 @@ class kubernetes(Plugin, RedHatPlugin):
self.add_cmd_output("kubectl get -o json services")
self.add_cmd_output("kubectl get -o json replicationController")
self.add_cmd_output("kubectl get -o json events")
- self.add_cmd_output("journalctl -r -u kubelet")
- self.add_cmd_output("journalctl -r -u kube-apiserver")
- self.add_cmd_output("journalctl -r -u kube-controller-manager")
- self.add_cmd_output("journalctl -r -u kube-scheduler")
- self.add_cmd_output("journalctl -r -u kube-proxy")
+ self.add_cmd_output("journalctl -u kubelet")
+ self.add_cmd_output("journalctl -u kube-apiserver")
+ self.add_cmd_output("journalctl -u kube-controller-manager")
+ self.add_cmd_output("journalctl -u kube-scheduler")
+ self.add_cmd_output("journalctl -u kube-proxy")
if self.get_option('podslog'):
result = self.get_command_output("kubectl get pods")
--
1.8.3.1
From 3ce984a7d220669eaf2e6c08d983679183fb55fe Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Wed, 7 Oct 2015 13:03:45 +0100
Subject: [PATCH 2/2] [docker] collect journald logs for docker unit
Fixes: #609.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/docker.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/sos/plugins/docker.py b/sos/plugins/docker.py
index c5ea8a0..aab558d 100644
--- a/sos/plugins/docker.py
+++ b/sos/plugins/docker.py
@@ -34,6 +34,7 @@ class Docker(Plugin):
])
self.add_cmd_output([
+ "journalctl -u docker",
"{0} info".format(self.docker_bin),
"{0} ps".format(self.docker_bin),
"{0} images".format(self.docker_bin)
--
1.8.3.1