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__/insights.cpython-36.opt-1.pyc

3

�f
�@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�RedHatPluginc@s4eZdZdZdZdZdZdZdZdd�Z	dd�Z
dS)�RedHatInsightsaPlugin to capture configuration and logging for the Red Hat Insights
    client. Insights is used to provide ongoing analysis of systems for
    proactive problem mitigation, with the client being one of the primary
    sources of data for the service.

    This plugin will capture configuration information under
    /etc/insighits-client, as well as logs from /var/log/insights-client. A
    single connection test via the `insights-client` command is performed and
    recorded as well for troubleshooting purposes.
    z)Red Hat Insights configuration and clientZinsights�redhat-access-insights�insights-client�system�sysmgmt�)/etc/insights-client/insights-client.conf� /etc/insights-client/.registered�/etc/insights-client/tags.yaml�1/etc/insights-client/malware-detection-config.yml�7/etc/redhat-access-insights/redhat-access-insights.conf� /etc/insights-client/.lastupload�/etc/insights-client/machine-idcCst|j|j�|jd�|jd�|jd�r6|jd�n
|jd�|jddd�x dD]}|jd|��d
d�qTWdS)Nz/var/lib/insightsz%/var/log/redhat-access-insights/*.logZall_logsz/var/log/insights-client/*.log*z,/var/log/insights-client/insights-client.logz-insights-client --test-connection --net-debug�)Ztimeout�	/etc/rhsm�/sys/kernel�/var/lib/sssz/bin/ls -lanR T)Z
cmd_as_tag)rrr)Z
add_copy_spec�config_and_statusZ
get_optionZadd_cmd_output)�selfZ_dir�r�/usr/lib/python3.6/insights.py�setup&s




zRedHatInsights.setupcCs0x*|jD] }|j|dd�|j|dd�qWdS)Nz(password[\t\ ]*=[\t\ ]*)(.+)z
\1********z(proxy[\t\ ]*=.*)(:)(.*)(@.*)z\1\2********\4)rZdo_file_sub)rZconfrrr�postproc:s

zRedHatInsights.postprocN)rr)rr)r	r
rrr
rr)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZpackagesZprofilesrrrrrrrrs
rN)Zsos.report.pluginsrrrrrrr�<module>	s

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