Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/collectd.cpython-36.pyc

3

�f��@s.ddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPluginc@s0eZdZdZdZdZd
ZdZdd�Zd	d
�Z	dS)�CollectdzCollectd config collector�collectd�services�	webserver�)/var/log/containers/collectd/collectd.log�/var/log/collectd/collectd.logcCs�|jdddddg�tjd�}yV|jd�}t|dd	d
��4}x,|D]$}|j|�r@|jd|j�d�q@WWdQRXWn0tk
r�}z|j	d
|�WYdd}~XnXdS)Nz/etc/collectd.confz/etc/collectd.d/*.confz)/var/log/containers/collectd/collectd.logz@/var/lib/config-data/puppet-generated/collectd/etc/collectd.confz>/var/lib/config-data/puppet-generated/collectd/etc/collectd.d/z*.confz
^LoadPlugin.*�rzUTF-8)�encodingzActive Plugin found: %s�z%could not open /etc/collectd.conf: %szD/var/lib/config-data/puppet-generated/collectd/etc/collectd.d/*.conf���)
Z
add_copy_spec�re�compileZ	path_join�open�matchZ	add_alert�split�IOErrorZ	_log_warn)�selfZplugin�cfile�file�line�err�r�/usr/lib/python3.6/collectd.py�setups"



"zCollectd.setupcCs:ddddg}ddj|�}|jd|d�|jd	|d�dS)
NZPasswordZUserz[<]*URLZAddressz(^[#]*\s*(%s)\s* \s*)(.*)�|z/etc/collectd.d/*.confz
\1"*********"z/etc/collectd.conf)�joinZdo_path_regex_subZdo_file_sub)rZprotect_keysZregexprrr�postproc0szCollectd.postprocN)rr)r)rr	)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackages�filesrrrrrrrsr)rZsos.report.pluginsrrrrrrr�<module>
s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists