o
    O6ufº  ã                   @   s&   d dl mZmZ G dd„ deeƒZdS )é    )ÚPluginÚIndependentPluginc                       s8   e Zd ZdZdZdZdZdZ‡ fdd„Zdd	„ Z	‡  Z
S )
ÚTelegrafz,Telegraf, the metric collecting tool, pluginÚtelegraf)Úobservability)r   )z/etc/telegraf/ú/etc/default/telegrafc                    s4   t ƒ  ¡  |  d¡r|  dg¡ d S |  dg¡ d S )NÚall_logsz/var/log/telegraf/z/var/log/telegraf/*.log)ÚsuperÚsetupÚ
get_optionÚadd_copy_spec)Úself©Ú	__class__© ú=/usr/lib/python3/dist-packages/sos/report/plugins/telegraf.pyr
      s   


ÿ
ÿzTelegraf.setupc                 C   sP   g d¢}ddg}dd  |¡› d�}|  dd  |¡› d�|d	¡ |  |d
 ¡ d S )N)ÚpasswordÚtokenÚpwdz/etc/telegraf/*r   z	(^\s*(.*(ú|z))\s*=\s*)(.*)ú(ú)z\1*********r   )ÚjoinÚdo_path_regex_subÚdo_file_private_sub)r   Úprotect_keysÚtelegraf_path_expsÚ	match_expr   r   r   Úpostproc(   s   þþzTelegraf.postproc)Ú__name__Ú
__module__Ú__qualname__Ú
short_descÚplugin_nameÚprofilesÚservicesÚfilesr
   r   Ú__classcell__r   r   r   r   r      s    r   N)Úsos.report.pluginsr   r   r   r   r   r   r   Ú<module>   s   
