+
    Û1jû  ã                   óF   € ^ RI Ht ^ RIHt ^ RIHtHt  ! R R]]4      tR# )é    )Úmatch)Úquote)ÚPluginÚRedHatPluginc                   óV   a € ] tR t^t o RtRtRtRtRtRt	Rt
RtR tR	R ltR tRtV tR# )
Ú	Candlepinz Candlepin entitlement managementÚ	candlepinNc                ó8  € V P                  R 4      '       d   R V n        RV n        MRV n        RV n        RV n        RV n        RV n         V P                  '       d:   V P                  R4      pVR,          ^ 8X  d   VR,          P                  4       pMAR# R	p\        VR
RR7      ;_uu_ 4       pVP                  4       P                  4       pRRR4       X F·  pV'       d   V^ ,          R8X  d   K  \        RV4      '       dZ   VP                  R4      ^,          P                  R4      ^,          P                  R4      pV^ ,          V n        V^,          V n        \        RV4      '       g   Kš  VP                  R4      ^,          V n        K¹  	  V P                  RRRRR	R/4       RV P
                  /V n        V P!                  RR.^ R7       V P                  '       d/   V P#                  R4      '       d   ^ MRpV P%                  RVR7       V P!                  R	R .V P                  R!7       R"pV P                  '       d   R#V R$2pV P'                  W€P                  R%R&7       V P!                  . R,O4       V P)                  R'4      p	V P'                  V	R(V P                  V P                  R)7       V P)                  R*4      p	V P'                  V	R+V P                  V P                  R)7       R#   + '       g   i     EL,; i  \        \        3 d     EL†i ; i)-r	   Ú
postgresqlNÚ	localhosti8  Ú z7podman exec candlepin cat /etc/candlepin/candlepin.confÚstatusÚoutputú/etc/candlepin/candlepin.confÚrzUTF-8)ÚencodingÚ#z&^\s*org.quartz.dataSource.myDS.URL=\S+Ú=Ú/Ú:z+^\s*org.quartz.dataSource.myDS.password=\S+z"/var/log/candlepin/candlepin.log.*Úcandlepin_logz/var/log/candlepin/err.log.*Úcandlepin_error_logÚcandlepin_confÚ
PGPASSWORDz/var/log/candlepin/error.logz /var/log/candlepin/candlepin.log)Ú	sizelimitÚall_logsiô  zcandlepin.service)Úunitsr   ú/etc/candlepin/broker.xml)Ú	containerzdu -sh /var/lib/candlepin/*/*zsh -c 'Ú'zdu_-hs_.var.lib.candlepin)r   Úsuggest_filenamea[  SELECT table_name, pg_size_pretty(total_bytes) AS total, pg_size_pretty(index_bytes) AS INDEX , pg_size_pretty(toast_bytes) AS toast, pg_size_pretty(table_bytes) AS TABLE FROM ( SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM (SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME, c.reltuples AS row_estimate, pg_total_relation_size(c.oid) AS total_bytes, pg_indexes_size(c.oid) AS index_bytes, pg_total_relation_size(reltoastrelid) AS toast_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE relkind = 'r') a) a order by total_bytes DESCÚcandlepin_db_tables_sizes)r!   Úenvr   zN            SELECT displayname, content_access_mode             FROM cp_owner;Úsimple_content_access)	z/var/log/candlepin/audit*.log*z%/var/log/candlepin/candlepin.log[.-]*z/var/log/candlepin/cpdb*.log*z/var/log/candlepin/cpinit*.log*z!/var/log/candlepin/error.log[.-]*z/var/log/tomcat*/catalina*log*z"/var/log/tomcat*/host-manager*log*z/var/log/tomcat*/localhost*log*z/var/log/tomcat*/manager*log*)Úcontainer_existsr   ÚdbcontainerÚdbhostÚdbportÚdbpasswdÚexec_cmdÚ
splitlinesÚopenÚreadr   ÚsplitÚIOErrorÚ
IndexErrorÚadd_file_tagsr#   Úadd_copy_specÚ
get_optionÚadd_journalÚadd_cmd_outputÚbuild_query_cmd)
ÚselfÚdboutÚcandle_linesÚcfg_fileÚcfileÚlineÚjdbcurlr   Údu_cmdÚ_cmds
   &         Ú>/usr/lib/python3/dist-packages/sos/report/plugins/candlepin.pyÚsetupÚCandlepin.setup   sù  € Ø× Ñ  ×-Ò-Ø(ˆDŒNØ+ˆDÕà!ˆDŒNØ#ˆDÔð "ˆŒØˆŒØˆŒð	Ø�~�~ˆ~ØŸ™ØMó�ð ˜•? aÔ'Ø#(¨¥?×#=Ñ#=Ó#?‘Láà:�Ü˜( C°'×:Õ:¸eØ#(§:¡:£<×#:Ñ#:Ó#<�L÷ ;ó %�ç˜t A�w¨#œ~ÙÜÐBÀD×IÒIð #Ÿj™j¨›o¨aÕ0×6Ñ6°sÓ;¸AÕ>×DÑDÀSÓI�GØ")¨!¥*�D”KØ")¨!¥*�D”KÜÐGÈ×NÔNØ$(§J¡J¨s£O°AÕ$6�D–Mñ %ð  	×ÑØ0°/Ø*Ð,AØ+Ð-=ð
ô 	ð ! $§-¡-Ð0ˆŒð 	×ÑØ*Ø.ð
ð ð 	ô 	ð
 �>�>ˆ>Ø!Ÿ_™_¨Z×8Ò8™¸cˆIØ×ÑÐ#6À)ÐÔLà×ÑØ/Ø+ð
ð —^‘^ð 	ô 	%ð
 1ˆØ�>�>ˆ>Ø˜v˜h aÐ(ˆFØ×Ñ˜F¯n©nØ-Hð 	ô 	Jð 	×Ñò 
ô 	ð  ×#Ñ#ðó
ˆð 	×Ñ˜DÐ3NØ $§¡°D×4DÑ4Dð 	ô 	Fð ×#Ñ#ð %ó ˆð 	×Ñ˜DØ-DØ $§¡°D×4DÑ4Dð 	ö 	F÷s ;×:Ð:ûô œÐ$ô 	âð	ús=   ÁL Á7L ÂL Â.K0ÃBL Å1!L Ë0L	Ë;	L ÌLÌLc                óp   € V'       d   RMRpRpW@P                   V P                  V\        V4      3,          # )a  
Builds the command needed to invoke the pgsql query as the postgres
user.
The query requires significant quoting work to satisfy both the
shell and postgres parsing requirements. Note that this will generate
a large amount of quoting in sos logs referencing the command being run
z
-A -F , -Xr   zSpsql --no-password -h %s -p %s -U candlepin                   -d candlepin %s -c %s)r'   r(   r   )r7   ÚqueryÚcsvÚ	csvformatÚ_dbcmds   &&&  r@   r6   ÚCandlepin.build_query_cmd–   s2   € ÷ %(‘L¨Rˆ	ð)ˆàŸ™ d§k¡k°9¼eÀE»lÐKÕKÐKó    c                óš   € R pRpV P                  RW4       RpV P                  RW24       R
 F  pV P                  RRV R2R4       K  	  R	# )z$(((.*)(pass|token|secret)(.*))=)(.*)z
\1********r   z(--password=)([a-zA-Z0-9]*)z/var/log/candlepin/cpdb.logr   Ú(z)=(\w*)([;<])z\1=********\3N)ÚtrustStorePasswordÚkeyStorePassword)Údo_file_sub)r7   ÚregÚreplÚcpdbregÚkeys   &    r@   ÚpostprocÚCandlepin.postproc£   s]   € Ø5ˆØˆØ×ÑÐ8¸#ÔDØ0ˆØ×ÑÐ6¸ÔFÛ=ˆCØ×ÑÐ8Ø ! #  mÐ4Ø-ö/ó >rI   )r   r&   r'   r)   r(   r#   )r	   )F)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú
short_descÚplugin_nameÚpackagesÚ
containersr'   r(   r)   r#   rA   r6   rS   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r@   r   r      sE   ø‡ € à3€Jà€KØ€HØ€Jà€FØ€FØ€HØ
€CòwFôrL÷	/ð 	/rI   r   N)Úrer   Úshlexr   Úsos.report.pluginsr   r   r   © rI   r@   Ú<module>rd      s    ðõ Ý ß 3ô\/�˜ö \/rI   