U
    -Ø_g¸  ã                   @   s2   d dl m Z  d dlmZmZ G dd„ deeƒZdS )é    )Úglob)ÚPluginÚRedHatPluginc                   @   sN   e Zd ZdZdZdZdZedƒZe 	d¡ e 	d¡ dgZ
d	d
„ Zdd„ ZdS )ÚMonitzMonit monitoring daemon)Úmonit)Úsystemr   z/etc/monit.d/*z/etc/monit.confz/etc/monitrcz/var/log/monit.logc                 C   s    |   d¡ |  | j| j ¡ d S )Nzmonit status)Zadd_cmd_outputZadd_copy_specÚ	monit_logÚ
monit_conf)Úself© r   ú:/usr/lib/python3/dist-packages/sos/report/plugins/monit.pyÚsetup   s    
zMonit.setupc                 C   s,   | j D ] }|  |dd¡ |  |dd¡ qd S )Nz(allow) (.*):(.*)z\1 ********:********z(username|password) (\w)+z\1 ********)r	   Zdo_file_sub)r
   Úfiler   r   r   Úpostproc#   s    
þþzMonit.postprocN)Ú__name__Ú
__module__Ú__qualname__Z
short_descZpackagesZprofilesZplugin_namer   r	   Úappendr   r   r   r   r   r   r   r      s   

r   N)r   Zsos.report.pluginsr   r   r   r   r   r   r   Ú<module>   s   