a >h8 @s&ddlmZmZGdddeeZdS))Plugin RedHatPluginc@s4eZdZdZdZdZdZdZdZddZ d d Z d S) 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)zredhat-access-insightszinsights-client)systemZsysmgmt)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.confz /etc/insights-client/.lastuploadz/etc/insights-client/machine-idcCsd||j|d|d|dr6|dn |d|jddd|jgd d d dS) 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)timeout)z /etc/rhsmz /sys/kernelz /var/lib/sssT) recursive)Z add_copy_specconfig_and_statusZ get_optionZadd_cmd_outputZadd_dir_listing)selfr ?/usr/lib/python3.9/site-packages/sos/report/plugins/insights.pysetup&s       zRedHatInsights.setupcCs8|jD] }||dd||ddq|dgdS)Nz(password[\t\ ]*=[\t\ ]*)(.+)z \1********z(proxy[\t\ ]*=.*)(:)(.*)(@.*)z\1\2********\4z/var/log/insights-client/*)r Z do_file_subZdo_paths_http_sub)r Zconfr r r postproc:s zRedHatInsights.postprocN) __name__ __module__ __qualname____doc__Z short_descZ plugin_nameZpackagesZprofilesr r rr r r r r s  rN)Zsos.report.pluginsrrrr r r r  s