�
i��d � �, � d dl mZmZ G d� dee� Zy)� )�Plugin�RedHatPluginc �0 � e Zd ZdZdZdZdZdZdZd� Z d� Z
y )
�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 client�insights)zredhat-access-insightszinsights-client)�system�sysmgmt)z)/etc/insights-client/insights-client.confz /etc/insights-client/.registeredz/etc/insights-client/tags.yamlz1/etc/insights-client/malware-detection-config.ymlz7/etc/redhat-access-insights/redhat-access-insights.confc � � | j | j � | j d� | j d� | j d� r| j d� n| j d� | j dd�� y ) Nz/var/lib/insightsz%/var/log/redhat-access-insights/*.log�all_logsz/var/log/insights-client/*.log*z,/var/log/insights-client/insights-client.logz-insights-client --test-connection --net-debug� )�timeout)�
add_copy_spec�config�
get_option�add_cmd_output)�selfs �=/usr/lib/python3/dist-packages/sos/report/plugins/insights.py�setupzRedHatInsights.setup$ sw � ����4�;�;�'����.�/�
���B�C��?�?�:�&����@�A����M�N����;�� �
� c �r � | j D ]( }| j |dd� | j |dd� �* y )Nz(password[\t\ ]*=[\t\ ]*)(.+)z
\1********z(proxy[\t\ ]*=.*)(:)(.*)(@.*)z\1\2********\4)r �do_file_sub)r �confs r �postproczRedHatInsights.postproc5 sD � ��K�K� �D�����6�
�
�
����6�8I�
� r N)�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�packages�profilesr r r � r r r r s. � � � =�J��K�<�H�$�H��F�
�"r r N)�sos.report.pluginsr r r r" |