a G%@iµ ć@s&ddlmZmZGdd„deeƒZdS)é)ŚPluginŚ RedHatPluginc@s4eZdZdZdZdZdZdZdZdd„Z 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-idcCs|| |j”| d”| d”| d”r6| d”n | d”|jddd| d ”|jd dd|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é)Śtimeoutzinsights-client --versionzinsights-client --status)z /etc/rhsmz /sys/kernelz /var/lib/sssT)Ś recursive)Z add_copy_specŚconfig_and_statusZ get_optionZadd_cmd_outputZadd_dir_listing)Śself©r ś?/usr/lib/python3.9/site-packages/sos/report/plugins/insights.pyŚsetup&s      ž  ’zRedHatInsights.setupcCs8|jD] }| |dd”| |dd”q| dg”dS)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