Blame SOURCES/sos-bz1165418-chrony-new-plugin.patch

c81b6a
From b6e6a4d1ce4beae74cb0123bd7c48d0828d120ec Mon Sep 17 00:00:00 2001
c81b6a
From: Justin Stephenson <jstephen@redhat.com>
c81b6a
Date: Sun, 29 Mar 2015 22:58:42 +0200
c81b6a
Subject: [PATCH] [chrony] add chrony plugin
c81b6a
c81b6a
Resolves #539
c81b6a
c81b6a
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
c81b6a
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
c81b6a
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
c81b6a
---
c81b6a
 sos/plugins/chrony.py | 40 ++++++++++++++++++++++++++++++++++++++++
c81b6a
 1 file changed, 40 insertions(+)
c81b6a
 create mode 100644 sos/plugins/chrony.py
c81b6a
c81b6a
diff --git a/sos/plugins/chrony.py b/sos/plugins/chrony.py
c81b6a
new file mode 100644
c81b6a
index 0000000..d2404d4
c81b6a
--- /dev/null
c81b6a
+++ b/sos/plugins/chrony.py
c81b6a
@@ -0,0 +1,40 @@
c81b6a
+# This program is free software; you can redistribute it and/or modify
c81b6a
+# it under the terms of the GNU General Public License as published by
c81b6a
+# the Free Software Foundation; either version 2 of the License, or
c81b6a
+# (at your option) any later version.
c81b6a
+
c81b6a
+# This program is distributed in the hope that it will be useful,
c81b6a
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
c81b6a
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c81b6a
+# GNU General Public License for more details.
c81b6a
+
c81b6a
+# You should have received a copy of the GNU General Public License
c81b6a
+# along with this program; if not, write to the Free Software
c81b6a
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
c81b6a
+
c81b6a
+from sos.plugins import Plugin, RedHatPlugin
c81b6a
+
c81b6a
+
c81b6a
+class Chrony(Plugin, RedHatPlugin):
c81b6a
+    """Chrony clock (for Network time protocol)
c81b6a
+    """
c81b6a
+
c81b6a
+    plugin_name = "chrony"
c81b6a
+    profiles = ('system', 'services')
c81b6a
+
c81b6a
+    packages = ('chrony',)
c81b6a
+
c81b6a
+    def setup(self):
c81b6a
+        self.add_copy_spec([
c81b6a
+            "/etc/chrony.conf",
c81b6a
+            "/var/lib/chrony/drift"
c81b6a
+        ])
c81b6a
+        self.add_cmd_output([
c81b6a
+            "chronyc tracking",
c81b6a
+            "chronyc sources",
c81b6a
+            "chronyc sourcestats",
c81b6a
+            "chronyc clients",
c81b6a
+            "journalctl -u chronyd"
c81b6a
+        ])
c81b6a
+
c81b6a
+# vim: et ts=4 sw=4
c81b6a
-- 
c81b6a
1.8.3.1
c81b6a