aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Desrochers <eric.desrochers@canonical.com>2019-04-23 11:37:43 -0400
committerBryn M. Reeves <bmr@redhat.com>2019-09-24 16:05:25 +0100
commit08e87d1736f7f958b203aa5eeb55ab8a15d912f6 (patch)
tree16b930b5a8c67579644ff93d66d799a2955a79ef
parent71aaa6acbf5f40e617180273cc0fee94151d2efc (diff)
downloadsos-08e87d1736f7f958b203aa5eeb55ab8a15d912f6.tar.gz
[apache] Add syntax test and runtime status information
'apachectl -t' (AKA configtest) parse the configuration files and report information about particular syntax error. 'systemctl status <service>' show runtime status information about apache unit. Resolves: #1658 Signed-off-by: Eric Desrochers eric.desrochers@canonical.com Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/apache.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/sos/plugins/apache.py b/sos/plugins/apache.py
index f4f24dc0..a96374fe 100644
--- a/sos/plugins/apache.py
+++ b/sos/plugins/apache.py
@@ -22,10 +22,11 @@ class Apache(Plugin):
]
def setup(self):
- # collect list of installed modules
+ # collect list of installed modules and verify config syntax.
self.add_cmd_output([
"apachectl -M",
- "apachectl -S"
+ "apachectl -S",
+ "apachectl -t"
])
# The foreman plugin collects these files with a greater size limit:
@@ -59,6 +60,8 @@ class RedHatApache(Apache, RedHatPlugin):
self.add_forbidden_path("/etc/httpd/conf/password.conf")
+ self.add_cmd_output('systemctl status httpd')
+
# collect only the current log set by default
self.add_copy_spec([
"/var/log/httpd/access_log",
@@ -97,6 +100,8 @@ class DebianApache(Apache, DebianPlugin, UbuntuPlugin):
"/etc/default/apache2"
])
+ self.add_cmd_output('systemctl status apache2')
+
# collect only the current log set by default
self.add_copy_spec([
"/var/log/apache2/access_log",