From eb70e566a327b12445dbba4b6ca05b90772effa0 Mon Sep 17 00:00:00 2001 From: Bob Fahr Date: Fri, 17 Jul 2020 11:01:15 -0500 Subject: [PATCH] Remove specs not used by any rules (#2663) * Remove specs not used by any rules * Prepare specs for core collection * Remove all default specs that there are not being used to reduce archive size requirements * This includes specs that are not currently being collected by the current client and specs that would not be evaluated by any rules if collected * Remove assocated archive specs * Add all file-like specs to sos_archive specs to allow collection Signed-off-by: Bob Fahr * Update docstrings in datasources Signed-off-by: Bob Fahr * Update specs catalog documentation Signed-off-by: Bob Fahr * Remove commented lines Signed-off-by: Bob Fahr --- insights/specs/__init__.py | 4 - insights/specs/default.py | 564 +++-------------------------- insights/specs/insights_archive.py | 93 +---- insights/specs/sos_archive.py | 95 ++++- insights/util/specs_catalog.py | 4 +- 5 files changed, 145 insertions(+), 615 deletions(-) diff --git a/insights/specs/__init__.py b/insights/specs/__init__.py index 57bfd448e7..b78440eafa 100644 --- a/insights/specs/__init__.py +++ b/insights/specs/__init__.py @@ -211,7 +211,6 @@ class Specs(SpecSet): hponcfg_g = RegistryPoint() httpd_access_log = RegistryPoint(filterable=True) httpd_conf = RegistryPoint(multi_output=True) - httpd_conf_sos = RegistryPoint(multi_output=True) httpd_conf_scl_httpd24 = RegistryPoint(multi_output=True) httpd_conf_scl_jbcs_httpd24 = RegistryPoint(multi_output=True) httpd_error_log = RegistryPoint(filterable=True) @@ -220,7 +219,6 @@ class Specs(SpecSet): httpd_limits = RegistryPoint(multi_output=True) httpd_M = RegistryPoint(multi_output=True) httpd_on_nfs = RegistryPoint() - httpd_pid = RegistryPoint() httpd_ssl_access_log = RegistryPoint(filterable=True) httpd_ssl_error_log = RegistryPoint(filterable=True) httpd_V = RegistryPoint(multi_output=True) @@ -345,7 +343,6 @@ class Specs(SpecSet): modinfo = RegistryPoint(multi_output=True) modinfo_all = RegistryPoint() modprobe = RegistryPoint(multi_output=True) - module = RegistryPoint() mongod_conf = RegistryPoint(multi_output=True, filterable=True) mount = RegistryPoint() mounts = RegistryPoint() @@ -525,7 +522,6 @@ class Specs(SpecSet): route = RegistryPoint() rpm_V_packages = RegistryPoint() rsyslog_conf = RegistryPoint(filterable=True) - running_java = RegistryPoint() samba = RegistryPoint(filterable=True) sap_hdb_version = RegistryPoint(multi_output=True) sap_host_profile = RegistryPoint(filterable=True) diff --git a/insights/specs/default.py b/insights/specs/default.py index 61d8da5926..2f680c99ba 100644 --- a/insights/specs/default.py +++ b/insights/specs/default.py @@ -12,25 +12,16 @@ import os import re -from insights.core.context import ClusterArchiveContext -from insights.core.context import DockerImageContext from insights.core.context import HostContext -from insights.core.context import HostArchiveContext -from insights.core.context import OpenShiftContext from insights.core.dr import SkipComponent from insights.core.plugins import datasource -from insights.core.spec_factory import CommandOutputProvider, ContentException, DatasourceProvider, RawFileProvider -from insights.core.spec_factory import simple_file, simple_command, glob_file, command_with_args +from insights.core.spec_factory import RawFileProvider +from insights.core.spec_factory import simple_file, simple_command, glob_file from insights.core.spec_factory import first_of, foreach_collect, foreach_execute from insights.core.spec_factory import first_file, listdir -from insights.parsers.mount import Mount, ProcMounts -from insights.parsers.dnf_module import DnfModuleList -from insights.combiners.sap import Sap from insights.combiners.cloud_provider import CloudProvider -from insights.combiners.satellite_version import SatelliteVersion from insights.combiners.services import Services -from insights.components.rhel_version import IsRhel8, IsRhel7 from insights.specs import Specs @@ -43,6 +34,7 @@ def get_owner(filename): + """ tuple: Return tuple containing uid and gid of file filename """ st = stat(filename) name = getpwuid(st.st_uid).pw_name group = getgrgid(st.st_gid).gr_name @@ -50,21 +42,32 @@ def get_owner(filename): def get_cmd_and_package_in_ps(broker, target_command): - ps = broker[DefaultSpecs.ps_auxww].content - ctx = broker[HostContext] - results = set() - for p in ps: - p_splits = p.split(None, 10) - cmd = p_splits[10].split()[0] if len(p_splits) == 11 else '' - which = ctx.shell_out("which {0}".format(cmd)) if target_command in os.path.basename(cmd) else None - resolved = ctx.shell_out("readlink -e {0}".format(which[0])) if which else None - pkg = ctx.shell_out("/bin/rpm -qf {0}".format(resolved[0])) if resolved else None - if cmd and pkg is not None: - results.add("{0} {1}".format(cmd, pkg[0])) - return results + """ + Search for command in ``ps auxww`` output and determine RPM providing binary + + Arguments: + broker(dict): Current state of specs collected by Insights + target_command(str): Command name to search for in ps output + + Returns: + set: Set including all RPMs that provide the target command + """ + ps = broker[DefaultSpecs.ps_auxww].content + ctx = broker[HostContext] + results = set() + for p in ps: + p_splits = p.split(None, 10) + cmd = p_splits[10].split()[0] if len(p_splits) == 11 else '' + which = ctx.shell_out("which {0}".format(cmd)) if target_command in os.path.basename(cmd) else None + resolved = ctx.shell_out("readlink -e {0}".format(which[0])) if which else None + pkg = ctx.shell_out("/bin/rpm -qf {0}".format(resolved[0])) if resolved else None + if cmd and pkg is not None: + results.add("{0} {1}".format(cmd, pkg[0])) + return results def _make_rpm_formatter(fmt=None): + """ function: Returns function that will format output of rpm query command """ if fmt is None: fmt = [ '"name":"%{NAME}"', @@ -96,12 +99,12 @@ class DefaultSpecs(Specs): auditctl_status = simple_command("/sbin/auditctl -s") auditd_conf = simple_file("/etc/audit/auditd.conf") audit_log = simple_file("/var/log/audit/audit.log") - autofs_conf = simple_file("/etc/autofs.conf") avc_hash_stats = simple_file("/sys/fs/selinux/avc/hash_stats") avc_cache_threshold = simple_file("/sys/fs/selinux/avc/cache_threshold") @datasource(CloudProvider) def is_aws(broker): + """ bool: Returns True if this node is identified as running in AWS """ cp = broker[CloudProvider] if cp and cp.cloud_provider == CloudProvider.AWS: return True @@ -112,6 +115,7 @@ def is_aws(broker): @datasource(CloudProvider) def is_azure(broker): + """ bool: Returns True if this node is identified as running in Azure """ cp = broker[CloudProvider] if cp and cp.cloud_provider == CloudProvider.AZURE: return True @@ -125,10 +129,7 @@ def is_azure(broker): boot_loader_entries = glob_file("/boot/loader/entries/*.conf") branch_info = simple_file("/branch_info", kind=RawFileProvider) brctl_show = simple_command("/usr/sbin/brctl show") - candlepin_log = simple_file("/var/log/candlepin/candlepin.log") - candlepin_error_log = simple_file("/var/log/candlepin/error.log") cgroups = simple_file("/proc/cgroups") - checkin_conf = simple_file("/etc/splice/checkin.conf") ps_alxwww = simple_command("/bin/ps alxwww") ps_aux = simple_command("/bin/ps aux") ps_auxcww = simple_command("/bin/ps auxcww") @@ -138,7 +139,13 @@ def is_azure(broker): @datasource(ps_auxww) def tomcat_base(broker): - """Path: Tomcat base path""" + """ + Function to search the output of ``ps auxww`` to find all running tomcat + processes and extract the base path where the process was started. + + Returns: + list: List of the paths to each running process + """ ps = broker[DefaultSpecs.ps_auxww].content results = [] findall = re.compile(r"\-Dcatalina\.base=(\S+)").findall @@ -150,21 +157,18 @@ def tomcat_base(broker): return list(set(results)) catalina_out = foreach_collect(tomcat_base, "%s/catalina.out") - catalina_server_log = foreach_collect(tomcat_base, "%s/catalina*.log") cciss = glob_file("/proc/driver/cciss/cciss*") cdc_wdm = simple_file("/sys/bus/usb/drivers/cdc_wdm/module/refcnt") - ceilometer_central_log = simple_file("/var/log/ceilometer/central.log") ceilometer_collector_log = first_file(["/var/log/containers/ceilometer/collector.log", "/var/log/ceilometer/collector.log"]) ceilometer_compute_log = first_file(["/var/log/containers/ceilometer/compute.log", "/var/log/ceilometer/compute.log"]) ceilometer_conf = first_file(["/var/lib/config-data/puppet-generated/ceilometer/etc/ceilometer/ceilometer.conf", "/etc/ceilometer/ceilometer.conf"]) - ceph_socket_files = listdir("/var/run/ceph/ceph-*.*.asok", context=HostContext) ceph_conf = first_file(["/var/lib/config-data/puppet-generated/ceph/etc/ceph/ceph.conf", "/etc/ceph/ceph.conf"]) - ceph_config_show = foreach_execute(ceph_socket_files, "/usr/bin/ceph daemon %s config show") ceph_df_detail = simple_command("/usr/bin/ceph df detail -f json") ceph_health_detail = simple_command("/usr/bin/ceph health detail -f json") @datasource(ps_auxww) def is_ceph_monitor(broker): + """ bool: Returns True if ceph monitor process ceph-mon is running on this node """ ps = broker[DefaultSpecs.ps_auxww].content findall = re.compile(r"ceph\-mon").findall if any(findall(p) for p in ps): @@ -174,9 +178,7 @@ def is_ceph_monitor(broker): ceph_insights = simple_command("/usr/bin/ceph insights", deps=[is_ceph_monitor]) ceph_log = glob_file(r"var/log/ceph/ceph.log*") ceph_osd_dump = simple_command("/usr/bin/ceph osd dump -f json") - ceph_osd_df = simple_command("/usr/bin/ceph osd df -f json") ceph_osd_ec_profile_ls = simple_command("/usr/bin/ceph osd erasure-code-profile ls") - ceph_osd_ec_profile_get = foreach_execute(ceph_osd_ec_profile_ls, "/usr/bin/ceph osd erasure-code-profile get %s -f json") ceph_osd_log = glob_file(r"var/log/ceph/ceph-osd*.log") ceph_osd_tree = simple_command("/usr/bin/ceph osd tree -f json") ceph_s = simple_command("/usr/bin/ceph -s -f json") @@ -193,33 +195,15 @@ def is_ceph_monitor(broker): cloud_init_log = simple_file("/var/log/cloud-init.log") cluster_conf = simple_file("/etc/cluster/cluster.conf") cmdline = simple_file("/proc/cmdline") - cni_podman_bridge_conf = simple_file("/etc/cni/net.d/87-podman-bridge.conflist") - cpe = simple_file("/etc/system-release-cpe") - # are these locations for different rhel versions? cobbler_settings = first_file(["/etc/cobbler/settings", "/conf/cobbler/settings"]) cobbler_modules_conf = first_file(["/etc/cobbler/modules.conf", "/conf/cobbler/modules.conf"]) corosync = simple_file("/etc/sysconfig/corosync") - - @datasource([IsRhel7, IsRhel8]) - def corosync_cmapctl_cmd_list(broker): - if broker.get(IsRhel7): - return ["/usr/sbin/corosync-cmapctl", 'corosync-cmapctl -d runtime.schedmiss.timestamp', 'corosync-cmapctl -d runtime.schedmiss.delay'] - if broker.get(IsRhel8): - return ["/usr/sbin/corosync-cmapctl", '/usr/sbin/corosync-cmapctl -m stats', '/usr/sbin/corosync-cmapctl -C schedmiss'] - raise SkipComponent() - corosync_cmapctl = foreach_execute(corosync_cmapctl_cmd_list, "%s") corosync_conf = simple_file("/etc/corosync/corosync.conf") cpu_cores = glob_file("sys/devices/system/cpu/cpu[0-9]*/online") cpu_siblings = glob_file("sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list") cpu_smt_active = simple_file("sys/devices/system/cpu/smt/active") - cpu_smt_control = simple_file("sys/devices/system/cpu/smt/control") cpu_vulns = glob_file("sys/devices/system/cpu/vulnerabilities/*") - cpu_vulns_meltdown = simple_file("sys/devices/system/cpu/vulnerabilities/meltdown") - cpu_vulns_spectre_v1 = simple_file("sys/devices/system/cpu/vulnerabilities/spectre_v1") - cpu_vulns_spectre_v2 = simple_file("sys/devices/system/cpu/vulnerabilities/spectre_v2") - cpu_vulns_spec_store_bypass = simple_file("sys/devices/system/cpu/vulnerabilities/spec_store_bypass") cpuinfo = simple_file("/proc/cpuinfo") - cpuinfo_max_freq = simple_file("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq") cpupower_frequency_info = simple_command("/usr/bin/cpupower -c all frequency-info") cpuset_cpus = simple_file("/sys/fs/cgroup/cpuset/cpuset.cpus") cron_daily_rhsmd = simple_file("/etc/cron.daily/rhsmd") @@ -229,88 +213,23 @@ def corosync_cmapctl_cmd_list(broker): crypto_policies_bind = simple_file("/etc/crypto-policies/back-ends/bind.config") current_clocksource = simple_file("/sys/devices/system/clocksource/clocksource0/current_clocksource") date = simple_command("/bin/date") - date_iso = simple_command("/bin/date --iso-8601=seconds") date_utc = simple_command("/bin/date --utc") df__al = simple_command("/bin/df -al") df__alP = simple_command("/bin/df -alP") df__li = simple_command("/bin/df -li") - dig = simple_command("/usr/bin/dig +dnssec . DNSKEY") dig_dnssec = simple_command("/usr/bin/dig +dnssec . SOA") dig_edns = simple_command("/usr/bin/dig +edns=0 . SOA") dig_noedns = simple_command("/usr/bin/dig +noedns . SOA") - dirsrv = simple_file("/etc/sysconfig/dirsrv") - dirsrv_access = glob_file("var/log/dirsrv/*/access*") dirsrv_errors = glob_file("var/log/dirsrv/*/errors*") - display_java = simple_command("/usr/sbin/alternatives --display java") dmesg = simple_command("/bin/dmesg") dmesg_log = simple_file("/var/log/dmesg") dmidecode = simple_command("/usr/sbin/dmidecode") - dmsetup_info = simple_command("/usr/sbin/dmsetup info -C") - dnf_modules = glob_file("/etc/dnf/modules.d/*.module") - dnf_module_list = simple_command("/usr/bin/dnf -C --noplugins module list", deps=[IsRhel8]) - - @datasource(DnfModuleList) - def dnf_module_names(broker): - dml = broker[DnfModuleList] - if dml: - return (' ').join(dml) - raise SkipComponent() - - dnf_module_info = command_with_args("/usr/bin/dnf -C --noplugins module info %s", dnf_module_names, deps=[IsRhel8]) - dnsmasq_config = glob_file(["/etc/dnsmasq.conf", "/etc/dnsmasq.d/*.conf"]) docker_info = simple_command("/usr/bin/docker info") docker_list_containers = simple_command("/usr/bin/docker ps --all --no-trunc") docker_list_images = simple_command("/usr/bin/docker images --all --no-trunc --digests") - - @datasource(docker_list_images) - def docker_image_ids(broker): - """Command: docker_image_ids""" - images = broker[DefaultSpecs.docker_list_images] - try: - result = set() - for l in images.content[1:]: - result.add(l.split(None)[3].strip()) - except: - raise ContentException("No docker images.") - if result: - return list(result) - raise ContentException("No docker images.") - - # TODO: This parsing is broken. - @datasource(docker_list_containers) - def docker_container_ids(broker): - """Command: docker_container_ids""" - containers = broker[DefaultSpecs.docker_list_containers] - try: - result = set() - for l in containers.content[1:]: - result.add(l.split(None)[3].strip()) - except: - raise ContentException("No docker containers.") - if result: - return list(result) - raise ContentException("No docker containers.") - - docker_host_machine_id = simple_file("/etc/redhat-access-insights/machine-id") - docker_image_inspect = foreach_execute(docker_image_ids, "/usr/bin/docker inspect %s") - docker_container_inspect = foreach_execute(docker_container_ids, "/usr/bin/docker inspect %s") - docker_network = simple_file("/etc/sysconfig/docker-network") - docker_storage = simple_file("/etc/sysconfig/docker-storage") docker_storage_setup = simple_file("/etc/sysconfig/docker-storage-setup") docker_sysconfig = simple_file("/etc/sysconfig/docker") - - @datasource(ProcMounts) - def dumpdev(broker): - mnt = broker[ProcMounts] - mounted_dev = [m.mounted_device for m in mnt if m.mount_type in ('ext2', 'ext3', 'ext4')] - if mounted_dev: - return mounted_dev - raise SkipComponent() - dracut_kdump_capture_service = simple_file("/usr/lib/dracut/modules.d/99kdumpbase/kdump-capture.service") - du_dirs = foreach_execute(['/var/lib/candlepin/activemq-artemis'], "/bin/du -s -k %s") - dumpe2fs_h = foreach_execute(dumpdev, "/sbin/dumpe2fs -h %s") - engine_config_all = simple_command("/usr/bin/engine-config --all") engine_db_query_vdsm_version = simple_command('engine-db-query --statement "SELECT vs.vds_name, rpm_version FROM vds_dynamic vd, vds_static vs WHERE vd.vds_id = vs.vds_id;" --json') engine_log = simple_file("/var/log/ovirt-engine/engine.log") etc_journald_conf = simple_file(r"etc/systemd/journald.conf") @@ -318,43 +237,24 @@ def dumpdev(broker): etc_machine_id = simple_file("/etc/machine-id") etcd_conf = simple_file("/etc/etcd/etcd.conf") ethernet_interfaces = listdir("/sys/class/net", context=HostContext) - dcbtool_gc_dcb = foreach_execute(ethernet_interfaces, "/sbin/dcbtool gc %s dcb") ethtool = foreach_execute(ethernet_interfaces, "/sbin/ethtool %s") ethtool_S = foreach_execute(ethernet_interfaces, "/sbin/ethtool -S %s") ethtool_T = foreach_execute(ethernet_interfaces, "/sbin/ethtool -T %s") - ethtool_a = foreach_execute(ethernet_interfaces, "/sbin/ethtool -a %s") - ethtool_c = foreach_execute(ethernet_interfaces, "/sbin/ethtool -c %s") ethtool_g = foreach_execute(ethernet_interfaces, "/sbin/ethtool -g %s") ethtool_i = foreach_execute(ethernet_interfaces, "/sbin/ethtool -i %s") ethtool_k = foreach_execute(ethernet_interfaces, "/sbin/ethtool -k %s") - exim_conf = simple_file("etc/exim.conf") facter = simple_command("/usr/bin/facter") fc_match = simple_command("/bin/fc-match -sv 'sans:regular:roman' family fontformat") fcoeadm_i = simple_command("/usr/sbin/fcoeadm -i") - fdisk_l = simple_command("/sbin/fdisk -l") findmnt_lo_propagation = simple_command("/bin/findmnt -lo+PROPAGATION") firewall_cmd_list_all_zones = simple_command("/usr/bin/firewall-cmd --list-all-zones") firewalld_conf = simple_file("/etc/firewalld/firewalld.conf") - foreman_production_log = simple_file("/var/log/foreman/production.log") - foreman_proxy_conf = simple_file("/etc/foreman-proxy/settings.yml") - foreman_proxy_log = simple_file("/var/log/foreman-proxy/proxy.log") - foreman_satellite_log = simple_file("/var/log/foreman-installer/satellite.log") - foreman_ssl_access_ssl_log = simple_file("var/log/httpd/foreman-ssl_access_ssl.log") - foreman_rake_db_migrate_status = simple_command('/usr/sbin/foreman-rake db:migrate:status') - foreman_tasks_config = first_file(["/etc/sysconfig/foreman-tasks", "/etc/sysconfig/dynflowd"]) - freeipa_healthcheck_log = simple_file("/var/log/ipa/healthcheck/healthcheck.log") fstab = simple_file("/etc/fstab") galera_cnf = first_file(["/var/lib/config-data/puppet-generated/mysql/etc/my.cnf.d/galera.cnf", "/etc/my.cnf.d/galera.cnf"]) getconf_page_size = simple_command("/usr/bin/getconf PAGE_SIZE") getenforce = simple_command("/usr/sbin/getenforce") getsebool = simple_command("/usr/sbin/getsebool -a") - glance_api_conf = first_file(["/var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-api.conf", "/etc/glance/glance-api.conf"]) - glance_api_log = first_file(["/var/log/containers/glance/api.log", "/var/log/glance/api.log"]) - glance_cache_conf = first_file(["/var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-cache.conf", "/etc/glance/glance-cache.conf"]) - glance_registry_conf = simple_file("/etc/glance/glance-registry.conf") gluster_v_info = simple_command("/usr/sbin/gluster volume info") - gluster_v_status = simple_command("/usr/sbin/gluster volume status") - gluster_peer_status = simple_command("/usr/sbin/gluster peer status") gnocchi_conf = first_file(["/var/lib/config-data/puppet-generated/gnocchi/etc/gnocchi/gnocchi.conf", "/etc/gnocchi/gnocchi.conf"]) gnocchi_metricd_log = first_file(["/var/log/containers/gnocchi/gnocchi-metricd.log", "/var/log/gnocchi/metricd.log"]) grub_conf = simple_file("/boot/grub/grub.conf") @@ -365,20 +265,14 @@ def dumpdev(broker): grub2_efi_cfg = simple_file("boot/efi/EFI/redhat/grub.cfg") grubby_default_index = simple_command("/usr/sbin/grubby --default-index") # only RHEL7 and updwards grubby_default_kernel = simple_command("/sbin/grubby --default-kernel") - hammer_ping = simple_command("/usr/bin/hammer ping") hammer_task_list = simple_command("/usr/bin/hammer --config /root/.hammer/cli.modules.d/foreman.yml --output csv task list --search 'state=running AND ( label=Actions::Candlepin::ListenOnCandlepinEvents OR label=Actions::Katello::EventQueue::Monitor )'") haproxy_cfg = first_file(["/var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg", "/etc/haproxy/haproxy.cfg"]) heat_api_log = first_file(["/var/log/containers/heat/heat_api.log", "/var/log/heat/heat-api.log", "/var/log/heat/heat_api.log"]) heat_conf = first_file(["/var/lib/config-data/puppet-generated/heat/etc/heat/heat.conf", "/etc/heat/heat.conf"]) - heat_crontab = simple_command("/usr/bin/crontab -l -u heat") - heat_crontab_container = simple_command("docker exec heat_api_cron /usr/bin/crontab -l -u heat") - heat_engine_log = first_file(["/var/log/containers/heat/heat-engine.log", "/var/log/heat/heat-engine.log"]) hostname = simple_command("/bin/hostname -f") hostname_default = simple_command("/bin/hostname") hostname_short = simple_command("/bin/hostname -s") hosts = simple_file("/etc/hosts") - hponcfg_g = simple_command("/sbin/hponcfg -g") - httpd_access_log = simple_file("/var/log/httpd/access_log") httpd_conf = glob_file( [ "/etc/httpd/conf/httpd.conf", @@ -406,22 +300,17 @@ def dumpdev(broker): httpd_error_log = simple_file("var/log/httpd/error_log") httpd24_httpd_error_log = simple_file("/opt/rh/httpd24/root/etc/httpd/logs/error_log") jbcs_httpd24_httpd_error_log = simple_file("/opt/rh/jbcs-httpd24/root/etc/httpd/logs/error_log") - httpd_pid = simple_command("/usr/bin/pgrep -o httpd") - httpd_limits = foreach_collect(httpd_pid, "/proc/%s/limits") - - @datasource(SatelliteVersion) - def is_sat(broker): - sat = broker[SatelliteVersion] - if sat: - return True - raise SkipComponent() - - satellite_enabled_features = simple_command("/usr/bin/curl -sk https://localhost:9090/features --connect-timeout 5", deps=[is_sat]) virt_uuid_facts = simple_file("/etc/rhsm/facts/virt_uuid.facts") @datasource(ps_auxww) def httpd_cmd(broker): - """Command: httpd_command""" + """ + Function to search the output of ``ps auxww`` to find all running Apache + webserver processes and extract the binary path. + + Returns: + list: List of the binary paths to each running process + """ ps = broker[DefaultSpecs.ps_auxww].content ps_httpds = set() for p in ps: @@ -437,39 +326,11 @@ def httpd_cmd(broker): # https://access.redhat.com/solutions/21680 return list(ps_httpds) - @datasource(Mount) - def httpd_on_nfs(broker): - import json - mnt = broker[Mount] - mps = mnt.search(mount_type='nfs4') - # get nfs 4.0 mount points - nfs_mounts = [m.mount_point for m in mps if m['mount_options'].get("vers") == "4.0"] - if nfs_mounts: - # get all httpd ps - httpd_pids = broker[HostContext].shell_out("pgrep httpd") - if httpd_pids: - open_nfs_files = 0 - lsof_cmds = ["lsof -p {}".format(pid) for pid in httpd_pids if pid] - # maybe there are thousands open files - httpd_open_files = broker[HostContext].shell_out(lsof_cmds) - for line in httpd_open_files: - items = line.split() - if len(items) > 8 and items[8].startswith(tuple(nfs_mounts)): - open_nfs_files += 1 - result_dict = {"http_ids": httpd_pids, "nfs_mounts": nfs_mounts, "open_nfs_files": open_nfs_files} - return DatasourceProvider(content=json.dumps(result_dict), relative_path="httpd_open_nfsV4_files") - raise SkipComponent() - httpd_M = foreach_execute(httpd_cmd, "%s -M") - httpd_ssl_access_log = simple_file("/var/log/httpd/ssl_access_log") - httpd_ssl_error_log = simple_file("/var/log/httpd/ssl_error_log") httpd_V = foreach_execute(httpd_cmd, "%s -V") ifcfg = glob_file("/etc/sysconfig/network-scripts/ifcfg-*") ifcfg_static_route = glob_file("/etc/sysconfig/network-scripts/route-*") - ifconfig = simple_command("/sbin/ifconfig -a") imagemagick_policy = glob_file(["/etc/ImageMagick/policy.xml", "/usr/lib*/ImageMagick-6.5.4/config/policy.xml"]) - init_ora = simple_file("${ORACLE_HOME}/dbs/init.ora") - initscript = glob_file(r"etc/rc.d/init.d/*") init_process_cgroup = simple_file("/proc/1/cgroup") interrupts = simple_file("/proc/interrupts") ip_addr = simple_command("/sbin/ip addr") @@ -480,40 +341,17 @@ def httpd_on_nfs(broker): ipcs_m = simple_command("/usr/bin/ipcs -m") ipcs_m_p = simple_command("/usr/bin/ipcs -m -p") ipcs_s = simple_command("/usr/bin/ipcs -s") - - @datasource(ipcs_s) - def semid(broker): - """Command: semids""" - source = broker[DefaultSpecs.ipcs_s].content - results = set() - for s in source: - s_splits = s.split() - # key semid owner perms nsems - # 0x00000000 65536 apache 600 1 - if len(s_splits) == 5 and s_splits[1].isdigit(): - results.add(s_splits[1]) - return results - - ipcs_s_i = foreach_execute(semid, "/usr/bin/ipcs -s -i %s") iptables = simple_command("/sbin/iptables-save") iptables_permanent = simple_file("etc/sysconfig/iptables") ip6tables = simple_command("/sbin/ip6tables-save") - ip6tables_permanent = simple_file("etc/sysconfig/ip6tables") ipv4_neigh = simple_command("/sbin/ip -4 neighbor show nud all") ipv6_neigh = simple_command("/sbin/ip -6 neighbor show nud all") ironic_inspector_log = simple_file("/var/log/ironic-inspector/ironic-inspector.log") - ironic_conf = first_file(["/var/lib/config-data/puppet-generated/ironic/etc/ironic/ironic.conf", "/etc/ironic/ironic.conf"]) iscsiadm_m_session = simple_command("/usr/sbin/iscsiadm -m session") - katello_service_status = simple_command("/usr/bin/katello-service status") kdump_conf = simple_file("/etc/kdump.conf") - kerberos_kdc_log = simple_file("var/log/krb5kdc.log") kernel_config = glob_file("/boot/config-*") - kexec_crash_loaded = simple_file("/sys/kernel/kexec_crash_loaded") kexec_crash_size = simple_file("/sys/kernel/kexec_crash_size") - keystone_conf = first_file(["/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf", "/etc/keystone/keystone.conf"]) keystone_crontab = simple_command("/usr/bin/crontab -l -u keystone") - keystone_crontab_container = simple_command("docker exec keystone_cron /usr/bin/crontab -l -u keystone") - keystone_log = first_file(["/var/log/containers/keystone/keystone.log", "/var/log/keystone/keystone.log"]) kpatch_list = simple_command("/usr/sbin/kpatch list") krb5 = glob_file([r"etc/krb5.conf", r"etc/krb5.conf.d/*"]) ksmstate = simple_file("/sys/kernel/mm/ksm/run") @@ -523,17 +361,13 @@ def semid(broker): libkeyutils = simple_command("/usr/bin/find -L /lib /lib64 -name 'libkeyutils.so*'") libkeyutils_objdumps = simple_command('/usr/bin/find -L /lib /lib64 -name libkeyutils.so.1 -exec objdump -x "{}" \;') libvirtd_log = simple_file("/var/log/libvirt/libvirtd.log") - libvirtd_qemu_log = glob_file(r"/var/log/libvirt/qemu/*.log") limits_conf = glob_file(["/etc/security/limits.conf", "/etc/security/limits.d/*.conf"]) - locale = simple_command("/usr/bin/locale") localtime = simple_command("/usr/bin/file -L /etc/localtime") logrotate_conf = glob_file(["/etc/logrotate.conf", "/etc/logrotate.d/*"]) lpstat_p = simple_command("/usr/bin/lpstat -p") ls_boot = simple_command("/bin/ls -lanR /boot") ls_dev = simple_command("/bin/ls -lanR /dev") ls_disk = simple_command("/bin/ls -lanR /dev/disk") - ls_docker_volumes = simple_command("/bin/ls -lanR /var/lib/docker/volumes") - ls_edac_mc = simple_command("/bin/ls -lan /sys/devices/system/edac/mc") etc_and_sub_dirs = sorted(["/etc", "/etc/pki/tls/private", "/etc/pki/tls/certs", "/etc/pki/ovirt-vmconsole", "/etc/nova/migration", "/etc/sysconfig", "/etc/cloud/cloud.cfg.d"]) @@ -545,8 +379,8 @@ def semid(broker): ls_run_systemd_generator = simple_command("/bin/ls -lan /run/systemd/generator") ls_R_var_lib_nova_instances = simple_command("/bin/ls -laR /var/lib/nova/instances") ls_sys_firmware = simple_command("/bin/ls -lanR /sys/firmware") + ls_tmp = simple_command("/bin/ls -la /tmp") ls_usr_lib64 = simple_command("/bin/ls -lan /usr/lib64") - ls_usr_sbin = simple_command("/bin/ls -ln /usr/sbin") ls_var_lib_mongodb = simple_command("/bin/ls -la /var/lib/mongodb") ls_var_lib_nova_instances = simple_command("/bin/ls -laRZ /var/lib/nova/instances") ls_var_log = simple_command("/bin/ls -la /var/log /var/log/audit") @@ -557,32 +391,18 @@ def semid(broker): ls_var_tmp = simple_command("/bin/ls -ln /var/tmp") ls_var_run = simple_command("/bin/ls -lnL /var/run") ls_var_www = simple_command("/bin/ls -la /dev/null /var/www") # https://github.com/RedHatInsights/insights-core/issues/827 - ls_tmp = simple_command("/bin/ls -la /tmp") lsblk = simple_command("/bin/lsblk") lsblk_pairs = simple_command("/bin/lsblk -P -o NAME,KNAME,MAJ:MIN,FSTYPE,MOUNTPOINT,LABEL,UUID,RA,RO,RM,MODEL,SIZE,STATE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE,TYPE,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO") lscpu = simple_command("/usr/bin/lscpu") - lsinitrd = simple_command("/usr/bin/lsinitrd") - lsinitrd_lvm_conf = first_of([ - simple_command("/sbin/lsinitrd -f /etc/lvm/lvm.conf"), - simple_command("/usr/bin/lsinitrd -f /etc/lvm/lvm.conf") - ]) lsmod = simple_command("/sbin/lsmod") lsof = simple_command("/usr/sbin/lsof") lspci = simple_command("/sbin/lspci -k") lssap = simple_command("/usr/sap/hostctrl/exe/lssap") lsscsi = simple_command("/usr/bin/lsscsi") - lvdisplay = simple_command("/sbin/lvdisplay") lvm_conf = simple_file("/etc/lvm/lvm.conf") - lvmconfig = first_of([ - simple_command("/usr/sbin/lvmconfig --type full"), - simple_command("/usr/sbin/lvm dumpconfig --type full"), - ]) - lvs = None # simple_command('/sbin/lvs -a -o +lv_tags,devices --config="global{locking_type=0}"') lvs_noheadings = simple_command("/sbin/lvs --nameprefixes --noheadings --separator='|' -a -o lv_name,lv_size,lv_attr,mirror_log,vg_name,devices,region_size,data_percent,metadata_percent,segtype,seg_monitor --config=\"global{locking_type=0}\"") - lvs_noheadings_all = simple_command("/sbin/lvs --nameprefixes --noheadings --separator='|' -a -o lv_name,lv_size,lv_attr,mirror_log,vg_name,devices,region_size,data_percent,metadata_percent,segtype --config='global{locking_type=0} devices{filter=[\"a|.*|\"]}'") mac_addresses = glob_file("/sys/class/net/*/address") machine_id = first_file(["etc/insights-client/machine-id", "etc/redhat-access-insights/machine-id", "etc/redhat_access_proactive/machine-id"]) - manila_conf = first_file(["/var/lib/config-data/puppet-generated/manila/etc/manila/manila.conf", "/etc/manila/manila.conf"]) mariadb_log = simple_file("/var/log/mariadb/mariadb.log") max_uid = simple_command("/bin/awk -F':' '{ if($3 > max) max = $3 } END { print max }' /etc/passwd") md5chk_files = foreach_execute( @@ -591,62 +411,32 @@ def semid(broker): mdstat = simple_file("/proc/mdstat") meminfo = first_file(["/proc/meminfo", "/meminfo"]) messages = simple_file("/var/log/messages") - metadata_json = simple_file("metadata.json", context=ClusterArchiveContext, kind=RawFileProvider) - mistral_executor_log = simple_file("/var/log/mistral/executor.log") - mlx4_port = glob_file("/sys/bus/pci/devices/*/mlx4_port[0-9]") modinfo_i40e = simple_command("/sbin/modinfo i40e") modinfo_igb = simple_command("/sbin/modinfo igb") modinfo_ixgbe = simple_command("/sbin/modinfo ixgbe") modinfo_veth = simple_command("/sbin/modinfo veth") modinfo_vmxnet3 = simple_command("/sbin/modinfo vmxnet3") - - @datasource(lsmod, context=HostContext) - def lsmod_only_names(broker): - lsmod = broker[DefaultSpecs.lsmod].content - # skip the title - return [line.split()[0] for line in lsmod[1:] if line.strip()] - - modinfo = foreach_execute(lsmod_only_names, "modinfo %s") - - @datasource(lsmod_only_names, context=HostContext) - def lsmod_all_names(broker): - mod_list = broker[DefaultSpecs.lsmod_only_names] - if mod_list: - return ' '.join(mod_list) - raise SkipComponent() - - modinfo_all = command_with_args("modinfo %s", lsmod_all_names) - modprobe = glob_file(["/etc/modprobe.conf", "/etc/modprobe.d/*.conf"]) - sysconfig_mongod = glob_file([ - "etc/sysconfig/mongod", - "etc/opt/rh/rh-mongodb26/sysconfig/mongod" - ]) mongod_conf = glob_file([ "/etc/mongod.conf", "/etc/mongodb.conf", "/etc/opt/rh/rh-mongodb26/mongod.conf" ]) mount = simple_command("/bin/mount") - mounts = simple_file("/proc/mounts") mssql_conf = simple_file("/var/opt/mssql/mssql.conf") multicast_querier = simple_command("/usr/bin/find /sys/devices/virtual/net/ -name multicast_querier -print -exec cat {} \;") multipath_conf = simple_file("/etc/multipath.conf") multipath_conf_initramfs = simple_command("/bin/lsinitrd -f /etc/multipath.conf") multipath__v4__ll = simple_command("/sbin/multipath -v4 -ll") - mysqladmin_status = simple_command("/bin/mysqladmin status") mysqladmin_vars = simple_command("/bin/mysqladmin variables") mysql_log = glob_file([ "/var/log/mysql/mysqld.log", "/var/log/mysql.log", "/var/opt/rh/rh-mysql*/log/mysql/mysqld.log" ]) - mysqld_pid = simple_command("/usr/bin/pgrep -n mysqld") - mysqld_limits = foreach_collect(mysqld_pid, "/proc/%s/limits") named_checkconf_p = simple_command("/usr/sbin/named-checkconf -p") namespace = simple_command("/bin/ls /var/run/netns") ndctl_list_Ni = simple_command("/usr/bin/ndctl list -Ni") - ip_netns_exec_namespace_lsof = foreach_execute(namespace, "/sbin/ip netns exec %s lsof -i") netconsole = simple_file("/etc/sysconfig/netconsole") netstat = simple_command("/bin/netstat -neopa") netstat_agn = simple_command("/bin/netstat -agn") @@ -659,10 +449,8 @@ def lsmod_all_names(broker): neutron_l3_agent_log = simple_file("/var/log/neutron/l3-agent.log") neutron_metadata_agent_ini = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/metadata_agent.ini", "/etc/neutron/metadata_agent.ini"]) neutron_metadata_agent_log = first_file(["/var/log/containers/neutron/metadata-agent.log", "/var/log/neutron/metadata-agent.log"]) - neutron_ml2_conf = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/ml2/ml2_conf.ini", "/etc/neutron/plugins/ml2/ml2_conf.ini"]) neutron_ovs_agent_log = first_file(["/var/log/containers/neutron/openvswitch-agent.log", "/var/log/neutron/openvswitch-agent.log"]) neutron_plugin_ini = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini", "/etc/neutron/plugin.ini"]) - neutron_server_log = first_file(["/var/log/containers/neutron/server.log", "/var/log/neutron/server.log"]) nfnetlink_queue = simple_file("/proc/net/netfilter/nfnetlink_queue") nfs_exports = simple_file("/etc/exports") nfs_exports_d = glob_file("/etc/exports.d/*.exports") @@ -681,98 +469,42 @@ def lsmod_all_names(broker): "/etc/nova/nova.conf" ]) nova_crontab = simple_command("/usr/bin/crontab -l -u nova") - nova_crontab_container = simple_command("docker exec nova_api_cron /usr/bin/crontab -l -u nova") nova_uid = simple_command("/usr/bin/id -u nova") - nova_migration_uid = simple_command("/usr/bin/id -u nova_migration") nscd_conf = simple_file("/etc/nscd.conf") nsswitch_conf = simple_file("/etc/nsswitch.conf") ntp_conf = simple_file("/etc/ntp.conf") ntpq_leap = simple_command("/usr/sbin/ntpq -c 'rv 0 leap'") - ntpq_pn = simple_command("/usr/sbin/ntpq -pn") ntptime = simple_command("/usr/sbin/ntptime") numa_cpus = glob_file("/sys/devices/system/node/node[0-9]*/cpulist") numeric_user_group_name = simple_command("/bin/grep -c '^[[:digit:]]' /etc/passwd /etc/group") nvme_core_io_timeout = simple_file("/sys/module/nvme_core/parameters/io_timeout") - oc_get_bc = simple_command("/usr/bin/oc get bc -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_build = simple_command("/usr/bin/oc get build -o yaml --all-namespaces", context=OpenShiftContext) oc_get_clusterrole_with_config = simple_command("/usr/bin/oc get clusterrole --config /etc/origin/master/admin.kubeconfig") oc_get_clusterrolebinding_with_config = simple_command("/usr/bin/oc get clusterrolebinding --config /etc/origin/master/admin.kubeconfig") - oc_get_dc = simple_command("/usr/bin/oc get dc -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_egressnetworkpolicy = simple_command("/usr/bin/oc get egressnetworkpolicy -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_endpoints = simple_command("/usr/bin/oc get endpoints -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_event = simple_command("/usr/bin/oc get event -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_node = simple_command("/usr/bin/oc get nodes -o yaml", context=OpenShiftContext) - oc_get_pod = simple_command("/usr/bin/oc get pod -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_project = simple_command("/usr/bin/oc get project -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_pv = simple_command("/usr/bin/oc get pv -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_pvc = simple_command("/usr/bin/oc get pvc -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_rc = simple_command("/usr/bin/oc get rc -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_role = simple_command("/usr/bin/oc get role -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_rolebinding = simple_command("/usr/bin/oc get rolebinding -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_route = simple_command("/usr/bin/oc get route -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_service = simple_command("/usr/bin/oc get service -o yaml --all-namespaces", context=OpenShiftContext) - oc_get_configmap = simple_command("/usr/bin/oc get configmap -o yaml --all-namespaces", context=OpenShiftContext) - octavia_conf = simple_file("/var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf") odbc_ini = simple_file("/etc/odbc.ini") odbcinst_ini = simple_file("/etc/odbcinst.ini") - crt = simple_command("/usr/bin/find /etc/origin/node /etc/origin/master -type f -path '*.crt'") - openshift_certificates = foreach_execute(crt, "/usr/bin/openssl x509 -noout -enddate -in %s") - openshift_fluentd_pid = simple_command("/usr/bin/pgrep -n fluentd") - openshift_fluentd_environ = foreach_collect(openshift_fluentd_pid, "/proc/%s/environ") openshift_hosts = simple_file("/root/.config/openshift/hosts") openshift_router_pid = simple_command("/usr/bin/pgrep -n openshift-route") openshift_router_environ = foreach_collect(openshift_router_pid, "/proc/%s/environ") openvswitch_other_config = simple_command("/usr/bin/ovs-vsctl -t 5 get Open_vSwitch . other_config") - openvswitch_server_log = simple_file('/var/log/openvswitch/ovsdb-server.log') - openvswitch_daemon_log = simple_file('/var/log/openvswitch/ovs-vswitchd.log') os_release = simple_file("etc/os-release") - osa_dispatcher_log = first_file([ - "/var/log/rhn/osa-dispatcher.log", - "/rhn-logs/rhn/osa-dispatcher.log" - ]) ose_master_config = simple_file("/etc/origin/master/master-config.yaml") ose_node_config = simple_file("/etc/origin/node/node-config.yaml") - ovirt_engine_confd = glob_file("/etc/ovirt-engine/engine.conf.d/*") ovirt_engine_server_log = simple_file("/var/log/ovirt-engine/server.log") ovirt_engine_ui_log = simple_file("/var/log/ovirt-engine/ui.log") - ovirt_engine_boot_log = simple_file("/var/log/ovirt-engine/boot.log") - ovirt_engine_console_log = simple_file("/var/log/ovirt-engine/console.log") - ovs_vsctl_list_br = simple_command("/usr/bin/ovs-vsctl list-br") - ovs_appctl_fdb_show_bridge = foreach_execute(ovs_vsctl_list_br, "/usr/bin/ovs-appctl fdb/show %s") - ovs_ofctl_dump_flows = foreach_execute(ovs_vsctl_list_br, "/usr/bin/ovs-ofctl dump-flows %s") ovs_vsctl_list_bridge = simple_command("/usr/bin/ovs-vsctl list bridge") ovs_vsctl_show = simple_command("/usr/bin/ovs-vsctl show") - ovs_vswitchd_pid = simple_command("/usr/bin/pgrep -o ovs-vswitchd") - ovs_vswitchd_limits = foreach_collect(ovs_vswitchd_pid, "/proc/%s/limits") pacemaker_log = first_file(["/var/log/pacemaker.log", "/var/log/pacemaker/pacemaker.log"]) pci_rport_target_disk_paths = simple_command("/usr/bin/find /sys/devices/ -maxdepth 10 -mindepth 9 -name stat -type f") @datasource(Services, context=HostContext) def pcp_enabled(broker): + """ bool: Returns True if pmproxy service is on in services """ if not broker[Services].is_on("pmproxy"): raise SkipComponent("pmproxy not enabled") pcp_metrics = simple_command("/usr/bin/curl -s http://127.0.0.1:44322/metrics --connect-timeout 5", deps=[pcp_enabled]) - - @datasource(ps_auxww, context=HostContext) - def package_and_java(broker): - """Command: package_and_java""" - return get_cmd_and_package_in_ps(broker, 'java') - - package_provides_java = foreach_execute(package_and_java, "echo %s") - - @datasource(ps_auxww, context=HostContext) - def package_and_httpd(broker): - """Command: package_and_httpd""" - return get_cmd_and_package_in_ps(broker, 'httpd') - - package_provides_httpd = foreach_execute(package_and_httpd, "echo %s") - pam_conf = simple_file("/etc/pam.conf") - parted__l = simple_command("/sbin/parted -l -s") - partitions = simple_file("/proc/partitions") passenger_status = simple_command("/usr/bin/passenger-status") password_auth = simple_file("/etc/pam.d/password-auth") - pcs_config = simple_command("/usr/sbin/pcs config") pcs_quorum_status = simple_command("/usr/sbin/pcs quorum status") pcs_status = simple_command("/usr/sbin/pcs status") pluginconf_d = glob_file("/etc/yum/pluginconf.d/*.conf") @@ -787,28 +519,19 @@ def package_and_httpd(broker): glob_file("/database/postgresql-*.log") ]) puppetserver_config = simple_file("/etc/sysconfig/puppetserver") - prev_uploader_log = simple_file("var/log/redhat-access-insights/redhat-access-insights.log.1") proc_netstat = simple_file("proc/net/netstat") proc_slabinfo = simple_file("proc/slabinfo") proc_snmp_ipv4 = simple_file("proc/net/snmp") proc_snmp_ipv6 = simple_file("proc/net/snmp6") proc_stat = simple_file("proc/stat") pulp_worker_defaults = simple_file("etc/default/pulp_workers") - pvs = simple_command('/sbin/pvs -a -v -o +pv_mda_free,pv_mda_size,pv_mda_count,pv_mda_used_count,pe_count --config="global{locking_type=0}"') pvs_noheadings = simple_command("/sbin/pvs --nameprefixes --noheadings --separator='|' -a -o pv_all,vg_name --config=\"global{locking_type=0}\"") - pvs_noheadings_all = simple_command("/sbin/pvs --nameprefixes --noheadings --separator='|' -a -o pv_all,vg_name --config='global{locking_type=0} devices{filter=[\"a|.*|\"]}'") qemu_conf = simple_file("/etc/libvirt/qemu.conf") qemu_xml = glob_file(r"/etc/libvirt/qemu/*.xml") qpid_stat_g = simple_command("/usr/bin/qpid-stat -g --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b amqps://localhost:5671") - qpid_stat_q = simple_command("/usr/bin/qpid-stat -q --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b amqps://localhost:5671") - qpid_stat_u = simple_command("/usr/bin/qpid-stat -u --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b amqps://localhost:5671") qpidd_conf = simple_file("/etc/qpid/qpidd.conf") rabbitmq_env = simple_file("/etc/rabbitmq/rabbitmq-env.conf") - rabbitmq_logs = glob_file("/var/log/rabbitmq/rabbit@*.log", ignore=".*rabbit@.*(?