+
    Û1j(  ã                   ó<   € ^ RI t ^ RIHtHtHt  ! R R]]]4      tR# )é    N)ÚPluginÚRedHatPluginÚUbuntuPluginc                   óT   a € ] tR t^t o RtRtRtR
tRtRt	^ t
R tR tR tR tRtV tR	# )ÚCephMONa:  
This plugin serves to collect information on monitor nodes within a Ceph
or microceph cluster. It is designed to collect from several versions of
Ceph, including versions that serve as the basis for RHCS 4 and RHCS 5.

Older versions of Ceph will have collections from locations such as
/var/log/ceph, whereas newer versions (as of this plugin's latest update)
will have collections from /var/log/ceph/<fsid>/. This plugin attempts to
account for this where possible across the host's filesystem.

Users may expect to see several collections twice - once in standard output
from the `ceph` command, and again in JSON format. The latter of which will
be placed in the `json_output/` subdirectory within this plugin's directory
in the report archive. These JSON formatted collections are intended to
aid in automated analysis.
zCEPH monÚceph_monc                ó`  € V P                  R 4      pV P                  4       V n        V P                  P                  P                  R4      pV'       gj   V P                  RRRR/4       V P                  . REO4       V'       g   V P                  R.4       MV P                  R.4       V P                  RR	.4       MSV P                  . RFO4       V'       g   V P                  R
.4       MV P                  R.4       V P                  RR.4       V P                  RRRR7       V P                  . RNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2N4       V P                  R4      pVR3,          ^ 8X  dc   VR4,          P                  4        FG  pVP                  R54      '       g   K  VP                  4       ^ ,          pV P                  R6V 24       KI  	  . RGOpV P                  R7R8R9R:7       V P                  R;R8R<R:7       V P                  4        F   pV P                  R=V R>2R=V R?2.R8R@7       K"  	  T P                  V Uu. uF  pRAV 2NK
  	  up4       T P                  V Uu. uF	  pRAV RB2NK  	  upR8RRC7       RD# u upi u upi )HÚall_logsÚ	microcephz.*/ceph.confÚ	ceph_confz$/var/log/ceph/(.*/)?ceph-.*mon.*.logÚceph_mon_logz/var/log/ceph/**/*ceph-mon*.logz /var/log/ceph/**/*ceph-mon*.log*z/run/ceph/**/ceph-mon*z/var/lib/ceph/**/kv_backendz./var/snap/microceph/common/logs/*ceph-mon*.logz//var/snap/microceph/common/logs/*ceph-mon*.log*ú%/var/snap/microceph/common/data/mon/*z"/var/snap/microceph/current/conf/*zceph reportÚceph_reportF)ÚtagsÚstderrz!ceph config generate-minimal-confzceph config logúceph config-key dumpzceph crash lszceph crash statzceph featureszceph health detailzceph insightszceph log last 10000 debug auditz!ceph log last 10000 debug clusterzceph mgr dumpzceph mgr metadatazceph mgr module lszceph mgr serviceszceph mgr versionszceph mon statzceph mon features lszceph node lszceph osd crush class lszceph osd crush dumpzceph osd crush rule lszceph osd crush rule dumpzceph osd crush show-tunablesz!ceph osd crush tree --show-shadowz ceph osd erasure-code-profile lszceph osd metadatazceph osd utilizationzceph telemetry channel lszceph telemetry collection lszceph telemetry lszceph quorum_statuszceph versionszceph-disk listÚstatusÚoutputÚ*zceph crash info z'ceph health detail --format json-prettyÚjson_outputÚceph_health_detail)Úsubdirr   z"ceph osd tree --format json-prettyÚceph_osd_treezceph tell mon.z mon_statusz	 sessions)r   zceph z --format json-pretty)r   r   N)z/etc/ceph/*keyring*z/var/lib/ceph/**/*keyring*z/var/lib/ceph/**/tmp/*mnt*z/etc/ceph/*bindpass*)z'/var/snap/microceph/common/**/*keyring*z(/var/snap/microceph/current/**/*keyring*z./var/snap/microceph/common/data/mon/*/store.dbz"/var/snap/microceph/common/state/*)zconfig dumpz	device lsz	df detailÚdfzfs dumpzfs lsz	fs statuszmds statzmon dumpzosd blocked-byzosd blocklist lszosd crush tree --show-shadowzosd df treezosd dfzosd dumpzosd numa-statuszosd perfzosd pool autoscale-statuszosd pool availability-statuszosd pool ls detailzosd statzpg dumpzpg dump_stuckzpg statr   ztime-sync-status)Ú
get_optionÚget_ceph_versionÚceph_versionÚpolicyÚpackage_managerÚpkg_by_nameÚadd_file_tagsÚadd_forbidden_pathÚadd_copy_specÚadd_cmd_outputÚcollect_cmd_outputÚ
splitlinesÚendswithÚsplitÚget_ceph_ids)	Úselfr
   Úmicroceph_pkgÚcrashesÚcrashlnÚcidÚ	ceph_cmdsÚmidÚcmds	   &        Ú=/usr/lib/python3/dist-packages/sos/report/plugins/ceph_mon.pyÚsetupÚCephMON.setup,   s  € Ø—?‘? :Ó.ˆØ ×1Ñ1Ó3ˆÔàŸ™×3Ñ3×?Ñ?ÀÓLˆßØ×ÑØ Ø6¸ð ô ð
 ×#Ñ#ò %ô ÷ Ø×"Ñ"Ø5ð$õ ð ×"Ñ"Ø6ð$ô ð ×ÑØ(Ø-ð õ ð ×#Ñ#ò %ô ÷ Ø×"Ñ"ØDð$õ ð ×"Ñ"ØEð$ô ð ×ÑØ7Ø4ð ô ð
 	×Ñ˜M°ÀeÐÔLØ×Ñð %
ð 0ð	%
ð
 ð%
ð #ð%
ð ð%
ð ð%
ð ð%
ð !ð%
ð ð%
ð .ð%
ð 0ð%
ð ð%
ð  ð%
ð  !ð!%
ð"  ð#%
ð$  ð%%
ð& ð'%
ð( #ð)%
ð* ð+%
ð, &ð-%
ð. "ð/%
ð0 %ð1%
ð2 'ð3%
ð4 +ð5%
ð6 0ð7%
ð8 /ð9%
ð:  ð;%
ð< #ð=%
ð> (ð?%
ð@ +ðA%
ðB  ðC%
ðD !ðE%
ðF ðG%
ðH ðI%
ô %	ðN ×)Ñ)¨/Ó:ˆØ�8Õ Ô!Ø" 8Õ,×7Ñ7Ö9�Ø×#Ñ# C×(Ô(Ø!Ÿ-™-›/¨!Õ,�CØ×'Ñ'Ð*:¸3¸%Ð(@ÖAñ :ò

ˆ	ð: 	×ÑÐEØ#0Ø!5ð 	ô 	7ð 	×ÑÐ@Ø#0Ø!0ð 	ô 	2ð ×$Ñ$Ö&ˆCØ×ÑØ    [Ð1Ø    YÐ/ð!ð $ð  ö %ñ 'ð 	×Ñ±iÓ@±i¨s˜u S E›]±iÑ@ÔAð 	×ÑÙ;DÓE¹9°Cˆu�S�EÐ.Ó/¹9ÑEØ Øð 	ö 	
ùò Aùò Fs   É'J&ÊJ+c                ó>  € V P                  R4      pVR,          ^ 8X  dA    VR,          P                  4       ^,          p\        VP                  R4      ^ ,          4      # V P                  R4       ^ #   \         d   pT P	                  RT 24        Rp?L7Rp?ii ; i)z$Get the versions of running daemons zceph --versionr   r   Ú.z"Could not determine ceph version: Nz?Failed to find ceph version, command collection will be limited)Úexec_cmdr(   ÚintÚ	ExceptionÚ
_log_debugÚ
_log_error)r*   ÚverÚ_verÚerrs   &   r2   r   ÚCephMON.get_ceph_versionÅ   s•   € ð �m‰mÐ,Ó-ˆØˆx�=˜AÔðLØ˜8•}×*Ñ*Ó,¨QÕ/�Ü˜4Ÿ:™: c›?¨1Õ-Ó.Ð.ð 	�‰ØMô	
ñ øô ô LØ—‘Ð"DÀSÀEÐ J×KÑKûðLús   ¡>A3 Á3BÁ>BÂBc                ó8  € . pV P                   R9   dª   V P                  R4      pVR,          ^ 8X  d‰   VR,          P                  4        Fm  pVP                  4       pV'       g   K  V^ ,          P	                  R4      '       g   K=   VP                  R4      pVP                  WE^,           ,          4       Ko  	  V# V P                   ^8¼  dv   V P                  R4      pVR,          ^ 8X  dW    \        P                  ! RVR,          4      pVP                  VP                  4       ^,          P                  R	4      4       V# V#   \        \        3 d    T P                  R4        EK!  i ; i  \         d    pT P                  R
T 24        Rp?T# Rp?ii ; i)z Get the IDs of the Ceph daemons zps -u ceph -o argsr   r   zceph-monz--idzUnable to find ceph IDszceph statusz!(\s*mon: .* quorum) (.*) (\(.*\))Ú,zid determination failed: N)é   é   )r   r7   r&   r(   r'   ÚindexÚappendÚ
IndexErrorÚ
ValueErrorÚ	_log_warnÚreÚsearchÚextendÚgroupsr9   r:   )	r*   Úceph_idsÚoutÚprocsÚprocÚid_indexÚstatsÚretr>   s	   &        r2   r)   ÚCephMON.get_ceph_idsÔ   sf  € ð ˆà×Ñ Ô(à—-‘-Ð 4Ó5ˆCà�8�} Ô!à  �]×5Ñ5Ö7�EØ Ÿ;™;›=�Dç‘t  Q¥× 0Ñ 0°× <Ô <ðFØ'+§z¡z°&Ó'9˜HØ$ŸO™O¨D¸AµÕ,>Ö?ñ 8ð( ˆð ×Ñ "Ô$Ø—M‘M -Ó0ˆEØ�X� !Ô#ðGÜŸ)š)Ð$HØ$)¨(¥Oó5�Cà—O‘O C§J¡J£L°¥O×$9Ñ$9¸#Ó$>Ô?ð ˆˆxˆøô !+¬JÐ7ô FØ ŸN™NÐ+D×EÐEðFûô !ô GØ—O‘OÐ&?À¸uÐ$E×FÐFØˆûðGús+   Â/EÃ.AE/ Å"E,Å+E,Å/FÅ:FÆFc                óð   € V P                   ^8¼  d(   . R
OpV F  pRV R2pV P                  RVR4       K  	  M,. ROpRRP                  V4       R2pV P                  RVR4       V P                  R4       R	# )é   z(((.*)(z\\\": ))((\\\"(.*?)\\\")(.*)))r   z\2\"******\"\8z((\".*(Ú|z)\":) \")(.*)(\".*)z\1*******\5N)ÚkeyÚusernameÚpasswordÚ_secretúrbd/mirror/peer/.*)ÚAPI_PASSWORDz
API_USER.*z
API_.*_KEYrX   r[   r\   )r   Údo_cmd_output_subÚjoinÚdo_cmd_private_sub)r*   ÚkeysrX   Úcregs   &   r2   ÚpostprocÚCephMON.postprocõ   s�   € à×Ñ Ô"òˆDó �Ø! # Ð&DÐE�Ø×&Ñ&Ø.°Ð6Göò òˆDð ˜cŸh™h t›nÐ-Ð-@ÐAˆDØ×"Ñ"Ø*¨D°.ôð 	×ÑÐ 6Ö7ó    )r   N)ÚstorageÚvirtÚ	containerÚceph)zceph-(.*-)?mon.*)z/var/lib/ceph/mon/*z/var/lib/ceph/*/mon*r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
short_descÚplugin_nameÚprofilesÚ
containersÚfilesr   r3   r   r)   rc   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r2   r   r      sJ   ø‡ € ñð" €Jà€KØ7€Hð '€Jð6€Eà€LòW
òrò÷B!8ð !8re   r   )rI   Úsos.report.pluginsr   r   r   r   © re   r2   Ú<module>ry      s"   ðó 
ç AÑ AôH8ˆf�l Lö H8re   