
    ~ g                     h    S SK JrJrJrJrJr   " S S\5      r " S S\\5      r " S S\\\5      rg)	    )PluginRedHatPluginDebianPluginUbuntuPlugin	PluginOptc                   H    \ rS rSrSrSrSrSrSrSr	Sr
\" S	S
SS9/rS rSrg)Apache   a}  The Apache plugin covers the upstream Apache webserver project,
regardless of the packaged name; apache2 for Debian and Ubuntu, or httpd
for Red Hat family distributions.

The aim of this plugin is for Apache-specific information, not necessarily
other projects that happen to place logs or similar files within the
standardized apache directories. For example, OpenStack components that log
to apache logging directories are excluded from this plugin and collected
via their respective OpenStack plugins.

Users can expect the collection of apachectl command output, apache server
logs, and apache configuration files from this plugin.
zApache http daemonapache)	webserver	openshift)httpd)z	/var/www/NlogFzgathers all apache logs)namedefaultdescc           
          U R                  SS/SS9  U R                  SSS9  / SQnU R                  U Vs/ s H  nS	U R                   S
U S3PM     sn5        g s  snf )Nzapachectl -Szapachectl -tT)
cmd_as_tagzapachectl -Mhttpd_Mtags)aodh
ceilometercinderforemangnocchihorizonkeystonemanilanovaoctavia	placementpulpz	/var/log/z*/*)add_cmd_outputadd_forbidden_path	apachepkg)selfsubdirssubs      ;/usr/lib/python3/dist-packages/sos/report/plugins/apache.pysetupApache.setup'   s    
  	 	 	N;
 	<C!
<CSi'r#a0G!
 	 !
s   A )__name__
__module____qualname____firstlineno____doc__
short_descplugin_nameprofilespackagesfilesr'   r   option_listr,   __static_attributes__r.       r+   r	   r	      sB     &JK)HHEI 	ue2KLKr;   r	   c                   4   ^  \ rS rSrSrSrSrU 4S jrSrU =r	$ )RedHatApacheD   ab  
On Red Hat distributions, the Apache plugin will also attempt to collect
JBoss Web Server logs and configuration files.

Note that for Red Hat distributions, this plugin explicitly collects for
'httpd' installations. If you have installed apache from source or via any
method that uses the name 'apache' instead of 'httpd', these collections
will fail.
)z/etc/httpd/conf/httpd.confz/etc/httpd22/conf/httpd.confz/etc/httpd24/conf/httpd.confr   c                 Z  > U R                  SSSSS.5        [        TU ]	  5         / SQnU Vs/ s H  nSU 3PM
     nn/ SQnU Vs/ s H  nS	U 3PM
     nn/ S
QnU R                  U Vs/ s H  ow S3PM	     sn5        U H!  nU H  n	U R	                  U SU	 3SS9  M     M#     U R                  S5      (       d  U R                  S5      (       a  U R	                  U5        O(U H"  n
U H  nU R	                  U
 SU 35        M     M$     U R                  SSS9  g s  snf s  snf s  snf )Nhttpd_access_loghttpd_error_loghttpd_ssl_access_loghttpd_ssl_error_log)z/var/log/httpd/access_logz/var/log/httpd/error_logz/var/log/httpd/ssl_access_logz/var/log/httpd/ssl_error_log) 2224z
/etc/httpd)zconf/*.confzconf.d/*.confzconf.modules.d/*.confz/var/log/httpd)
access_log	error_logssl_access_logssl_error_logz/conf/password.conf/
httpd_confr   r   all_logsr   systemctl_httpd)add_file_tagssuperr,   r&   add_copy_spec
get_optionadd_service_status)r(   versveretcdirsconfslogdirslogsetcedirconfldirr   	__class__s               r+   r,   RedHatApache.setupU   s\   );(9-C,A	
 	 	   266#Zu%6
 6::Tc^C5)T:
 	3:!
3:Ce&'7!
 	 D""dV1TF#3,"G   ??5!!T__Z%@%@w'C&&$q7     	.?@A 7 ;!
s   DD#+D(r.   )
r/   r0   r1   r2   r3   r8   r'   r,   r:   __classcell__r^   s   @r+   r=   r=   D   s"    E
 I0A 0Ar;   r=   c                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )DebianApache   )z/etc/apache2/apache2.confapache2c                   > [         TU ]  5         U R                  SS/5        U R                  S5        U R                  / SQ5        U R	                  S5      (       d  U R	                  S5      (       a  U R                  S/5        g g )Nz/etc/apache2/*z/etc/default/apache2re   )z/var/log/apache2/access.logz/var/log/apache2/error.logz/var/log/apache2/ssl_access.logz/var/log/apache2/ssl_error.logz(/var/log/apache2/other_vhosts_access.logr   rM   z/var/log/apache2)rP   r,   rQ   rS   rR   )r(   r^   s    r+   r,   DebianApache.setup   s    "
 	
 		* 	 
 	 ??5!!T__Z%@%@"   &Ar;   r.   )	r/   r0   r1   r2   r8   r'   r,   r:   r`   ra   s   @r+   rc   rc      s    *EI r;   rc   N)	sos.report.pluginsr   r   r   r   r   r	   r=   rc   r.   r;   r+   <module>ri      s?   9 94V 4nAA6< AAH6< r;   