
    -_g                     ,    d dl mZmZ  G d dee      Zy)    )PluginIndependentPluginc                   8     e Zd ZdZdZdZdZdZ fdZd Z	 xZ
S )Telegrafz,Telegraf, the metric collecting tool, plugintelegraf)observability)r   )z/etc/telegraf//etc/default/telegrafc                     t         |           | j                  d      r| j                  dg       y | j                  dg       y )Nall_logsz/var/log/telegraf/z/var/log/telegraf/*.log)supersetup
get_optionadd_copy_spec)self	__class__s    =/usr/lib/python3/dist-packages/sos/report/plugins/telegraf.pyr   zTelegraf.setup   sH     ??:&$   )      c                     g d}ddg}ddj                  |       d}| j                  ddj                  |       d|d	       | j                  |d
          y )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_exps       r   postproczTelegraf.postproc(   su    
 #
 !,!7 8G	 	!CHH-?$@#AC(-	/
 	  !3A!67r   )__name__
__module____qualname__
short_descplugin_nameprofilesservicesfilesr   r!   __classcell__)r   s   @r   r   r      s(    ?JK!HHE
8r   r   N)sos.report.pluginsr   r   r    r   r   <module>r-      s    9,8v( ,8r   