Exemple #1
0
class DefaultSpecs(Specs):
    abrt_ccpp_conf = simple_file("/etc/abrt/plugins/CCpp.conf")
    abrt_status_bare = simple_command("/usr/bin/abrt status --bare=True")
    alternatives_display_python = simple_command("/usr/sbin/alternatives --display python")
    amq_broker = glob_file("/var/opt/amq-broker/*/etc/broker.xml")
    auditctl_status = simple_command("/sbin/auditctl -s")
    auditd_conf = simple_file("/etc/audit/auditd.conf")
    audit_log = simple_file("/var/log/audit/audit.log")
    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
        raise SkipComponent()

    aws_instance_id_doc = simple_command("/usr/bin/curl -s http://169.254.169.254/latest/dynamic/instance-identity/document --connect-timeout 5", deps=[is_aws])
    aws_instance_id_pkcs7 = simple_command("/usr/bin/curl -s http://169.254.169.254/latest/dynamic/instance-identity/pkcs7 --connect-timeout 5", deps=[is_aws])
    awx_manage_check_license = simple_command("/usr/bin/awx-manage check_license")

    @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
        raise SkipComponent()

    azure_instance_type = simple_command("/usr/bin/curl -s -H Metadata:true http://169.254.169.254/metadata/instance/compute/vmSize?api-version=2018-10-01&format=text --connect-timeout 5", deps=[is_azure])
    bios_uuid = simple_command("/usr/sbin/dmidecode -s system-uuid")
    blkid = simple_command("/sbin/blkid -c /dev/null")
    bond = glob_file("/proc/net/bonding/bond*")
    bond_dynamic_lb = glob_file("/sys/class/net/bond[0-9]*/bonding/tlb_dynamic_lb")
    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")
    cgroups = simple_file("/proc/cgroups")
    ps_alxwww = simple_command("/bin/ps alxwww")
    ps_aux = simple_command("/bin/ps aux")
    ps_auxcww = simple_command("/bin/ps auxcww")
    ps_auxww = simple_command("/bin/ps auxww")
    ps_ef = simple_command("/bin/ps -ef")
    ps_eo = simple_command("/usr/bin/ps -eo pid,ppid,comm")

    @datasource(ps_auxww)
    def tomcat_base(broker):
        """
        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
        for p in ps:
            found = findall(p)
            if found:
                # Only get the path which is absolute
                results.extend(f for f in found if f[0] == '/')
        return list(set(results))

    catalina_out = foreach_collect(tomcat_base, "%s/catalina.out")
    cciss = glob_file("/proc/driver/cciss/cciss*")
    cdc_wdm = simple_file("/sys/bus/usb/drivers/cdc_wdm/module/refcnt")
    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_conf = first_file(["/var/lib/config-data/puppet-generated/ceph/etc/ceph/ceph.conf", "/etc/ceph/ceph.conf"])
    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)
    def is_ceph_monitor(broker):
        """ bool: Returns True if ceph monitor process ceph-mon is running on this node """
        ps = broker[Ps]
        if ps.search(COMMAND__contains='ceph-mon'):
            return True
        raise SkipComponent()

    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_ec_profile_ls = simple_command("/usr/bin/ceph osd erasure-code-profile ls")
    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")
    ceph_v = simple_command("/usr/bin/ceph -v")
    certificates_enddate = simple_command("/usr/bin/find /etc/origin/node /etc/origin/master /etc/pki /etc/ipa -type f -exec /usr/bin/openssl x509 -noout -enddate -in '{}' \; -exec echo 'FileName= {}' \;")
    chkconfig = simple_command("/sbin/chkconfig --list")
    chrony_conf = simple_file("/etc/chrony.conf")
    chronyc_sources = simple_command("/usr/bin/chronyc sources")
    cib_xml = simple_file("/var/lib/pacemaker/cib/cib.xml")
    cinder_api_log = first_file(["/var/log/containers/cinder/cinder-api.log", "/var/log/cinder/cinder-api.log"])
    cinder_conf = first_file(["/var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf", "/etc/cinder/cinder.conf"])
    cinder_volume_log = first_file(["/var/log/containers/cinder/volume.log", "/var/log/containers/cinder/cinder-volume.log", "/var/log/cinder/volume.log"])

    @datasource(HostContext)
    def cloud_cfg(broker):
        """This datasource provides the network configuration collected
        from ``/etc/cloud/cloud.cfg``.

        Typical content of ``/etc/cloud/cloud.cfg`` file is::

            #cloud-config
            users:
              - name: demo
                ssh-authorized-keys:
                  - key_one
                  - key_two
                passwd: $6$j212wezy$7H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7MbYCarYeAHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/

            network:
              version: 1
              config:
                - type: physical
                  name: eth0
                  subnets:
                    - type: dhcp
                    - type: dhcp6

            system_info:
              default_user:
                name: user2
                plain_text_passwd: 'someP@assword'
                home: /home/user2

            debug:
              output: /var/log/cloud-init-debug.log
              verbose: true

        Note:
            This datasource may be executed using the following command:

            ``insights-cat --no-header cloud_cfg``

        Example:

            ``{"version": 1, "config": [{"type": "physical", "name": "eth0", "subnets": [{"type": "dhcp"}, {"type": "dhcp6"}]}]}``

        Returns:
            str: JSON string when the ``network`` parameter is configure, else nothing is returned.

        Raises:
            SkipComponent: When the path does not exist.
        """
        relative_path = '/etc/cloud/cloud.cfg'
        network_config = ''

        try:
            with open(relative_path, 'r') as f:
                content = yaml.load(f, Loader=yaml.SafeLoader)
                network_config = content.get('network', None)
                if network_config:
                    return DatasourceProvider(content=json.dumps(network_config), relative_path=relative_path)

        except OSError:
            raise SkipComponent()

    cloud_init_custom_network = simple_file("/etc/cloud/cloud.cfg.d/99-custom-networking.cfg")
    cloud_init_log = simple_file("/var/log/cloud-init.log")
    cluster_conf = simple_file("/etc/cluster/cluster.conf")
    cmdline = simple_file("/proc/cmdline")
    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):
        """
        corosync-cmapctl add different arguments on RHEL7 and RHEL8.

        Returns:
            list: A list of related corosync-cmapctl commands based the RHEL version.
        """
        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_vulns = glob_file("sys/devices/system/cpu/vulnerabilities/*")
    cpuinfo = simple_file("/proc/cpuinfo")
    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")
    crypto_policies_config = simple_file("/etc/crypto-policies/config")
    crypto_policies_state_current = simple_file("/etc/crypto-policies/state/current")
    crypto_policies_opensshserver = simple_file("/etc/crypto-policies/back-ends/opensshserver.config")
    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_utc = simple_command("/bin/date --utc")
    designate_conf = first_file(["/var/lib/config-data/puppet-generated/designate/etc/designate/designate.conf",
                                 "/etc/designate/designate.conf"])
    df__al = simple_command("/bin/df -al -x autofs")
    df__alP = simple_command("/bin/df -alP -x autofs")
    df__li = simple_command("/bin/df -li -x autofs")
    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_errors = glob_file("var/log/dirsrv/*/errors*")
    dm_mod_use_blk_mq = simple_file("/sys/module/dm_mod/parameters/use_blk_mq")
    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_conf = simple_file("/etc/dnf/dnf.conf")
    dnf_modules = glob_file("/etc/dnf/modules.d/*.module")
    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")
    doveconf = simple_command("/usr/bin/doveconf")
    docker_storage_setup = simple_file("/etc/sysconfig/docker-storage-setup")
    docker_sysconfig = simple_file("/etc/sysconfig/docker")
    dotnet_version = simple_command("/usr/bin/dotnet --version")
    dracut_kdump_capture_service = simple_file("/usr/lib/dracut/modules.d/99kdumpbase/kdump-capture.service")

    @datasource()
    def du_dirs_list(broker):
        """ Provide a list of directorys for the ``du_dirs`` spec to scan """
        return ['/var/lib/candlepin/activemq-artemis']
    du_dirs = foreach_execute(du_dirs_list, "/bin/du -s -k %s")
    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")
    etc_journald_conf_d = glob_file(r"etc/systemd/journald.conf.d/*.conf")
    etc_machine_id = simple_file("/etc/machine-id")
    etc_udev_40_redhat_rules = simple_file("/etc/udev/rules.d/40-redhat.rules")
    etcd_conf = simple_file("/etc/etcd/etcd.conf")
    ethernet_interfaces = listdir("/sys/class/net", context=HostContext)
    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_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")
    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")
    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")
    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")
    gluster_v_info = simple_command("/usr/sbin/gluster volume info")
    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")
    grub_config_perms = simple_command("/bin/ls -l /boot/grub2/grub.cfg")  # only RHEL7 and updwards
    grub_efi_conf = simple_file("/boot/efi/EFI/redhat/grub.conf")
    grub1_config_perms = simple_command("/bin/ls -l /boot/grub/grub.conf")  # RHEL6
    grub2_cfg = simple_file("/boot/grub2/grub.cfg")
    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_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"])
    hostname = simple_command("/bin/hostname -f")
    hostname_default = simple_command("/bin/hostname")
    hostname_short = simple_command("/bin/hostname -s")
    hosts = simple_file("/etc/hosts")
    httpd_conf = glob_file(
        [
            "/etc/httpd/conf/httpd.conf",
            "/etc/httpd/conf.d/*.conf",
            "/etc/httpd/conf.d/*/*.conf",
            "/etc/httpd/conf.modules.d/*.conf"
        ]
    )
    httpd_conf_scl_httpd24 = glob_file(
        [
            "/opt/rh/httpd24/root/etc/httpd/conf/httpd.conf",
            "/opt/rh/httpd24/root/etc/httpd/conf.d/*.conf",
            "/opt/rh/httpd24/root/etc/httpd/conf.d/*/*.conf",
            "/opt/rh/httpd24/root/etc/httpd/conf.modules.d/*.conf"
        ]
    )
    httpd_conf_scl_jbcs_httpd24 = glob_file(
        [
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf/httpd.conf",
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/*.conf",
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/*/*.conf",
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.modules.d/*.conf"
        ]
    )
    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")
    virt_uuid_facts = simple_file("/etc/rhsm/facts/virt_uuid.facts")

    @datasource(Ps)
    def httpd_cmd(broker):
        """
        Function to search the output of ``ps auxcww`` to find all running Apache
        webserver processes and extract the binary path.

        Returns:
            list: List of the binary paths to each running process
        """
        return _get_running_commands(broker, ['httpd', ])

    httpd_pid = simple_command("/usr/bin/pgrep -o httpd")
    httpd_limits = foreach_collect(httpd_pid, "/proc/%s/limits")
    httpd_M = foreach_execute(httpd_cmd, "%s -M")
    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-*")
    imagemagick_policy = glob_file(["/etc/ImageMagick/policy.xml", "/usr/lib*/ImageMagick-6.5.4/config/policy.xml"])
    initctl_lst = simple_command("/sbin/initctl --system list")
    init_process_cgroup = simple_file("/proc/1/cgroup")
    interrupts = simple_file("/proc/interrupts")
    ip_addr = simple_command("/sbin/ip addr")
    ip_addresses = simple_command("/bin/hostname -I")
    ip_route_show_table_all = simple_command("/sbin/ip route show table all")
    ip_s_link = simple_command("/sbin/ip -s -d link")
    ipaupgrade_log = simple_file("/var/log/ipaupgrade.log")
    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")
    ipsec_conf = simple_file("/etc/ipsec.conf")
    iptables = simple_command("/sbin/iptables-save")
    iptables_permanent = simple_file("etc/sysconfig/iptables")
    ip6tables = simple_command("/sbin/ip6tables-save")
    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 = first_file(["/var/log/containers/ironic-inspector/ironic-inspector.log", "/var/log/ironic-inspector/ironic-inspector.log"])
    iscsiadm_m_session = simple_command("/usr/sbin/iscsiadm -m session")
    kdump_conf = simple_file("/etc/kdump.conf")
    kernel_config = glob_file("/boot/config-*")
    kexec_crash_size = simple_file("/sys/kernel/kexec_crash_size")
    keystone_crontab = simple_command("/usr/bin/crontab -l -u keystone")
    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")
    kubepods_cpu_quota = glob_file("/sys/fs/cgroup/cpu/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod[a-f0-9_]*.slice/cpu.cfs_quota_us")
    last_upload_globs = ["/etc/redhat-access-insights/.lastupload", "/etc/insights-client/.lastupload"]
    lastupload = glob_file(last_upload_globs)
    libssh_client_config = simple_file("/etc/libssh/libssh_client.config")
    libssh_server_config = simple_file("/etc/libssh/libssh_server.config")
    libvirtd_log = simple_file("/var/log/libvirt/libvirtd.log")
    limits_conf = glob_file(["/etc/security/limits.conf", "/etc/security/limits.d/*.conf"])
    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_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", "/etc/rc.d/init.d"])
    ls_etc = simple_command("/bin/ls -lan {0}".format(' '.join(etc_and_sub_dirs)))
    ls_ipa_idoverride_memberof = simple_command("/bin/ls -lan /usr/share/ipa/ui/js/plugins/idoverride-memberof")
    ls_lib_firmware = simple_command("/bin/ls -lanR /lib/firmware")
    ls_ocp_cni_openshift_sdn = simple_command("/bin/ls -l /var/lib/cni/networks/openshift-sdn")
    ls_origin_local_volumes_pods = simple_command("/bin/ls -l /var/lib/origin/openshift.local.volumes/pods")
    ls_osroot = simple_command("/bin/ls -lan /")
    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_bin = simple_command("/bin/ls -lan /usr/bin")
    ls_usr_lib64 = simple_command("/bin/ls -lan /usr/lib64")
    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")
    ls_var_opt_mssql = simple_command("/bin/ls -ld /var/opt/mssql")
    ls_var_opt_mssql_log = simple_command("/bin/ls -la /var/opt/mssql/log")
    ls_var_spool_clientmq = simple_command("/bin/ls -ln /var/spool/clientmqueue")
    ls_var_spool_postfix_maildrop = simple_command("/bin/ls -ln /var/spool/postfix/maildrop")
    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
    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")
    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")
    lsvmbus = simple_command("/usr/sbin/lsvmbus -vv")
    lvm_conf = simple_file("/etc/lvm/lvm.conf")
    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,lv_kernel_major,lv_kernel_minor --config=\"global{locking_type=0}\"")
    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"])
    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")

    @datasource()
    def md5chk_file_list(broker):
        """ Provide a list of files to be processed by the ``md5chk_files`` spec """
        return ["/etc/pki/product/69.pem", "/etc/pki/product-default/69.pem", "/usr/lib/libsoftokn3.so", "/usr/lib64/libsoftokn3.so", "/usr/lib/libfreeblpriv3.so", "/usr/lib64/libfreeblpriv3.so"]
    md5chk_files = foreach_execute(md5chk_file_list, "/usr/bin/md5sum %s")
    mdstat = simple_file("/proc/mdstat")

    @datasource(Mdstat)
    def md_device_list(broker):
        md = broker[Mdstat]
        if md.components:
            return [dev["device_name"] for dev in md.components if dev["active"]]
        raise SkipComponent()
    mdadm_E = foreach_execute(md_device_list, "/usr/sbin/mdadm -E %s")
    meminfo = first_file(["/proc/meminfo", "/meminfo"])
    messages = simple_file("/var/log/messages")
    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")
    modprobe = glob_file(["/etc/modprobe.conf", "/etc/modprobe.d/*.conf"])
    mokutil_sbstate = simple_command("/bin/mokutil --sb-state")
    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_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"
                          ])
    named_checkconf_p = simple_command("/usr/sbin/named-checkconf -p")
    named_conf = simple_file("/etc/named.conf")
    namespace = simple_command("/bin/ls /var/run/netns")
    ndctl_list_Ni = simple_command("/usr/bin/ndctl list -Ni")
    netconsole = simple_file("/etc/sysconfig/netconsole")
    netstat = simple_command("/bin/netstat -neopa")
    netstat_agn = simple_command("/bin/netstat -agn")
    netstat_i = simple_command("/bin/netstat -i")
    netstat_s = simple_command("/bin/netstat -s")
    networkmanager_conf = simple_file("/etc/NetworkManager/NetworkManager.conf")
    networkmanager_dispatcher_d = glob_file("/etc/NetworkManager/dispatcher.d/*-dhclient")
    neutron_conf = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/neutron.conf", "/etc/neutron/neutron.conf"])
    neutron_sriov_agent = first_file([
        "/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/ml2/sriov_agent.ini",
        "/etc/neutron/plugins/ml2/sriov_agent.ini"])
    neutron_dhcp_agent_ini = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/dhcp_agent.ini", "/etc/neutron/dhcp_agent.ini"])
    neutron_l3_agent_ini = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/l3_agent.ini", "/etc/neutron/l3_agent.ini"])
    neutron_l3_agent_log = first_file(["/var/log/containers/neutron/l3-agent.log", "/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_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"])
    nfnetlink_queue = simple_file("/proc/net/netfilter/nfnetlink_queue")
    nfs_exports = simple_file("/etc/exports")
    nfs_exports_d = glob_file("/etc/exports.d/*.exports")
    nginx_conf = glob_file([
                           "/etc/nginx/*.conf", "/etc/nginx/conf.d/*", "/etc/nginx/default.d/*",
                           "/opt/rh/nginx*/root/etc/nginx/*.conf", "/opt/rh/nginx*/root/etc/nginx/conf.d/*", "/opt/rh/nginx*/root/etc/nginx/default.d/*",
                           "/etc/opt/rh/rh-nginx*/nginx/*.conf", "/etc/opt/rh/rh-nginx*/nginx/conf.d/*", "/etc/opt/rh/rh-nginx*/nginx/default.d/*"
                           ])
    nmcli_conn_show = simple_command("/usr/bin/nmcli conn show")
    nmcli_dev_show = simple_command("/usr/bin/nmcli dev show")
    nova_api_log = first_file(["/var/log/containers/nova/nova-api.log", "/var/log/nova/nova-api.log"])
    nova_compute_log = first_file(["/var/log/containers/nova/nova-compute.log", "/var/log/nova/nova-compute.log"])
    nova_conf = first_file([
                           "/var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf",
                           "/var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf",
                           "/etc/nova/nova.conf"
                           ])
    nova_crontab = simple_command("/usr/bin/crontab -l -u nova")
    nova_uid = simple_command("/usr/bin/id -u nova")
    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'")
    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_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")
    odbc_ini = simple_file("/etc/odbc.ini")
    odbcinst_ini = simple_file("/etc/odbcinst.ini")
    open_vm_tools_stat_raw_text_session = simple_command("/usr/bin/vmware-toolbox-cmd stat raw text session")
    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")
    os_release = simple_file("etc/os-release")
    ose_master_config = simple_file("/etc/origin/master/master-config.yaml")
    ose_node_config = simple_file("/etc/origin/node/node-config.yaml")
    ovirt_engine_server_log = simple_file("/var/log/ovirt-engine/server.log")
    ovirt_engine_ui_log = simple_file("/var/log/ovirt-engine/ui.log")
    ovs_vsctl_list_bridge = simple_command("/usr/bin/ovs-vsctl list bridge")
    ovs_vsctl_show = simple_command("/usr/bin/ovs-vsctl show")

    @datasource(Ps, context=HostContext)
    def cmd_and_pkg(broker):
        """
        Returns:
            list: List of the command and provider package string of the specified commands.

        Attributes:
            COMMANDS (list): List of the specified commands that need to check the provider package.
        """
        COMMANDS = ['java']
        pkg_cmd = list()
        for cmd in _get_running_commands(broker, COMMANDS):
            pkg_cmd.append("{0} {1}".format(cmd, _get_package(broker, cmd)))
        if pkg_cmd:
            return '\n'.join(pkg_cmd)
        raise SkipComponent

    package_provides_command = command_with_args("/usr/bin/echo '%s'", cmd_and_pkg)
    package_provides_java = foreach_execute(cmd_and_pkg, "/usr/bin/echo '%s'")
    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])
    passenger_status = simple_command("/usr/bin/passenger-status")
    password_auth = simple_file("/etc/pam.d/password-auth")
    pcs_quorum_status = simple_command("/usr/sbin/pcs quorum status")
    pcs_status = simple_command("/usr/sbin/pcs status")
    php_ini = first_file(["/etc/opt/rh/php73/php.ini", "/etc/opt/rh/php72/php.ini", "/etc/php.ini"])
    pluginconf_d = glob_file("/etc/yum/pluginconf.d/*.conf")
    postconf_builtin = simple_command("/usr/sbin/postconf -C builtin")
    postconf = simple_command("/usr/sbin/postconf")
    postgresql_conf = first_file([
                                 "/var/lib/pgsql/data/postgresql.conf",
                                 "/opt/rh/postgresql92/root/var/lib/pgsql/data/postgresql.conf",
                                 "database/postgresql.conf"
                                 ])
    postgresql_log = first_of([
                              glob_file("/var/lib/pgsql/data/pg_log/postgresql-*.log"),
                              glob_file("/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_log/postgresql-*.log"),
                              glob_file("/database/postgresql-*.log")
                              ])
    puppetserver_config = simple_file("/etc/sysconfig/puppetserver")
    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")
    puppet_ca_cert_expire_date = simple_command("/usr/bin/openssl x509 -in /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem -enddate -noout")
    pvs_noheadings = simple_command("/sbin/pvs --nameprefixes --noheadings --separator='|' -a -o pv_all,vg_name --config=\"global{locking_type=0}\"")
    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")
    qpidd_conf = simple_file("/etc/qpid/qpidd.conf")
    rabbitmq_env = simple_file("/etc/rabbitmq/rabbitmq-env.conf")
    rabbitmq_report = simple_command("/usr/sbin/rabbitmqctl report")
    rabbitmq_startup_log = simple_file("/var/log/rabbitmq/startup_log")
    rabbitmq_users = simple_command("/usr/sbin/rabbitmqctl list_users")
    rc_local = simple_file("/etc/rc.d/rc.local")
    rdma_conf = simple_file("/etc/rdma/rdma.conf")
    readlink_e_etc_mtab = simple_command("/usr/bin/readlink -e /etc/mtab")
    readlink_e_shift_cert_client = simple_command("/usr/bin/readlink -e /etc/origin/node/certificates/kubelet-client-current.pem")
    readlink_e_shift_cert_server = simple_command("/usr/bin/readlink -e /etc/origin/node/certificates/kubelet-server-current.pem")
    redhat_release = simple_file("/etc/redhat-release")
    resolv_conf = simple_file("/etc/resolv.conf")
    rhn_conf = first_file(["/etc/rhn/rhn.conf", "/conf/rhn/rhn/rhn.conf"])
    rhn_entitlement_cert_xml = first_of([glob_file("/etc/sysconfig/rhn/rhn-entitlement-cert.xml*"),
                                   glob_file("/conf/rhn/sysconfig/rhn/rhn-entitlement-cert.xml*")])
    rhn_schema_version = simple_command("/usr/bin/rhn-schema-version")
    rhn_taskomatic_daemon_log = first_file(["/var/log/rhn/rhn_taskomatic_daemon.log",
                                               "rhn-logs/rhn/rhn_taskomatic_daemon.log"])
    rhsm_conf = simple_file("/etc/rhsm/rhsm.conf")
    rhsm_log = simple_file("/var/log/rhsm/rhsm.log")
    rhsm_releasever = simple_file('/var/lib/rhsm/cache/releasever.json')
    rndc_status = simple_command("/usr/sbin/rndc status")
    rpm_V_packages = simple_command("/bin/rpm -V coreutils procps procps-ng shadow-utils passwd sudo chrony", keep_rc=True)
    rsyslog_conf = glob_file(["/etc/rsyslog.conf", "/etc/rsyslog.d/*.conf"])
    samba = simple_file("/etc/samba/smb.conf")

    @datasource(Sap)
    def sap_sid(broker):
        sap = broker[Sap]
        return [sap.sid(i).lower() for i in sap.local_instances]

    sap_hdb_version = foreach_execute(sap_sid, "/usr/bin/sudo -iu %sadm HDB version", keep_rc=True)
    saphostctl_getcimobject_sapinstance = simple_command("/usr/sap/hostctrl/exe/saphostctrl -function GetCIMObject -enuminstances SAPInstance")
    saphostexec_status = simple_command("/usr/sap/hostctrl/exe/saphostexec -status")
    saphostexec_version = simple_command("/usr/sap/hostctrl/exe/saphostexec -version")
    sat5_insights_properties = simple_file("/etc/redhat-access/redhat-access-insights.properties")

    @datasource(SatelliteVersion)
    def is_satellite_server(broker):
        """
        bool: Returns True if the host is satellite server.
        """
        if broker[SatelliteVersion]:
            return True
        raise SkipComponent

    satellite_content_hosts_count = simple_command(
        "/usr/bin/sudo -iu postgres /usr/bin/psql -d foreman -c 'select count(*) from hosts'",
        deps=[is_satellite_server]
    )
    satellite_mongodb_storage_engine = simple_command("/usr/bin/mongo pulp_database --eval 'db.serverStatus().storageEngine'")
    satellite_version_rb = simple_file("/usr/share/foreman/lib/satellite/version.rb")
    satellite_custom_hiera = simple_file("/etc/foreman-installer/custom-hiera.yaml")
    scsi = simple_file("/proc/scsi/scsi")
    scsi_eh_deadline = glob_file('/sys/class/scsi_host/host[0-9]*/eh_deadline')
    scsi_fwver = glob_file('/sys/class/scsi_host/host[0-9]*/fwrev')
    scsi_mod_use_blk_mq = simple_file("/sys/module/scsi_mod/parameters/use_blk_mq")
    sctp_asc = simple_file('/proc/net/sctp/assocs')
    sctp_eps = simple_file('/proc/net/sctp/eps')
    sctp_snmp = simple_file('/proc/net/sctp/snmp')
    sealert = simple_command('/usr/bin/sealert -l "*"')
    selinux_config = simple_file("/etc/selinux/config")
    sestatus = simple_command("/usr/sbin/sestatus -b")
    setup_named_chroot = simple_file("/usr/libexec/setup-named-chroot.sh")
    smbstatus_p = simple_command("/usr/bin/smbstatus -p")
    smartpdc_settings = simple_file("/etc/smart_proxy_dynflow_core/settings.yml")
    sockstat = simple_file("/proc/net/sockstat")
    softnet_stat = simple_file("proc/net/softnet_stat")
    software_collections_list = simple_command('/usr/bin/scl --list')
    spamassassin_channels = simple_command("/bin/grep -r '^\\s*CHANNELURL=' /etc/mail/spamassassin/channel.d")

    @datasource(LsMod)
    def is_mod_loaded_for_ss(broker):
        """
        bool: Returns True if the kernel modules required by ``ss -tupna``
        command are loaded.
        """
        lsmod = broker[LsMod]
        req_mods = ['inet_diag', 'tcp_diag', 'udp_diag']
        if all(mod in lsmod for mod in req_mods):
            return True
        raise SkipComponent

    ss = simple_command("/usr/sbin/ss -tupna", deps=[is_mod_loaded_for_ss])
    ssh_config = simple_file("/etc/ssh/ssh_config")
    ssh_config_d = glob_file(r"/etc/ssh/ssh_config.d/*.conf")
    ssh_foreman_proxy_config = simple_file("/usr/share/foreman-proxy/.ssh/ssh_config")
    sshd_config = simple_file("/etc/ssh/sshd_config")
    sshd_config_perms = simple_command("/bin/ls -l /etc/ssh/sshd_config")
    sssd_config = simple_file("/etc/sssd/sssd.conf")
    subscription_manager_id = simple_command("/usr/sbin/subscription-manager identity")  # use "/usr/sbin" here, BZ#1690529
    subscription_manager_installed_product_ids = simple_command("/usr/bin/find /etc/pki/product-default/ /etc/pki/product/ -name '*pem' -exec rct cat-cert --no-content '{}' \;")
    swift_object_expirer_conf = first_file(["/var/lib/config-data/puppet-generated/swift/etc/swift/object-expirer.conf", "/etc/swift/object-expirer.conf"])
    swift_proxy_server_conf = first_file(["/var/lib/config-data/puppet-generated/swift/etc/swift/proxy-server.conf", "/etc/swift/proxy-server.conf"])
    sysconfig_kdump = simple_file("etc/sysconfig/kdump")
    sysconfig_libvirt_guests = simple_file("etc/sysconfig/libvirt-guests")
    sysconfig_network = simple_file("etc/sysconfig/network")
    sysconfig_ntpd = simple_file("/etc/sysconfig/ntpd")
    sysconfig_prelink = simple_file("/etc/sysconfig/prelink")
    sysconfig_sshd = simple_file("/etc/sysconfig/sshd")
    sysconfig_virt_who = simple_file("/etc/sysconfig/virt-who")
    sysctl = simple_command("/sbin/sysctl -a")
    sysctl_conf = simple_file("/etc/sysctl.conf")
    systemctl_cat_rpcbind_socket = simple_command("/bin/systemctl cat rpcbind.socket")
    systemctl_cinder_volume = simple_command("/bin/systemctl show openstack-cinder-volume")
    systemctl_httpd = simple_command("/bin/systemctl show httpd")
    systemctl_nginx = simple_command("/bin/systemctl show nginx")
    systemctl_list_unit_files = simple_command("/bin/systemctl list-unit-files")
    systemctl_list_units = simple_command("/bin/systemctl list-units")
    systemctl_mariadb = simple_command("/bin/systemctl show mariadb")
    systemctl_qpidd = simple_command("/bin/systemctl show qpidd")
    systemctl_qdrouterd = simple_command("/bin/systemctl show qdrouterd")
    systemctl_show_all_services = simple_command("/bin/systemctl show *.service")
    systemctl_show_target = simple_command("/bin/systemctl show *.target")
    systemctl_smartpdc = simple_command("/bin/systemctl show smart_proxy_dynflow_core")
    systemd_analyze_blame = simple_command("/bin/systemd-analyze blame")
    systemd_docker = simple_command("/usr/bin/systemctl cat docker.service")
    systemd_logind_conf = simple_file("/etc/systemd/logind.conf")
    systemd_openshift_node = simple_command("/usr/bin/systemctl cat atomic-openshift-node.service")
    systemd_system_conf = simple_file("/etc/systemd/system.conf")
    systemid = first_of([
        simple_file("/etc/sysconfig/rhn/systemid"),
        simple_file("/conf/rhn/sysconfig/rhn/systemid")
    ])
    systool_b_scsi_v = simple_command("/bin/systool -b scsi -v")
    testparm_s = simple_command("/usr/bin/testparm -s")
    testparm_v_s = simple_command("/usr/bin/testparm -v -s")
    tags = simple_file("/tags.json", kind=RawFileProvider)
    thp_use_zero_page = simple_file("/sys/kernel/mm/transparent_hugepage/use_zero_page")
    thp_enabled = simple_file("/sys/kernel/mm/transparent_hugepage/enabled")
    tmpfilesd = glob_file(["/etc/tmpfiles.d/*.conf", "/usr/lib/tmpfiles.d/*.conf", "/run/tmpfiles.d/*.conf"])
    tomcat_vdc_fallback = simple_command("/usr/bin/find /usr/share -maxdepth 1 -name 'tomcat*' -exec /bin/grep -R -s 'VirtualDirContext' --include '*.xml' '{}' +")
    tuned_adm = simple_command("/usr/sbin/tuned-adm list")
    udev_fc_wwpn_id_rules = simple_file("/usr/lib/udev/rules.d/59-fc-wwpn-id.rules")
    uname = simple_command("/usr/bin/uname -a")
    up2date = simple_file("/etc/sysconfig/rhn/up2date")
    up2date_log = simple_file("/var/log/up2date")
    uptime = simple_command("/usr/bin/uptime")
    usr_journald_conf_d = glob_file(r"usr/lib/systemd/journald.conf.d/*.conf")  # note that etc_journald.conf.d also exists
    vdo_status = simple_command("/usr/bin/vdo status")
    vgdisplay = simple_command("/sbin/vgdisplay")
    vhost_net_zero_copy_tx = simple_file("/sys/module/vhost_net/parameters/experimental_zcopytx")
    vdsm_log = simple_file("var/log/vdsm/vdsm.log")
    vdsm_logger_conf = simple_file("etc/vdsm/logger.conf")
    vma_ra_enabled = simple_file("/sys/kernel/mm/swap/vma_ra_enabled")
    vgs_noheadings = simple_command("/sbin/vgs --nameprefixes --noheadings --separator='|' -a -o vg_all --config=\"global{locking_type=0}\"")
    virsh_list_all = simple_command("/usr/bin/virsh --readonly list --all")
    virt_what = simple_command("/usr/sbin/virt-what")
    virt_who_conf = glob_file([r"etc/virt-who.conf", r"etc/virt-who.d/*.conf"])
    virtlogd_conf = simple_file("/etc/libvirt/virtlogd.conf")
    vsftpd = simple_file("/etc/pam.d/vsftpd")
    vsftpd_conf = simple_file("/etc/vsftpd/vsftpd.conf")
    x86_pti_enabled = simple_file("sys/kernel/debug/x86/pti_enabled")
    x86_ibpb_enabled = simple_file("sys/kernel/debug/x86/ibpb_enabled")
    x86_ibrs_enabled = simple_file("sys/kernel/debug/x86/ibrs_enabled")
    x86_retp_enabled = simple_file("sys/kernel/debug/x86/retp_enabled")
    xinetd_conf = glob_file(["/etc/xinetd.conf", "/etc/xinetd.d/*"])
    yum_conf = simple_file("/etc/yum.conf")
    yum_list_available = simple_command("yum -C --noplugins list available")
    yum_log = simple_file("/var/log/yum.log")
    yum_repolist = simple_command("/usr/bin/yum -C --noplugins repolist")
    yum_repos_d = glob_file("/etc/yum.repos.d/*.repo")
    yum_updateinfo = simple_command("/usr/bin/yum -C updateinfo list")
    zipl_conf = simple_file("/etc/zipl.conf")
    rpm_format = format_rpm()
    installed_rpms = simple_command("/bin/rpm -qa --qf '%s'" % rpm_format, context=HostContext)
Exemple #2
0
class SosSpecs(Specs):
    auditctl_status = simple_file("sos_commands/auditd/auditctl_-s")
    autofs_conf = simple_file("/etc/autofs.conf")

    blkid = first_file([
        "sos_commands/block/blkid_-c_.dev.null",
        "sos_commands/filesys/blkid_-c_.dev.null"
    ])
    candlepin_log = first_of([
        simple_file("/var/log/candlepin/candlepin.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/candlepin/candlepin.log"
        )
    ])
    candlepin_error_log = first_of([
        simple_file("var/log/candlepin/error.log"),
        simple_file(
            r"sos_commands/foreman/foreman-debug/var/log/candlepin/error.log")
    ])
    catalina_out = glob_file("var/log/tomcat*/catalina.out")
    catalina_server_log = glob_file("var/log/tomcat*/catalina*.log")
    ceilometer_central_log = simple_file("/var/log/ceilometer/central.log")
    ceph_osd_tree_text = simple_file("sos_commands/ceph/ceph_osd_tree")
    ceph_report = simple_file("sos_commands/ceph/ceph_report")
    ceph_health_detail = simple_file(
        "sos_commands/ceph/ceph_health_detail_--format_json-pretty")
    checkin_conf = simple_file("/etc/splice/checkin.conf")
    chkconfig = first_file([
        "sos_commands/startup/chkconfig_--list",
        "sos_commands/services/chkconfig_--list"
    ])
    cib_xml = first_of([
        simple_file("/var/lib/pacemaker/cib/cib.xml"),
        head(glob_file("sos_commands/pacemaker/crm_report/*/cib.xml"))
    ])
    cni_podman_bridge_conf = simple_file(
        "/etc/cni/net.d/87-podman-bridge.conflist")
    corosync_cmapctl = glob_file("sos_commands/corosync/corosync-cmapctl*")
    cpe = simple_file("/etc/system-release-cpe")
    cpu_smt_control = simple_file("sys/devices/system/cpu/smt/control")
    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_max_freq = simple_file(
        "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq")
    cpupower_frequency_info = simple_file(
        "sos_commands/processor/cpupower_frequency-info")
    date = first_of([
        simple_file("sos_commands/general/date"),
        simple_file("sos_commands/date/date")
    ])
    df__al = first_file([
        "sos_commands/filesys/df_-al", "sos_commands/filesys/df_-al_-x_autofs"
    ])
    dirsrv = simple_file("/etc/sysconfig/dirsrv")
    dirsrv_access = glob_file("var/log/dirsrv/*/access*")
    display_java = simple_file("sos_commands/java/alternatives_--display_java")
    dnf_modules = glob_file("/etc/dnf/modules.d/*.module")
    docker_host_machine_id = simple_file(
        "/etc/redhat-access-insights/machine-id")
    docker_image_inspect = glob_file("sos_commands/docker/docker_inspect_*")
    docker_info = simple_file("sos_commands/docker/docker_info")
    docker_list_containers = first_file(
        ["sos_commands/docker/docker_ps_-a", "sos_commands/docker/docker_ps"])
    docker_list_images = simple_file("sos_commands/docker/docker_images")
    docker_network = simple_file("/etc/sysconfig/docker-network")
    docker_storage = simple_file("/etc/sysconfig/docker-storage")
    dm_mod_use_blk_mq = simple_file("/sys/module/dm_mod/parameters/use_blk_mq")
    dmesg = first_file([
        "sos_commands/kernel/dmesg", "sos_commands/general/dmesg",
        "var/log/dmesg"
    ])
    dmidecode = simple_file("sos_commands/hardware/dmidecode")
    dmsetup_info = simple_file("sos_commands/devicemapper/dmsetup_info_-c")
    dnsmasq_config = glob_file(["/etc/dnsmasq.conf", "/etc/dnsmasq.d/*.conf"])
    dumpe2fs_h = glob_file("sos_commands/filesys/dumpe2fs_-h_*")
    ethtool = glob_file("sos_commands/networking/ethtool_*",
                        ignore="ethtool_-.*")
    ethtool_S = glob_file("sos_commands/networking/ethtool_-S_*")
    ethtool_T = glob_file("sos_commands/networking/ethtool_-T_*")
    ethtool_a = glob_file("sos_commands/networking/ethtool_-a_*")
    ethtool_c = glob_file("sos_commands/networking/ethtool_-c_*")
    ethtool_g = glob_file("sos_commands/networking/ethtool_-g_*")
    ethtool_i = glob_file("sos_commands/networking/ethtool_-i_*")
    ethtool_k = glob_file("sos_commands/networking/ethtool_-k_*")
    exim_conf = simple_file("etc/exim.conf")
    fdisk_l_sos = first_of([
        glob_file(r"sos_commands/filesys/fdisk_-l_*"),
        glob_file(r"sos_commands/block/fdisk_-l_*")
    ])
    foreman_production_log = first_of([
        simple_file("/var/log/foreman/production.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman/production.log"
        )
    ])
    foreman_proxy_conf = first_of([
        simple_file("/etc/foreman-proxy/settings.yml"),
        simple_file(
            "sos_commands/foreman/foreman-debug/etc/foreman-proxy/settings.yml"
        )
    ])
    foreman_proxy_log = first_of([
        simple_file("/var/log/foreman-proxy/proxy.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman-proxy/proxy.log"
        )
    ])
    foreman_satellite_log = first_of([
        simple_file("/var/log/foreman-installer/satellite.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman-installer/satellite.log"
        )
    ])
    foreman_ssl_access_ssl_log = first_file([
        "var/log/httpd/foreman-ssl_access_ssl.log",
        r"sos_commands/foreman/foreman-debug/var/log/httpd/foreman-ssl_access_ssl.log"
    ])
    foreman_tasks_config = first_file(
        ["/etc/sysconfig/foreman-tasks", "/etc/sysconfig/dynflowd"])
    freeipa_healthcheck_log = simple_file(
        "/var/log/ipa/healthcheck/healthcheck.log")
    hammer_ping = first_file([
        "sos_commands/foreman/hammer_ping",
        "sos_commands/foreman/foreman-debug/hammer-ping"
    ])
    getcert_list = first_file(
        ["sos_commands/ipa/ipa-getcert_list", "sos_commands/ipa/getcert_list"])
    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_file("sos_commands/gluster/gluster_volume_info")
    gluster_v_status = simple_file(
        "sos_commands/gluster/gluster_volume_status")
    gluster_peer_status = simple_file(
        "sos_commands/gluster/gluster_peer_status")
    heat_engine_log = first_file([
        "/var/log/containers/heat/heat-engine.log",
        "/var/log/heat/heat-engine.log"
    ])
    hostname = first_file(
        ["sos_commands/general/hostname_-f", "sos_commands/host/hostname_-f"])
    hostname_default = first_file([
        "sos_commands/general/hostname", "sos_commands/host/hostname",
        "/etc/hostname", "hostname"
    ])
    hostname_short = first_file([
        "sos_commands/general/hostname", "sos_commands/host/hostname",
        "/etc/hostname", "hostname"
    ])
    httpd_access_log = simple_file("/var/log/httpd/access_log")
    httpd_M = simple_file("sos_commands/apache/apachectl_-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")
    initscript = glob_file(r"etc/rc.d/init.d/*")
    installed_rpms = first_file(
        ["sos_commands/rpm/package-data", "installed-rpms"])
    ip_addr = first_of([
        simple_file("sos_commands/networking/ip_-d_address"),
        simple_file("sos_commands/networking/ip_address")
    ])
    ip_neigh_show = first_file([
        "sos_commands/networking/ip_-s_-s_neigh_show",
        "sos_commands/networking/ip_neigh_show"
    ])
    ip_route_show_table_all = simple_file(
        "sos_commands/networking/ip_route_show_table_all")
    ip_s_link = first_of([
        simple_file("sos_commands/networking/ip_-s_-d_link"),
        simple_file("sos_commands/networking/ip_-s_link"),
        simple_file("sos_commands/networking/ip_link")
    ])
    ip6tables_permanent = simple_file("etc/sysconfig/ip6tables")
    iptables = first_file(
        ["/etc/sysconfig/iptables", "/etc/sysconfig/iptables.save"])
    journal_since_boot = first_of([
        simple_file("sos_commands/logs/journalctl_--no-pager_--boot"),
        simple_file(
            "sos_commands/logs/journalctl_--no-pager_--catalog_--boot"),
        simple_file(
            "sos_commands/logs/journalctl_--all_--this-boot_--no-pager")
    ])
    ironic_conf = first_file([
        "/var/lib/config-data/puppet-generated/ironic/etc/ironic/ironic.conf",
        "/etc/ironic/ironic.conf"
    ])
    journal_since_boot = first_of([
        simple_file("sos_commands/logs/journalctl_--no-pager_--boot"),
        simple_file("sos_commands/logs/journalctl_--no-pager_--catalog_--boot")
    ])
    kerberos_kdc_log = simple_file("var/log/krb5kdc.log")
    keystone_log = first_file([
        "/var/log/containers/keystone/keystone.log",
        "/var/log/keystone/keystone.log"
    ])
    kexec_crash_loaded = simple_file("/sys/kernel/kexec_crash_loaded")
    keystone_conf = first_file([
        "/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf",
        "/etc/keystone/keystone.conf"
    ])
    libvirtd_qemu_log = glob_file(r"/var/log/libvirt/qemu/*.log")
    locale = simple_file("sos_commands/i18n/locale")
    lsblk = first_file(
        ["sos_commands/block/lsblk", "sos_commands/filesys/lsblk"])
    ls_boot = simple_file("sos_commands/boot/ls_-lanR_.boot")
    lscpu = simple_file("sos_commands/processor/lscpu")
    lsinitrd = simple_file("sos_commands/boot/lsinitrd")
    lsof = simple_file("sos_commands/process/lsof_-b_M_-n_-l")
    lsmod = simple_file("sos_commands/kernel/lsmod")
    lspci = first_of([
        simple_file("sos_commands/pci/lspci_-nnvv"),
        simple_file("sos_commands/pci/lspci_-nvv"),
        simple_file("sos_commands/pci/lspci")
    ])
    lsscsi = simple_file("sos_commands/scsi/lsscsi")
    ls_dev = first_file([
        "sos_commands/block/ls_-lanR_.dev",
        "sos_commands/devicemapper/ls_-lanR_.dev"
    ])
    lvs = first_file([
        "sos_commands/lvm2/lvs_-a_-o_lv_tags_devices_--config_global_locking_type_0",
        "sos_commands/lvm2/lvs_-a_-o_devices"
    ])
    manila_conf = first_file([
        "/var/lib/config-data/puppet-generated/manila/etc/manila/manila.conf",
        "/etc/manila/manila.conf"
    ])
    mistral_executor_log = simple_file("/var/log/mistral/executor.log")
    modinfo_all = glob_file("sos_commands/kernel/modinfo_*")
    mount = simple_file("sos_commands/filesys/mount_-l")
    mounts = simple_file("/proc/mounts")
    mlx4_port = glob_file("/sys/bus/pci/devices/*/mlx4_port[0-9]")
    multipath__v4__ll = first_file([
        "sos_commands/multipath/multipath_-v4_-ll",
        "sos_commands/devicemapper/multipath_-v4_-ll"
    ])
    netstat = first_file([
        "sos_commands/networking/netstat_-neopa",
        "sos_commands/networking/netstat_-W_-neopa",
        "sos_commands/networking/netstat_-T_-neopa"
    ])
    netstat_agn = first_of([
        simple_file("sos_commands/networking/netstat_-agn"),
        simple_file("sos_commands/networking/netstat_-W_-agn"),
        simple_file("sos_commands/networking/netstat_-T_-agn")
    ])
    netstat_s = simple_file("sos_commands/networking/netstat_-s")
    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_server_log = first_file([
        "/var/log/containers/neutron/server.log", "/var/log/neutron/server.log"
    ])
    nmcli_dev_show = simple_file("sos_commands/networking/nmcli_device_show")
    nmcli_dev_show_sos = glob_file([
        "sos_commands/networking/nmcli_dev_show_*",
        "sos_commands/networkmanager/nmcli_dev_show_*"
    ])
    ntptime = simple_file("sos_commands/ntp/ntptime")
    octavia_conf = simple_file(
        "/var/lib/config-data/puppet-generated/octavia/etc/octavia/octavia.conf"
    )
    openvswitch_daemon_log = simple_file(
        '/var/log/openvswitch/ovs-vswitchd.log')
    openvswitch_other_config = simple_file(
        "sos_commands/openvswitch/ovs-vsctl_-t_5_get_Open_vSwitch_._other_config"
    )
    openvswitch_server_log = simple_file(
        '/var/log/openvswitch/ovsdb-server.log')
    osa_dispatcher_log = first_file([
        "/var/log/rhn/osa-dispatcher.log", "/rhn-logs/rhn/osa-dispatcher.log"
    ])
    ovirt_engine_boot_log = simple_file("/var/log/ovirt-engine/boot.log")
    ovirt_engine_confd = glob_file("/etc/ovirt-engine/engine.conf.d/*")
    ovirt_engine_console_log = simple_file("/var/log/ovirt-engine/console.log")
    ovs_vsctl_show = simple_file(
        "sos_commands/openvswitch/ovs-vsctl_-t_5_show")
    pam_conf = simple_file("/etc/pam.conf")
    partitions = simple_file("/proc/partitions")
    pcs_config = simple_file("sos_commands/pacemaker/pcs_config")
    pcs_quorum_status = simple_file("sos_commands/pacemaker/pcs_quorum_status")
    pcs_status = first_file([
        "sos_commands/pacemaker/pcs_status",
        "/sos_commands/pacemaker/pcs_status_--full"
    ])
    podman_image_inspect = glob_file("sos_commands/podman/podman_inspect_*")
    podman_list_containers = first_file(
        ["sos_commands/podman/podman_ps_-a", "sos_commands/podman/podman_ps"])
    podman_list_images = simple_file("sos_commands/podman/podman_images")
    ps_alxwww = simple_file("sos_commands/process/ps_alxwww")
    ps_aux = first_file([
        "sos_commands/process/ps_aux", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_auxcww"
    ])
    ps_auxcww = first_file([
        "sos_commands/process/ps_auxcww", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_aux"
    ])
    ps_auxww = first_file([
        "sos_commands/process/ps_auxww", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_aux", "sos_commands/process/ps_auxcww"
    ])
    puppet_ssl_cert_ca_pem = first_file([
        "/etc/puppetlabs/puppet/ssl/certs/ca.pem",
        "sos_commands/foreman/foreman-debug/var/lib/puppet/ssl/certs/ca.pem"
    ])
    pvs = first_file([
        "sos_commands/lvm2/pvs_-a_-v_-o_pv_mda_free_pv_mda_size_pv_mda_count_pv_mda_used_count_pe_start_--config_global_locking_type_0",
        "sos_commands/lvm2/pvs_-a_-v", "sos_commands/devicemapper/pvs_-a_-v"
    ])
    qpid_stat_q = first_file([
        "sos_commands/pulp/qpid-stat_-q_--ssl-certificate_.etc.pki.pulp.qpid.client.crt_-b_amqps_..localhost_5671",
        "sos_commands/pulp/qpid-stat_-q_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671",
        "sos_commands/katello/qpid-stat_-q_--ssl-certificate_.etc.pki.pulp.qpid.client.crt_-b_amqps_..localhost_5671",
        "sos_commands/katello/qpid-stat_-q_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671",
        "sos_commands/foreman/foreman-debug/qpid-stat-q", "qpid-stat-q",
        "sos_commands/foreman/foreman-debug/qpid_stat_queues",
        "qpid_stat_queues"
    ])
    qpid_stat_u = first_file([
        "sos_commands/pulp/qpid-stat_-u_--ssl-certificate_.etc.pki.pulp.qpid.client.crt_-b_amqps_..localhost_5671",
        "sos_commands/pulp/qpid-stat_-u_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671",
        "sos_commands/katello/qpid-stat_-u_--ssl-certificate_.etc.pki.pulp.qpid.client.crt_-b_amqps_..localhost_5671",
        "sos_commands/katello/qpid-stat_-u_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671",
        "sos_commands/foreman/foreman-debug/qpid-stat-u", "qpid-stat-u",
        "sos_commands/foreman/foreman-debug/qpid_stat_subscriptions",
        "qpid_stat_subscriptions"
    ])
    rabbitmq_logs = glob_file("/var/log/rabbitmq/rabbit@*.log",
                              ignore=".*rabbit@.*(?<!-sasl).log$")
    rabbitmq_report = simple_file("sos_commands/rabbitmq/rabbitmqctl_report")
    rabbitmq_report_of_containers = glob_file(
        "sos_commands/rabbitmq/docker_exec_-t_rabbitmq-bundle-docker-*_rabbitmqctl_report"
    )
    rabbitmq_startup_err = simple_file("/var/log/rabbitmq/startup_err")
    rhn_charsets = first_file([
        "sos_commands/satellite/rhn-charsets", "sos_commands/rhn/rhn-charsets"
    ])
    rhn_hibernate_conf = first_file([
        "/usr/share/rhn/config-defaults/rhn_hibernate.conf",
        "/config-defaults/rhn_hibernate.conf"
    ])
    rhn_search_daemon_log = first_file([
        "/var/log/rhn/search/rhn_search_daemon.log",
        "/rhn-logs/rhn/search/rhn_search_daemon.log"
    ])
    rhn_server_satellite_log = simple_file(
        "var/log/rhn/rhn_server_satellite.log")
    rhn_server_xmlrpc_log = first_file([
        "/var/log/rhn/rhn_server_xmlrpc.log",
        "/rhn-logs/rhn/rhn_server_xmlrpc.log"
    ])
    rhosp_release = simple_file("/etc/rhosp-release")
    root_crontab = first_file([
        "sos_commands/crontab/root_crontab", "sos_commands/cron/root_crontab"
    ])
    route = simple_file("sos_commands/networking/route_-n")
    sap_host_profile = simple_file("/usr/sap/hostctrl/exe/host_profile")
    sched_rt_runtime_us = simple_file("/proc/sys/kernel/sched_rt_runtime_us")
    scheduler = glob_file("/sys/block/*/queue/scheduler")
    scsi_mod_use_blk_mq = simple_file(
        "/sys/module/scsi_mod/parameters/use_blk_mq")
    secure = simple_file("/var/log/secure")
    sestatus = simple_file("sos_commands/selinux/sestatus_-b")
    sssd_logs = glob_file("var/log/sssd/*.log")
    samba_logs = glob_file("var/log/samba/log.*")
    ssh_foreman_config = simple_file("/usr/share/foreman/.ssh/ssh_config")
    subscription_manager_id = simple_file(
        "/sos_commands/subscription_manager/subscription-manager_identity")
    subscription_manager_list_consumed = first_file([
        'sos_commands/yum/subscription-manager_list_--consumed',
        'sos_commands/subscription_manager/subscription-manager_list_--consumed',
        'sos_commands/general/subscription-manager_list_--consumed'
    ])
    subscription_manager_list_installed = first_file([
        'sos_commands/yum/subscription-manager_list_--installed',
        'sos_commands/subscription_manager/subscription-manager_list_--installed',
        'sos_commands/general/subscription-manager_list_--installed'
    ])
    swift_conf = first_file([
        "/var/lib/config-data/puppet-generated/swift/etc/swift/swift.conf",
        "/etc/swift/swift.conf"
    ])
    swift_log = first_file(
        ["/var/log/containers/swift/swift.log", "/var/log/swift/swift.log"])
    sys_kernel_sched_features = simple_file("/sys/kernel/debug/sched_features")
    sysconfig_chronyd = simple_file("/etc/sysconfig/chronyd")
    sysconfig_httpd = simple_file("/etc/sysconfig/httpd")
    sysconfig_irqbalance = simple_file("etc/sysconfig/irqbalance")
    sysconfig_memcached = first_file([
        "/var/lib/config-data/puppet-generated/memcached/etc/sysconfig/memcached",
        "/etc/sysconfig/memcached"
    ])
    sysconfig_mongod = glob_file(
        ["etc/sysconfig/mongod", "etc/opt/rh/rh-mongodb26/sysconfig/mongod"])
    sysctl = simple_file("sos_commands/kernel/sysctl_-a")
    systemctl_list_unit_files = simple_file(
        "sos_commands/systemd/systemctl_list-unit-files")
    systemctl_list_units = first_file([
        "sos_commands/systemd/systemctl_list-units",
        "sos_commands/systemd/systemctl_list-units_--all"
    ])
    systemctl_show_all_services = simple_file(
        "sos_commands/systemd/systemctl_show_service_--all")
    systemd_system_origin_accounting = simple_file(
        "/etc/systemd/system.conf.d/origin-accounting.conf")
    teamdctl_config_dump = glob_file(
        "sos_commands/teamd/teamdctl_*_config_dump")
    teamdctl_state_dump = glob_file("sos_commands/teamd/teamdctl_*_state_dump")
    tomcat_web_xml = first_of([
        glob_file("/etc/tomcat*/web.xml"),
        glob_file("/conf/tomcat/tomcat*/web.xml")
    ])
    tuned_conf = simple_file("/etc/tuned.conf")
    udev_persistent_net_rules = simple_file(
        "/etc/udev/rules.d/70-persistent-net.rules")
    uname = simple_file("sos_commands/kernel/uname_-a")
    uptime = first_of([
        simple_file("sos_commands/general/uptime"),
        simple_file("sos_commands/host/uptime")
    ])
    var_qemu_xml = glob_file(r"var/run/libvirt/qemu/*.xml")
    vdsm_conf = simple_file("etc/vdsm/vdsm.conf")
    vdsm_id = simple_file("etc/vdsm/vdsm.id")
    vdsm_import_log = glob_file("var/log/vdsm/import/import-*.log")
    vgdisplay = first_file([
        "sos_commands/lvm2/vgdisplay_-vv_--config_global_locking_type_0",
        "sos_commands/lvm2/vgdisplay_-vv"
    ])
    vgs = first_file([
        "sos_commands/lvm2/vgs_-v_-o_vg_mda_count_vg_mda_free_vg_mda_size_vg_mda_used_count_vg_tags_--config_global_locking_type_0",
        "sos_commands/lvm2/vgs_-v", "sos_commands/devicemapper/vgs_-v"
    ])
    vmcore_dmesg = glob_file("/var/crash/*/vmcore-dmesg.txt")
    vmware_tools_conf = simple_file("etc/vmware-tools/tools.conf")
    xfs_info = glob_file("sos_commands/xfs/xfs_info*")
    yum_log = simple_file("/var/log/yum.log")
    yum_repolist = simple_file("sos_commands/yum/yum_-C_repolist")
    sendq_socket_buffer = simple_file("proc/sys/net/ipv4/tcp_wmem")
    recvq_socket_buffer = simple_file("proc/sys/net/ipv4/tcp_rmem")
Exemple #3
0
class InsightsArchiveSpecs(Specs):

    all_installed_rpms = glob_file("insights_commands/rpm_-qa*")
    auditctl_status = simple_file("insights_commands/auditctl_-s")
    aws_instance_id_doc = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_aws_instance_id_doc"
    )
    aws_instance_id_pkcs7 = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_aws_instance_id_pkcs7"
    )
    aws_instance_type = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_aws_instance_type"
    )
    azure_instance_type = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_azure_instance_type"
    )
    bios_uuid = simple_file("insights_commands/dmidecode_-s_system-uuid")
    blkid = simple_file("insights_commands/blkid_-c_.dev.null")
    brctl_show = simple_file("insights_commands/brctl_show")
    ceph_df_detail = first_file([
        "insights_commands/ceph_df_detail_-f_json-pretty",
        "insights_commands/ceph_df_detail_-f_json"
    ])
    ceph_health_detail = first_file([
        "insights_commands/ceph_health_detail_-f_json-pretty",
        "insights_commands/ceph_health_detail_-f_json"
    ])
    ceph_insights = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_ceph_insights"
    )
    ceph_osd_df = first_file([
        "insights_commands/ceph_osd_df_-f_json-pretty",
        "insights_commands/ceph_osd_df_-f_json"
    ])
    ceph_osd_dump = first_file([
        "insights_commands/ceph_osd_dump_-f_json-pretty",
        "insights_commands/ceph_osd_dump_-f_json"
    ])
    ceph_osd_ec_profile_ls = simple_file(
        "insights_commands/ceph_osd_erasure-code-profile_ls")
    ceph_osd_ec_profile_get = simple_file(
        "insights_commands/ceph_osd_erasure-code-profile_get_s_-f_json")
    ceph_osd_tree = first_file([
        "insights_commands/ceph_osd_tree_-f_json-pretty",
        "insights_commands/ceph_osd_tree_-f_json"
    ])
    ceph_s = first_file([
        "insights_commands/ceph_-s_-f_json-pretty",
        "insights_commands/ceph_-s_-f_json"
    ])
    ceph_v = simple_file("insights_commands/ceph_-v")
    certificates_enddate = simple_file(
        "insights_commands/find_.etc.origin.node_.etc.origin.master_.etc.pki_-type_f_-exec_.usr.bin.openssl_x509_-noout_-enddate_-in_-exec_echo_FileName"
    )
    chkconfig = simple_file("insights_commands/chkconfig_--list")
    chronyc_sources = simple_file("insights_commands/chronyc_sources")
    cpupower_frequency_info = simple_file(
        "insights_commands/cpupower_-c_all_frequency-info")
    crt = simple_file(
        "insights_commands/find_.etc.origin.node_.etc.origin.master_-type_f_-path_.crt"
    )
    date = simple_file("insights_commands/date")
    date_iso = simple_file("insights_commands/date_--iso-8601_seconds")
    date_utc = simple_file("insights_commands/date_--utc")
    db2licm_l = simple_file("insights_commands/db2licm_l")
    df__al = simple_file("insights_commands/df_-al")
    df__alP = simple_file("insights_commands/df_-alP")
    df__li = simple_file("insights_commands/df_-li")
    dig = simple_file("insights_commands/dig_dnssec_._DNSKEY")
    dig_dnssec = simple_file("insights_commands/dig_dnssec_._SOA")
    dig_edns = simple_file("insights_commands/dig_edns_0_._SOA")
    dig_noedns = simple_file("insights_commands/dig_noedns_._SOA")
    display_java = simple_file("insights_commands/alternatives_--display_java")
    display_name = simple_file("display_name")
    dmesg = simple_file("insights_commands/dmesg")
    dmidecode = simple_file("insights_commands/dmidecode")
    dmsetup_info = simple_file("insights_commands/dmsetup_info_-C")
    dnf_module_list = simple_file(
        "insights_commands/dnf_-C_--noplugins_module_list")
    dnf_module_info = glob_file(
        "insights_commands/dnf_-C_--noplugins_module_info_*")
    docker_info = simple_file("insights_commands/docker_info")
    docker_list_containers = simple_file(
        "insights_commands/docker_ps_--all_--no-trunc")
    docker_list_images = simple_file(
        "insights_commands/docker_images_--all_--no-trunc_--digests")
    engine_config_all = simple_file("insights_commands/engine-config_--all")
    ethtool = glob_file("insights_commands/ethtool_*", ignore="ethtool_-.*")
    ethtool_S = glob_file("insights_commands/ethtool_-S_*")
    ethtool_T = glob_file("insights_commands/ethtool_-T_*")
    ethtool_a = glob_file("insights_commands/ethtool_-a_*")
    ethtool_c = glob_file("insights_commands/ethtool_-c_*")
    ethtool_g = glob_file("insights_commands/ethtool_-g_*")
    ethtool_i = glob_file("insights_commands/ethtool_-i_*")
    ethtool_k = glob_file("insights_commands/ethtool_-k_*")
    facter = simple_file("insights_commands/facter")
    fc_match = simple_file(
        "insights_commands/fc-match_-sv_sans_regular_roman_family_fontformat")
    fcoeadm_i = simple_file("insights_commands/fcoeadm_-i")
    fdisk_l = simple_file("insights_commands/fdisk_-l")
    findmnt_lo_propagation = simple_file(
        "insights_commands/findmnt_-lo_PROPAGATION")
    foreman_rake_db_migrate_status = simple_file(
        'insights_commands/foreman-rake_db_migrate_status')
    getcert_list = simple_file("insights_commands/getcert_list")
    getconf_page_size = simple_file("insights_commands/getconf_PAGE_SIZE")
    getenforce = simple_file("insights_commands/getenforce")
    getsebool = simple_file("insights_commands/getsebool_-a")
    grub1_config_perms = simple_file(
        "insights_commands/ls_-l_.boot.grub.grub.conf")
    grub_config_perms = simple_file(
        "insights_commands/ls_-l_.boot.grub2.grub.cfg")
    grubby_default_index = simple_file(
        "insights_commands/grubby_--default-index")
    grubby_default_kernel = simple_file(
        "insights_commands/grubby_--default-kernel")
    gluster_v_info = simple_file("insights_commands/gluster_volume_info")
    gluster_v_status = simple_file("insights_commands/gluster_volume_status")
    gluster_peer_status = simple_file("insights_commands/gluster_peer_status")
    hammer_ping = simple_file("insights_commands/hammer_ping")
    hammer_task_list = simple_file(
        "insights_commands/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"
    )
    heat_crontab = simple_file("insights_commands/crontab_-l_-u_heat")
    heat_crontab_container = simple_file(
        "insights_commands/docker_exec_heat_api_cron_.usr.bin.crontab_-l_-u_heat"
    )
    installed_rpms = head(all_installed_rpms)
    hostname = simple_file("insights_commands/hostname_-f")
    hostname_default = simple_file("insights_commands/hostname")
    hostname_short = simple_file("insights_commands/hostname_-s")
    hponcfg_g = simple_file("insights_commands/hponcfg_-g")
    httpd_M = glob_file("insights_commands/*httpd*_-M")
    httpd_on_nfs = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_httpd_on_nfs"
    )
    httpd_pid = simple_file("insights_commands/pgrep_-o_httpd")
    httpd_V = glob_file("insights_commands/*httpd*_-V")
    ifconfig = simple_file("insights_commands/ifconfig_-a")
    ip6tables = simple_file("insights_commands/ip6tables-save")
    ip_addr = simple_file("insights_commands/ip_addr")
    ip_addresses = simple_file("insights_commands/hostname_-I")
    ip_route_show_table_all = simple_file(
        "insights_commands/ip_route_show_table_all")
    ip_s_link = first_file(
        ["insights_commands/ip_-s_-d_link", "insights_commands/ip_-s_link"])
    ipcs_m = simple_file("insights_commands/ipcs_-m")
    ipcs_m_p = simple_file("insights_commands/ipcs_-m_-p")
    ipcs_s = simple_file("insights_commands/ipcs_-s")
    iptables = simple_file("insights_commands/iptables-save")
    ipv4_neigh = simple_file("insights_commands/ip_-4_neighbor_show_nud_all")
    ipv6_neigh = simple_file("insights_commands/ip_-6_neighbor_show_nud_all")
    ip_netns_exec_namespace_lsof = glob_file(
        "insights_commands/ip_netns_exec_*_lsof_-i")
    iscsiadm_m_session = simple_file("insights_commands/iscsiadm_-m_session")
    katello_service_status = simple_file(
        "insights_commands/katello-service_status")
    keystone_crontab = simple_file("insights_commands/crontab_-l_-u_keystone")
    keystone_crontab_container = simple_file(
        "insights_commands/docker_exec_keystone_cron_.usr.bin.crontab_-l_-u_keystone"
    )
    kpatch_list = simple_file("insights_commands/kpatch_list")
    kpatch_patch_files = simple_file("insights_commands/ls_.var.lib.kpatch.*")
    libkeyutils = simple_file(
        "insights_commands/find_-L_.lib_.lib64_-name_libkeyutils.so")
    libkeyutils_objdumps = simple_file(
        "insights_commands/find_-L_.lib_.lib64_-name_libkeyutils.so.1_-exec_objdump_-x"
    )
    locale = simple_file("insights_commands/locale")
    localtime = simple_file("insights_commands/file_-L_.etc.localtime")
    lpstat_p = simple_file("insights_commands/lpstat_-p")
    ls_boot = simple_file("insights_commands/ls_-lanR_.boot")
    ls_dev = simple_file("insights_commands/ls_-lanR_.dev")
    ls_disk = simple_file("insights_commands/ls_-lanR_.dev.disk")
    ls_docker_volumes = simple_file(
        "insights_commands/ls_-lanR_.var.lib.docker.volumes")
    ls_edac_mc = simple_file(
        "insights_commands/ls_-lan_.sys.devices.system.edac.mc")
    ls_etc = simple_file("insights_commands/ls_-lanR_.etc")
    ls_lib_firmware = simple_file("insights_commands/ls_-lanR_.lib.firmware")
    ls_ocp_cni_openshift_sdn = simple_file(
        "insights_commands/ls_-l_.var.lib.cni.networks.openshift-sdn")
    ls_origin_local_volumes_pods = simple_file(
        "insights_commands/ls_-l_.var.lib.origin.openshift.local.volumes.pods")
    ls_osroot = simple_file("insights_commands/ls_-lan")
    ls_run_systemd_generator = simple_file(
        "insights_commands/ls_-lan_.run.systemd.generator")
    ls_R_var_lib_nova_instances = simple_file(
        "insights_commands/ls_-laR_.var.lib.nova.instances")
    ls_sys_firmware = simple_file("insights_commands/ls_-lanR_.sys.firmware")
    ls_usr_lib64 = simple_file("insights_commands/ls_-lan_.usr.lib64")
    ls_usr_sbin = simple_file("insights_commands/ls_-ln_.usr.sbin")
    ls_var_lib_mongodb = simple_file(
        "insights_commands/ls_-la_.var.lib.mongodb")
    ls_var_lib_nova_instances = simple_file(
        "insights_commands/ls_-laRZ_.var.lib.nova.instances")
    ls_var_log = simple_file(
        "insights_commands/ls_-la_.var.log_.var.log.audit")
    ls_var_opt_mssql = simple_file("insights_commands/ls_-ld_.var.opt.mssql")
    ls_var_opt_mssql_log = simple_file(
        "insights_commands/ls_-la_.var.opt.mssql.log")
    ls_var_spool_clientmq = simple_file(
        "insights_commands/ls_-ln_.var.spool.clientmqueue")
    ls_var_spool_postfix_maildrop = simple_file(
        "insights_commands/ls_-ln_.var.spool.postfix.maildrop")
    ls_var_tmp = simple_file("insights_commands/ls_-ln_.var.tmp")
    ls_var_run = simple_file("insights_commands/ls_-lnL_.var.run")
    ls_var_www = simple_file("insights_commands/ls_-la_.dev.null_.var.www")
    lsblk = simple_file("insights_commands/lsblk")
    lsblk_pairs = simple_file(
        "insights_commands/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_file("insights_commands/lscpu")
    lsinitrd = simple_file("insights_commands/lsinitrd")
    lsmod = simple_file("insights_commands/lsmod")
    lsof = simple_file("insights_commands/lsof")
    lspci = simple_file("insights_commands/lspci_-k")
    lssap = simple_file("insights_commands/usr.sap.hostctrl.exe.lssap")
    lsscsi = simple_file("insights_commands/lsscsi")
    lvdisplay = simple_file("insights_commands/lvdisplay")
    lvs_noheadings = simple_file(
        "insights_commands/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_file(
        "insights_commands/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"
    )
    max_uid = simple_file(
        "insights_commands/awk_-F_if_3_max_max_3_END_print_max_.etc.passwd")
    md5chk_files = glob_file("insights_commands/md5sum_*")
    mount = simple_file("insights_commands/mount")
    modinfo = glob_file("insights_commands/modinfo_*")
    modinfo_i40e = simple_file("insights_commands/modinfo_i40e")
    modinfo_igb = simple_file("insights_commands/modinfo_igb")
    modinfo_ixgbe = simple_file("insights_commands/modinfo_ixgbe")
    modinfo_veth = simple_file("insights_commands/modinfo_veth")
    modinfo_vmxnet3 = simple_file("insights_commands/modinfo_vmxnet3")
    multicast_querier = simple_file(
        "insights_commands/find_.sys.devices.virtual.net._-name_multicast_querier_-print_-exec_cat"
    )
    multipath_conf_initramfs = simple_file(
        "insights_commands/lsinitrd_-f_.etc.multipath.conf")
    multipath__v4__ll = simple_file("insights_commands/multipath_-v4_-ll")
    mysqladmin_vars = simple_file("insights_commands/mysqladmin_variables")
    mysqladmin_status = simple_file("insights_commands/mysqladmin_status")
    named_checkconf_p = simple_file("insights_commands/named-checkconf_-p")
    namespace = simple_file("insights_commands/ls_.var.run.netns")
    netstat = simple_file("insights_commands/netstat_-neopa")
    netstat_agn = simple_file("insights_commands/netstat_-agn")
    netstat_i = simple_file("insights_commands/netstat_-i")
    netstat_s = simple_file("insights_commands/netstat_-s")
    nmcli_conn_show = simple_file("insights_commands/nmcli_conn_show")
    nmcli_dev_show = simple_file("insights_commands/nmcli_dev_show")
    nova_crontab = simple_file("insights_commands/crontab_-l_-u_nova")
    nova_crontab_container = simple_file(
        "insights_commands/docker_exec_nova_api_cron_.usr.bin.crontab_-l_-u_nova"
    )
    nova_uid = simple_file("insights_commands/id_-u_nova")
    nova_migration_uid = simple_file("insights_commands/id_-u_nova_migration")
    ntpq_leap = simple_file("insights_commands/ntpq_-c_rv_0_leap")
    ntpq_pn = simple_file("insights_commands/ntpq_-pn")
    ntptime = simple_file("insights_commands/ntptime")
    numeric_user_group_name = simple_file(
        "insights_commands/grep_-c_digit_.etc.passwd_.etc.group")
    oc_get_bc = simple_file(
        "insights_commands/oc_get_bc_-o_yaml_--all-namespaces")
    oc_get_build = simple_file(
        "insights_commands/oc_get_build_-o_yaml_--all-namespaces")
    oc_get_clusterrole_with_config = simple_file(
        "insights_commands/oc_get_clusterrole_--config_.etc.origin.master.admin.kubeconfig"
    )
    oc_get_clusterrolebinding_with_config = simple_file(
        "insights_commands/oc_get_clusterrolebinding_--config_.etc.origin.master.admin.kubeconfig"
    )
    oc_get_dc = simple_file(
        "insights_commands/oc_get_dc_-o_yaml_--all-namespaces")
    oc_get_egressnetworkpolicy = simple_file(
        "insights_commands/oc_get_egressnetworkpolicy_-o_yaml_--all-namespaces"
    )
    oc_get_endpoints = simple_file(
        "insights_commands/oc_get_endpoints_-o_yaml_--all-namespaces")
    oc_get_event = simple_file(
        "insights_commands/oc_get_event_-o_yaml_--all-namespaces")
    oc_get_node = simple_file("insights_commands/oc_get_nodes_-o_yaml")
    oc_get_pod = simple_file(
        "insights_commands/oc_get_pod_-o_yaml_--all-namespaces")
    oc_get_project = simple_file(
        "insights_commands/oc_get_project_-o_yaml_--all-namespaces")
    oc_get_pv = simple_file(
        "insights_commands/oc_get_pv_-o_yaml_--all-namespaces")
    oc_get_pvc = simple_file(
        "insights_commands/oc_get_pvc_-o_yaml_--all-namespaces")
    oc_get_rc = simple_file(
        "insights_commands/oc_get_rc_-o_yaml_--all-namespaces")
    oc_get_role = simple_file(
        "insights_commands/oc_get_role_-o_yaml_--all-namespaces")
    oc_get_rolebinding = simple_file(
        "insights_commands/oc_get_rolebinding_-o_yaml_--all-namespaces")
    oc_get_route = simple_file(
        "insights_commands/oc_get_route_-o_yaml_--all-namespaces")
    oc_get_service = simple_file(
        "insights_commands/oc_get_service_-o_yaml_--all-namespaces")
    oc_get_configmap = simple_file(
        "insights_commands/oc_get_configmap_-o_yaml_--all-namespaces")
    openvswitch_other_config = simple_file(
        "insights_commands/ovs-vsctl_-t_5_get_Open_vSwitch_._other_config")
    ovs_appctl_fdb_show_bridge = glob_file(
        "insights_commands/ovs-appctl_fdb.show_*")
    ovs_ofctl_dump_flows = glob_file(
        "insights_commands/ovs-ofctl_dump-flows_*")
    ovs_vsctl_list_bridge = simple_file(
        "insights_commands/ovs-vsctl_list_bridge")
    ovs_vsctl_show = simple_file("insights_commands/ovs-vsctl_show")
    parted__l = simple_file("insights_commands/parted_-l_-s")
    passenger_status = simple_file("insights_commands/passenger-status")
    pci_rport_target_disk_paths = simple_file(
        "insights_commands/find_.sys.devices._-maxdepth_10_-mindepth_9_-name_stat_-type_f"
    )
    pcs_config = simple_file("insights_commands/pcs_config")
    pcs_quorum_status = simple_file("insights_commands/pcs_quorum_status")
    pcs_status = simple_file("insights_commands/pcs_status")
    ps_alxwww = simple_file("insights_commands/ps_alxwww")
    ps_aux = simple_file("insights_commands/ps_aux")
    ps_auxcww = simple_file("insights_commands/ps_auxcww")
    ps_auxww = simple_file("insights_commands/ps_auxww")
    ps_ef = simple_file("insights_commands/ps_-ef")
    ps_eo = simple_file("insights_commands/ps_-eo_pid_ppid_comm")
    pvs = simple_file(
        "insights_commands/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_file(
        "insights_commands/pvs_--nameprefixes_--noheadings_--separator_-a_-o_pv_all_vg_name_--config_global_locking_type_0"
    )
    pvs_noheadings_all = simple_file(
        "insights_commands/pvs_--nameprefixes_--noheadings_--separator_-a_-o_pv_all_vg_name_--config_global_locking_type_0_devices_filter_a"
    )
    qpid_stat_g = simple_file(
        "insights_commands/qpid-stat_-g_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671"
    )
    qpid_stat_q = simple_file(
        "insights_commands/qpid-stat_-q_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671"
    )
    qpid_stat_u = simple_file(
        "insights_commands/qpid-stat_-u_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671"
    )
    rabbitmq_policies = simple_file(
        "insights_commands/rabbitmqctl_list_policies")
    rabbitmq_queues = simple_file(
        "insights_commands/rabbitmqctl_list_queues_name_messages_consumers_auto_delete"
    )
    rabbitmq_report = simple_file("insights_commands/rabbitmqctl_report")
    rabbitmq_users = simple_file("insights_commands/rabbitmqctl_list_users")
    readlink_e_etc_mtab = simple_file(
        "insights_commands/readlink_-e_.etc.mtab")
    rhn_charsets = simple_file("insights_commands/rhn-charsets")
    rhn_schema_stats = simple_file("insights_commands/rhn-schema-stats")
    rhn_schema_version = simple_file("insights_commands/rhn-schema-version")
    rhev_data_center = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_rhev_data_center"
    )
    rhv_log_collector_analyzer = simple_file(
        "insights_commands/rhv-log-collector-analyzer_--json")
    root_crontab = simple_file("insights_commands/crontab_-l_-u_root")
    rndc_status = simple_file("insights_commands/rndc_status")
    route = simple_file("insights_commands/route_-n")
    rpm_V_packages = simple_file(
        "insights_commands/rpm_-V_coreutils_procps_procps-ng_shadow-utils_passwd_sudo"
    )
    sapcontrol_getsystemupdatelist = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_sapcontrol_getsystemupdatelist"
    )
    saphostctl_getcimobject_sapinstance = simple_file(
        "insights_commands/usr.sap.hostctrl.exe.saphostctrl_-function_GetCIMObject_-enuminstances_SAPInstance"
    )
    saphostexec_status = simple_file(
        "insights_commands/usr.sap.hostctrl.exe.saphostexec_-status")
    saphostexec_version = simple_file(
        "insights_commands/usr.sap.hostctrl.exe.saphostexec_-version")
    satellite_enabled_features = simple_file(
        "insights_commands/curl_-sk_https_..localhost_9090.features_--connect-timeout_5"
    )
    satellite_mongodb_storage_engine = simple_file(
        "insights_commands/mongo_pulp_database_--eval_db.serverStatus_.storageEngine"
    )
    sealert = simple_file('insights_commands/sealert_-l')
    sestatus = simple_file("insights_commands/sestatus_-b")
    smbstatus_S = simple_file("insights_commands/smbstatus_-S")
    smbstatus_p = simple_file("insights_commands/smbstatus_-p")
    software_collections_list = simple_file('insights_commands/scl_--list')
    ss = simple_file("insights_commands/ss_-tupna")
    sshd_config_perms = simple_file(
        "insights_commands/ls_-l_.etc.ssh.sshd_config")
    subscription_manager_installed_product_ids = simple_file(
        "insights_commands/find_.etc.pki.product-default._.etc.pki.product._-name_pem_-exec_rct_cat-cert_--no-content"
    )
    subscription_manager_id = simple_file(
        "insights_commands/subscription-manager_identity")
    subscription_manager_release_show = simple_file(
        'insights_commands/subscription-manager_release_--show')
    sysctl = simple_file("insights_commands/sysctl_-a")
    sysctl_conf_initramfs = glob_file(
        "insights_commands/lsinitrd_.boot.*_-f_.etc.sysctl.conf_.etc.sysctl.d._.conf"
    )
    systemctl_cat_rpcbind_socket = simple_file(
        "insights_commands/systemctl_cat_rpcbind.socket")
    systemctl_cinder_volume = simple_file(
        "insights_commands/systemctl_show_openstack-cinder-volume")
    systemctl_httpd = simple_file("insights_commands/systemctl_show_httpd")
    systemctl_nginx = simple_file("insights_commands/systemctl_show_nginx")
    systemctl_list_unit_files = simple_file(
        "insights_commands/systemctl_list-unit-files")
    systemctl_list_units = simple_file(
        "insights_commands/systemctl_list-units")
    systemctl_mariadb = simple_file("insights_commands/systemctl_show_mariadb")
    systemctl_pulp_workers = simple_file(
        "insights_commands/systemctl_show_pulp_workers")
    systemctl_pulp_resmg = simple_file(
        "insights_commands/systemctl_show_pulp_resource_manager")
    systemctl_pulp_celerybeat = simple_file(
        "insights_commands/systemctl_show_pulp_celerybeat")
    systemctl_qpidd = simple_file("insights_commands/systemctl_show_qpidd")
    systemctl_qdrouterd = simple_file(
        "insights_commands/systemctl_show_qdrouterd")
    systemctl_show_all_services = simple_file(
        "insights_commands/systemctl_show_.service")
    systemctl_smartpdc = simple_file(
        "insights_commands/systemctl_show_smart_proxy_dynflow_core")
    systemd_docker = first_file([
        "insights_commands/systemctl_cat_docker.service",
        "/usr/lib/systemd/system/docker.service"
    ])
    systemd_openshift_node = first_file([
        "insights_commands/systemctl_cat_atomic-openshift-node.service",
        "/usr/lib/systemd/system/atomic-openshift-node.service"
    ])
    systool_b_scsi_v = simple_file("insights_commands/systool_-b_scsi_-v")
    teamdctl_config_dump = glob_file(
        "insights_commands/teamdctl_*_config_dump")
    teamdctl_state_dump = glob_file("insights_commands/teamdctl_*_state_dump")
    tomcat_vdc_fallback = simple_file(
        "insights_commands/find_.usr.share_-maxdepth_1_-name_tomcat_-exec_.bin.grep_-R_-s_VirtualDirContext_--include_.xml"
    )
    tuned_adm = simple_file("insights_commands/tuned-adm_list")
    uname = simple_file("insights_commands/uname_-a")
    uptime = simple_file("insights_commands/uptime")
    version_info = simple_file("version_info")
    vdo_status = simple_file("insights_commands/vdo_status")
    vgdisplay = simple_file("insights_commands/vgdisplay")
    vgs_noheadings = simple_file(
        "insights_commands/vgs_--nameprefixes_--noheadings_--separator_-a_-o_vg_all_--config_global_locking_type_0"
    )
    vgs_noheadings_all = simple_file(
        "insights_commands/vgs_--nameprefixes_--noheadings_--separator_-a_-o_vg_all_--config_global_locking_type_0_devices_filter_a"
    )
    virsh_list_all = simple_file(
        "insights_commands/virsh_--readonly_list_--all")
    virt_what = simple_file("insights_commands/virt-what")
    woopsie = simple_file(
        "insights_commands/find_.var.crash_.var.tmp_-path_.reports-_.whoopsie-report"
    )
    yum_list_installed = simple_file(
        "insights_commands/yum_-C_--noplugins_list_installed")
    yum_repolist = first_file([
        "insights_commands/yum_-C_--noplugins_repolist",
        "insights_commands/yum_-C_repolist"
    ])
    zdump_v = simple_file(
        "insights_commands/zdump_-v_.etc.localtime_-c_2019_2039")
Exemple #4
0
class SosSpecs(Specs):
    auditctl_status = simple_file("sos_commands/auditd/auditctl_-s")
    blkid = first_file([
        "sos_commands/block/blkid_-c_.dev.null",
        "sos_commands/filesys/blkid_-c_.dev.null"
    ])
    candlepin_log = first_of([
        simple_file("/var/log/candlepin/candlepin.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/candlepin/candlepin.log"
        )
    ])
    candlepin_error_log = first_of([
        simple_file("var/log/candlepin/error.log"),
        simple_file(
            r"sos_commands/foreman/foreman-debug/var/log/candlepin/error.log")
    ])
    catalina_out = glob_file("var/log/tomcat*/catalina.out")
    catalina_server_log = glob_file("var/log/tomcat*/catalina*.log")
    ceph_osd_tree_text = simple_file("sos_commands/ceph/ceph_osd_tree")
    ceph_report = simple_file("sos_commands/ceph/ceph_report")
    ceph_health_detail = simple_file(
        "sos_commands/ceph/ceph_health_detail_--format_json-pretty")
    chkconfig = first_file([
        "sos_commands/startup/chkconfig_--list",
        "sos_commands/services/chkconfig_--list"
    ])
    date = first_of([
        simple_file("sos_commands/general/date"),
        simple_file("sos_commands/date/date")
    ])
    df__al = first_file([
        "sos_commands/filesys/df_-al", "sos_commands/filesys/df_-al_-x_autofs"
    ])
    display_java = simple_file("sos_commands/java/alternatives_--display_java")
    docker_info = simple_file("sos_commands/docker/docker_info")
    docker_list_containers = first_file(
        ["sos_commands/docker/docker_ps_-a", "sos_commands/docker/docker_ps"])
    docker_list_images = simple_file("sos_commands/docker/docker_images")
    docker_image_inspect = glob_file("sos_commands/docker/docker_inspect_*")
    dmesg = first_file([
        "sos_commands/kernel/dmesg", "sos_commands/general/dmesg",
        "var/log/dmesg"
    ])
    dmidecode = simple_file("sos_commands/hardware/dmidecode")
    dmsetup_info = simple_file("sos_commands/devicemapper/dmsetup_info_-c")
    dumpe2fs_h = glob_file("sos_commands/filesys/dumpe2fs_-h_*")
    ethtool = glob_file("sos_commands/networking/ethtool_*",
                        ignore="ethtool_-.*")
    ethtool_S = glob_file("sos_commands/networking/ethtool_-S_*")
    ethtool_T = glob_file("sos_commands/networking/ethtool_-T_*")
    ethtool_a = glob_file("sos_commands/networking/ethtool_-a_*")
    ethtool_c = glob_file("sos_commands/networking/ethtool_-c_*")
    ethtool_g = glob_file("sos_commands/networking/ethtool_-g_*")
    ethtool_i = glob_file("sos_commands/networking/ethtool_-i_*")
    ethtool_k = glob_file("sos_commands/networking/ethtool_-k_*")
    fdisk_l_sos = first_of([
        glob_file(r"sos_commands/filesys/fdisk_-l_*"),
        glob_file(r"sos_commands/block/fdisk_-l_*")
    ])
    foreman_production_log = first_of([
        simple_file("/var/log/foreman/production.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman/production.log"
        )
    ])
    foreman_proxy_conf = first_of([
        simple_file("/etc/foreman-proxy/settings.yml"),
        simple_file(
            "sos_commands/foreman/foreman-debug/etc/foreman-proxy/settings.yml"
        )
    ])
    foreman_proxy_log = first_of([
        simple_file("/var/log/foreman-proxy/proxy.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman-proxy/proxy.log"
        )
    ])
    foreman_satellite_log = first_of([
        simple_file("/var/log/foreman-installer/satellite.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman-installer/satellite.log"
        )
    ])
    foreman_ssl_access_ssl_log = first_file([
        "var/log/httpd/foreman-ssl_access_ssl.log",
        r"sos_commands/foreman/foreman-debug/var/log/httpd/foreman-ssl_access_ssl.log"
    ])
    getcert_list = first_file(
        ["sos_commands/ipa/ipa-getcert_list", "sos_commands/ipa/getcert_list"])
    gluster_v_info = simple_file("sos_commands/gluster/gluster_volume_info")
    gluster_v_status = simple_file(
        "sos_commands/gluster/gluster_volume_status")
    gluster_peer_status = simple_file(
        "sos_commands/gluster/gluster_peer_status")
    hostname = first_file(
        ["sos_commands/general/hostname_-f", "sos_commands/host/hostname_-f"])
    hostname_default = first_file([
        "sos_commands/general/hostname", "sos_commands/host/hostname",
        "/etc/hostname", "hostname"
    ])
    hostname_short = first_file([
        "sos_commands/general/hostname", "sos_commands/host/hostname",
        "/etc/hostname", "hostname"
    ])
    installed_rpms = first_file(
        ["sos_commands/rpm/package-data", "installed-rpms"])
    ip_addr = first_of([
        simple_file("sos_commands/networking/ip_-d_address"),
        simple_file("sos_commands/networking/ip_address")
    ])
    ip_route_show_table_all = simple_file(
        "sos_commands/networking/ip_route_show_table_all")
    ip_s_link = first_of([
        simple_file("sos_commands/networking/ip_-s_-d_link"),
        simple_file("sos_commands/networking/ip_-s_link"),
        simple_file("sos_commands/networking/ip_link")
    ])
    iptables = first_file(
        ["/etc/sysconfig/iptables", "/etc/sysconfig/iptables.save"])
    journal_since_boot = first_of([
        simple_file("sos_commands/logs/journalctl_--no-pager_--boot"),
        simple_file("sos_commands/logs/journalctl_--no-pager_--catalog_--boot")
    ])
    locale = simple_file("sos_commands/i18n/locale")
    lsblk = first_file(
        ["sos_commands/block/lsblk", "sos_commands/filesys/lsblk"])
    lscpu = simple_file("sos_commands/processor/lscpu")
    lsinitrd = simple_file("sos_commands/boot/lsinitrd")
    lsof = simple_file("sos_commands/process/lsof_-b_M_-n_-l")
    lsmod = simple_file("sos_commands/kernel/lsmod")
    lspci = first_of([
        simple_file("sos_commands/pci/lspci_-nnvv"),
        simple_file("sos_commands/pci/lspci_-nvv"),
        simple_file("sos_commands/pci/lspci")
    ])
    lsscsi = simple_file("sos_commands/scsi/lsscsi")
    ls_dev = first_file([
        "sos_commands/block/ls_-lanR_.dev",
        "sos_commands/devicemapper/ls_-lanR_.dev"
    ])
    lvs = first_file([
        "sos_commands/lvm2/lvs_-a_-o_lv_tags_devices_--config_global_locking_type_0",
        "sos_commands/lvm2/lvs_-a_-o_devices"
    ])
    mount = simple_file("sos_commands/filesys/mount_-l")
    multipath__v4__ll = first_file([
        "sos_commands/multipath/multipath_-v4_-ll",
        "sos_commands/devicemapper/multipath_-v4_-ll"
    ])
    netstat = first_file([
        "sos_commands/networking/netstat_-neopa",
        "sos_commands/networking/netstat_-W_-neopa",
        "sos_commands/networking/netstat_-T_-neopa"
    ])
    netstat_agn = first_of([
        simple_file("sos_commands/networking/netstat_-agn"),
        simple_file("sos_commands/networking/netstat_-W_-agn"),
        simple_file("sos_commands/networking/netstat_-T_-agn")
    ])
    netstat_s = simple_file("sos_commands/networking/netstat_-s")
    nmcli_dev_show = simple_file("sos_commands/networking/nmcli_device_show")
    nmcli_dev_show_sos = glob_file([
        "sos_commands/networking/nmcli_dev_show_*",
        "sos_commands/networkmanager/nmcli_dev_show_*"
    ])
    ntptime = simple_file("sos_commands/ntp/ntptime")
    ovs_vsctl_show = simple_file(
        "sos_commands/openvswitch/ovs-vsctl_-t_5_show")
    pcs_config = simple_file("sos_commands/pacemaker/pcs_config")
    pcs_quorum_status = simple_file("sos_commands/pacemaker/pcs_quorum_status")
    pcs_status = simple_file("sos_commands/pacemaker/pcs_status")
    podman_image_inspect = glob_file("sos_commands/podman/podman_inspect_*")
    podman_list_containers = first_file(
        ["sos_commands/podman/podman_ps_-a", "sos_commands/podman/podman_ps"])
    podman_list_images = simple_file("sos_commands/podman/podman_images")
    ps_alxwww = simple_file("sos_commands/process/ps_alxwww")
    ps_aux = first_file([
        "sos_commands/process/ps_aux", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_auxcww"
    ])
    ps_auxcww = first_file([
        "sos_commands/process/ps_auxcww", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_aux"
    ])
    ps_auxww = first_file([
        "sos_commands/process/ps_auxww", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_aux", "sos_commands/process/ps_auxcww"
    ])
    puppet_ssl_cert_ca_pem = simple_file(
        "sos_commands/foreman/foreman-debug/var/lib/puppet/ssl/certs/ca.pem")
    pvs = first_file([
        "sos_commands/lvm2/pvs_-a_-v_-o_pv_mda_free_pv_mda_size_pv_mda_count_pv_mda_used_count_pe_start_--config_global_locking_type_0",
        "sos_commands/lvm2/pvs_-a_-v", "sos_commands/devicemapper/pvs_-a_-v"
    ])
    qpid_stat_q = first_of([
        simple_file("qpid_stat_queues"),
        simple_file("qpid-stat-q"),
        simple_file("sos_commands/foreman/foreman-debug/qpid_stat_queues"),
        simple_file("sos_commands/foreman/foreman-debug/qpid-stat-q")
    ])
    qpid_stat_u = first_of([
        simple_file("qpid_stat_subscriptions"),
        simple_file("qpid-stat-u"),
        simple_file(
            "sos_commands/foreman/foreman-debug/qpid_stat_subscriptions"),
        simple_file("sos_commands/foreman/foreman-debug/qpid-stat-u")
    ])
    rabbitmq_report = simple_file("sos_commands/rabbitmq/rabbitmqctl_report")
    rabbitmq_report_of_containers = glob_file(
        "sos_commands/rabbitmq/docker_exec_-t_rabbitmq-bundle-docker-*_rabbitmqctl_report"
    )
    rhn_charsets = first_file([
        "sos_commands/satellite/rhn-charsets", "sos_commands/rhn/rhn-charsets"
    ])
    root_crontab = first_file([
        "sos_commands/crontab/root_crontab", "sos_commands/cron/root_crontab"
    ])
    route = simple_file("sos_commands/networking/route_-n")
    sestatus = simple_file("sos_commands/selinux/sestatus_-b")
    subscription_manager_list_consumed = first_file([
        'sos_commands/yum/subscription-manager_list_--consumed',
        'sos_commands/subscription_manager/subscription-manager_list_--consumed',
        'sos_commands/general/subscription-manager_list_--consumed'
    ])
    subscription_manager_list_installed = first_file([
        'sos_commands/yum/subscription-manager_list_--installed',
        'sos_commands/subscription_manager/subscription-manager_list_--installed',
        'sos_commands/general/subscription-manager_list_--installed'
    ])
    sysctl = simple_file("sos_commands/kernel/sysctl_-a")
    systemctl_list_unit_files = simple_file(
        "sos_commands/systemd/systemctl_list-unit-files")
    systemctl_list_units = first_file([
        "sos_commands/systemd/systemctl_list-units",
        "sos_commands/systemd/systemctl_list-units_--all"
    ])
    teamdctl_config_dump = glob_file(
        "sos_commands/teamd/teamdctl_*_config_dump")
    teamdctl_state_dump = glob_file("sos_commands/teamd/teamdctl_*_state_dump")
    uname = simple_file("sos_commands/kernel/uname_-a")
    uptime = first_of([
        simple_file("sos_commands/general/uptime"),
        simple_file("sos_commands/host/uptime")
    ])
    var_qemu_xml = glob_file(r"var/run/libvirt/qemu/*.xml")
    vdsm_import_log = glob_file("var/log/vdsm/import/import-*.log")
    vgdisplay = first_file([
        "sos_commands/lvm2/vgdisplay_-vv_--config_global_locking_type_0",
        "sos_commands/lvm2/vgdisplay_-vv"
    ])
    vgs = first_file([
        "sos_commands/lvm2/vgs_-v_-o_vg_mda_count_vg_mda_free_vg_mda_size_vg_mda_used_count_vg_tags_--config_global_locking_type_0",
        "sos_commands/lvm2/vgs_-v", "sos_commands/devicemapper/vgs_-v"
    ])
    xfs_info = glob_file("sos_commands/xfs/xfs_info*")
    yum_repolist = simple_file("sos_commands/yum/yum_-C_repolist")
Exemple #5
0
class DefaultSpecs(Specs):
    auditd_conf = simple_file("/etc/audit/auditd.conf")
    audit_log = simple_file("/var/log/audit/audit.log")
    autofs_conf = simple_file("/etc/autofs.conf")
    blkid = simple_command("/sbin/blkid -c /dev/null")
    bond = glob_file("/proc/net/bonding/bond*")
    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")
    checkin_conf = simple_file("/etc/splice/checkin.conf")
    ps_aux = simple_command("/bin/ps aux")
    ps_auxcww = simple_command("/bin/ps auxcww")
    ps_auxww = simple_command("/bin/ps auxww")
    ps_ef = simple_command("/bin/ps -ef")

    @datasource(ps_auxww)
    def tomcat_base(broker):
        """Path: Tomcat base path"""
        ps = broker[DefaultSpecs.ps_auxww].content
        results = []
        findall = re.compile(r"\-Dcatalina\.base=(\S+)").findall
        for p in ps:
            found = findall(p)
            if found:
                # Only get the path which is absolute
                results.extend(f for f in found if f[0] == '/')
        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*")
    ceilometer_central_log = simple_file("/var/log/ceilometer/central.log")
    ceilometer_collector_log = simple_file("/var/log/ceilometer/collector.log")
    ceilometer_conf = first_file([
        "/var/lib/config-data/ceilometer/etc/ceilometer/ceilometer.conf",
        "/etc/ceilometer/ceilometer.conf"
    ])
    ceph_socket_files = listdir("/var/run/ceph/ceph-*.*.asok",
                                context=HostContext)
    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-pretty")
    ceph_health_detail = simple_command(
        "/usr/bin/ceph health detail -f json-pretty")
    ceph_osd_dump = simple_command("/usr/bin/ceph osd dump -f json-pretty")
    ceph_osd_df = simple_command("/usr/bin/ceph osd df -f json-pretty")
    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-pretty")
    ceph_osd_log = glob_file(r"var/log/ceph/ceph-osd*.log")
    ceph_osd_tree = simple_command("/usr/bin/ceph osd tree -f json-pretty")
    ceph_s = simple_command("/usr/bin/ceph -s -f json-pretty")
    ceph_v = simple_command("/usr/bin/ceph -v")
    certificates_enddate = simple_command(
        "/usr/bin/find /etc/origin/node /etc/origin/master /etc/pki -type f -exec /usr/bin/openssl x509 -noout -enddate -in '{}' \; -exec echo 'FileName= {}' \;"
    )
    chkconfig = simple_command("/sbin/chkconfig --list")
    chrony_conf = simple_file("/etc/chrony.conf")
    chronyc_sources = simple_command("/usr/bin/chronyc sources")
    cib_xml = simple_file("/var/lib/pacemaker/cib/cib.xml")
    cinder_conf = simple_file("/etc/cinder/cinder.conf")
    cinder_volume_log = simple_file("/var/log/cinder/volume.log")
    cluster_conf = simple_file("/etc/cluster/cluster.conf")
    cmdline = simple_file("/proc/cmdline")
    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")

    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")
    # why the /cpuinfo?
    cpuinfo = first_file(["/proc/cpuinfo", "/cpuinfo"])
    cpuinfo_max_freq = simple_file(
        "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq")
    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")
    dmidecode = simple_command("/usr/sbin/dmidecode")
    dmsetup_info = simple_command("/usr/sbin/dmsetup info -C")
    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")
    dumpdev = simple_command(
        "/bin/awk '/ext[234]/ { print $1; }' /proc/mounts")
    dumpe2fs_h = foreach_execute(dumpdev, "/sbin/dumpe2fs -h %s")
    engine_config_all = simple_command("/usr/bin/engine-config --all")
    engine_log = simple_file("/var/log/ovirt-engine/engine.log")
    etc_journald_conf = simple_file(r"etc/systemd/journald.conf")
    etc_journald_conf_d = glob_file(r"etc/systemd/journald.conf.d/*.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_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")
    fdisk_l = simple_command("/sbin/fdisk -l")
    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')
    fstab = simple_file("/etc/fstab")
    galera_cnf = first_file([
        "/var/lib/config-data/mysql/etc/my.cnf.d/galera.cnf",
        "/etc/my.cnf.d/galera.cnf"
    ])
    getcert_list = simple_command("/usr/bin/getcert list")
    getenforce = simple_command("/usr/sbin/getenforce")
    getsebool = simple_command("/usr/sbin/getsebool -a")
    glance_api_conf = simple_file("/etc/glance/glance-api.conf")
    glance_api_log = first_file(
        ["/var/log/containers/glance/api.log", "/var/log/glance/api.log"])
    glance_cache_conf = simple_file("/etc/glance/glance-cache.conf")
    glance_registry_conf = simple_file("/etc/glance/glance-registry.conf")
    gnocchi_conf = first_file([
        "/var/lib/config-data/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")
    grub_efi_conf = simple_file("/boot/efi/EFI/redhat/grub.conf")
    grub2_cfg = simple_file("/boot/grub2/grub.cfg")
    grub2_efi_cfg = simple_file("boot/efi/EFI/redhat/grub.cfg")
    grub_config_perms = simple_command(
        "/bin/ls -l /boot/grub2/grub.cfg")  # only RHEL7 and updwards
    grub1_config_perms = simple_command(
        "/bin/ls -l /boot/grub/grub.conf")  # RHEL6
    grubby_default_index = simple_command(
        "/usr/sbin/grubby --default-index")  # only RHEL7 and updwards
    hammer_ping = simple_command("/usr/bin/hammer ping")
    hammer_task_list = simple_command("/usr/bin/hammer --csv task list")
    haproxy_cfg = first_file([
        "/var/lib/config-data/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"
    ])
    heat_conf = first_file([
        "/var/lib/config-data/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("/usr/bin/hostname -f")
    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", "/etc/httpd/conf.d/*.conf"])
    httpd_conf_scl_httpd24 = glob_file([
        "/opt/rh/httpd24/root/etc/httpd/conf/httpd.conf",
        "/opt/rh/httpd24/root/etc/httpd/conf.d/*.conf"
    ])
    httpd_conf_scl_jbcs_httpd24 = glob_file([
        "/opt/rh/jbcs-httpd24/root/etc/httpd/conf/httpd.conf",
        "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/*.conf"
    ])
    httpd_error_log = simple_file("var/log/httpd/error_log")
    httpd_pid = simple_command("/usr/bin/pgrep -o httpd")
    httpd_limits = foreach_collect(httpd_pid, "/proc/%s/limits")
    virt_uuid_facts = simple_file("/etc/rhsm/facts/virt_uuid.facts")

    @datasource(ps_auxww)
    def httpd_cmd(broker):
        """Command: httpd_command"""
        ps = broker[DefaultSpecs.ps_auxww].content
        ps_httpds = set()
        for p in ps:
            p_splits = p.split(None, 10)
            if len(p_splits) >= 11:
                cmd = p_splits[10].split()[0]
                # Should compatible with RHEL6
                # e.g. /usr/sbin/httpd, /usr/sbin/httpd.worker and /usr/sbin/httpd.event
                #      and SCL's httpd24-httpd
                if os.path.basename(cmd).startswith('httpd'):
                    ps_httpds.add(cmd)
        # Running multiple httpd instances on RHEL is supported
        # https://access.redhat.com/solutions/21680
        return list(ps_httpds)

    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-*")
    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")
    ip_route_show_table_all = simple_command("/sbin/ip route show table all")
    ip_s_link = simple_command("/sbin/ip -s link")
    ipaupgrade_log = simple_file("/var/log/ipaupgrade.log")
    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")
    iscsiadm_m_session = simple_command("/usr/sbin/iscsiadm -m session")
    katello_service_status = simple_command("/usr/bin/katello-service status")
    kdump = simple_file("/etc/sysconfig/kdump")
    kdump_conf = simple_file("/etc/kdump.conf")
    kerberos_kdc_log = simple_file("var/log/krb5kdc.log")
    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/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"
    ])
    krb5 = glob_file([r"etc/krb5.conf", r"etc/krb5.conf.d/*.conf"])
    ksmstate = simple_file("/sys/kernel/mm/ksm/run")
    last_upload_globs = [
        "/etc/redhat-access-insights/.lastupload",
        "/etc/insights-client/.lastupload"
    ]
    lastupload = glob_file(last_upload_globs)
    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")
    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")
    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_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")
    lspci = simple_command("/sbin/lspci")
    lspci_kernel = simple_command("/sbin/lspci -k")
    lsof = simple_command("/usr/sbin/lsof")
    lssap = simple_command("/usr/sap/hostctrl/exe/lssap")
    lsscsi = simple_command("/usr/bin/lsscsi")
    ls_boot = simple_command("/bin/ls -lanR /boot")
    ls_docker_volumes = simple_command("/bin/ls -lanR /var/lib/docker/volumes")
    ls_dev = simple_command("/bin/ls -lanR /dev")
    ls_disk = simple_command("/bin/ls -lanR /dev/disk")
    ls_etc = simple_command("/bin/ls -lanR /etc")
    ls_sys_firmware = simple_command("/bin/ls -lanR /sys/firmware")
    ls_var_lib_mongodb = simple_command("/bin/ls -la /var/lib/mongodb")
    ls_usr_sbin = simple_command("/bin/ls -ln /usr/sbin")
    ls_var_log = simple_command("/bin/ls -la /var/log /var/log/audit")
    ls_var_spool_clientmq = simple_command(
        "/bin/ls -ln /var/spool/clientmqueue")
    ls_var_tmp = simple_command("/bin/ls -ln /var/tmp")
    ls_var_run = simple_command("/bin/ls -lnL /var/run")
    ls_var_spool_postfix_maildrop = simple_command(
        "/bin/ls -ln /var/spool/postfix/maildrop")
    ls_osroot = simple_command("/bin/ls -lan /")
    ls_var_www = simple_command(
        "/bin/ls -la /dev/null /var/www"
    )  # https://github.com/RedHatInsights/insights-core/issues/827
    lvdisplay = simple_command("/sbin/lvdisplay")
    lvm_conf = simple_file("/etc/lvm/lvm.conf")
    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 --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 --config='global{locking_type=0} devices{filter=[\"a|.*|\"]}'"
    )
    machine_id = first_file([
        "etc/redhat-access-insights/machine-id",
        "etc/insights-client/machine-id",
        "etc/redhat_access_proactive/machine-id"
    ])
    manila_conf = simple_file("/etc/manila/manila.conf")
    mariadb_log = simple_file("/var/log/mariadb/mariadb.log")
    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)
    mlx4_port = simple_command(
        "/usr/bin/find /sys/bus/pci/devices/*/mlx4_port[0-9] -print -exec cat {} \;"
    )
    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")
    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__v4__ll = simple_command("/sbin/multipath -v4 -ll")
    mysqladmin_vars = simple_command("/bin/mysqladmin variables")
    mysql_log = glob_file(
        ["/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")
    netconsole = simple_file("/etc/sysconfig/netconsole")
    netstat = simple_command("/bin/netstat -neopa")
    netstat_agn = simple_command("/bin/netstat -agn")
    netstat_i = simple_command("/bin/netstat -i")
    netstat_s = simple_command("/bin/netstat -s")
    networkmanager_dispatcher_d = glob_file(
        "/etc/NetworkManager/dispatcher.d/*-dhclient")
    neutron_conf = simple_file("/etc/neutron/neutron.conf")
    neutron_l3_agent_log = simple_file("/var/log/neutron/l3-agent.log")
    neutron_metadata_agent_ini = first_file([
        "/var/lib/config-data/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_ovs_agent_log = simple_file(
        "/var/log/neutron/openvswitch-agent.log")
    neutron_plugin_ini = simple_file("/etc/neutron/plugin.ini")
    neutron_server_log = simple_file("/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")
    nginx_conf = glob_file([
        "/etc/nginx/nginx.conf", "/opt/rh/nginx*/root/etc/nginx/nginx.conf",
        "/etc/opt/rh/rh-nginx*/nginx/nginx.conf"
    ])
    nmcli_dev_show = simple_command("/usr/bin/nmcli dev show")
    nova_api_log = first_file([
        "/var/log/containers/nova/nova-api.log", "/var/log/nova/nova-api.log"
    ])
    nova_compute_log = first_file([
        "/var/log/containers/nova/nova-compute.log",
        "/var/log/nova/nova-compute.log"
    ])
    nova_conf = first_file([
        "/var/lib/config-data/nova/etc/nova/nova.conf", "/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")
    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")
    numeric_user_group_name = simple_command(
        "/bin/grep -c '^[[:digit:]]' /etc/passwd /etc/group")
    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_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)
    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_hosts = simple_file("/root/.config/openshift/hosts")
    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")
    ovs_vsctl_show = simple_command("/usr/bin/ovs-vsctl show")
    pacemaker_log = simple_file("/var/log/pacemaker.log")

    @datasource(ps_auxww, context=HostContext)
    def package_and_java(broker):
        """Command: package_and_java"""
        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 'java' 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("rpm -qf {0}".format(
                resolved[0])) if resolved else None
            if cmd and pkg:
                results.add("{0} {1}".format(cmd, pkg[0]))
        return results

    package_provides_java = foreach_execute(package_and_java, "echo %s")
    pam_conf = simple_file("/etc/pam.conf")
    parted__l = simple_command("/sbin/parted -l -s")
    password_auth = simple_file("/etc/pam.d/password-auth")
    pcs_status = simple_command("/usr/sbin/pcs status")
    pluginconf_d = glob_file("/etc/yum/pluginconf.d/*.conf")
    postgresql_conf = first_file([
        "/var/lib/pgsql/data/postgresql.conf",
        "/opt/rh/postgresql92/root/var/lib/pgsql/data/postgresql.conf",
        "database/postgresql.conf"
    ])
    postgresql_log = first_of([
        glob_file("/var/lib/pgsql/data/pg_log/postgresql-*.log"),
        glob_file(
            "/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_log/postgresql-*.log"
        ),
        glob_file("/database/postgresql-*.log")
    ])
    md5chk_files = simple_command(
        "/bin/ls -H /usr/lib*/{libfreeblpriv3.so,libsoftokn3.so} /etc/pki/product*/69.pem /etc/fonts/fonts.conf /dev/null 2>/dev/null"
    )
    prelink_orig_md5 = None
    prev_uploader_log = simple_file(
        "var/log/redhat-access-insights/redhat-access-insights.log.1")
    proc_snmp_ipv4 = simple_file("proc/net/snmp")
    proc_snmp_ipv6 = simple_file("proc/net/snmp6")
    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_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_logs = glob_file("/var/log/rabbitmq/rabbit@*.log",
                              ignore=".*rabbit@.*(?<!-sasl).log$")
    rabbitmq_policies = simple_command("/usr/sbin/rabbitmqctl list_policies")
    rabbitmq_queues = simple_command(
        "/usr/sbin/rabbitmqctl list_queues name messages consumers auto_delete"
    )
    rabbitmq_report = simple_command("/usr/sbin/rabbitmqctl report")
    rabbitmq_startup_err = simple_file("/var/log/rabbitmq/startup_err")
    rabbitmq_startup_log = simple_file("/var/log/rabbitmq/startup_log")
    rabbitmq_users = simple_command("/usr/sbin/rabbitmqctl list_users")
    rc_local = simple_file("/etc/rc.d/rc.local")
    redhat_release = simple_file("/etc/redhat-release")
    resolv_conf = simple_file("/etc/resolv.conf")
    rhv_log_collector_analyzer = simple_command(
        "rhv-log-collector-analyzer --json")
    rhn_charsets = simple_command("/usr/bin/rhn-charsets")
    rhn_conf = first_file(["/etc/rhn/rhn.conf", "/conf/rhn/rhn/rhn.conf"])
    rhn_entitlement_cert_xml = first_of([
        glob_file("/etc/sysconfig/rhn/rhn-entitlement-cert.xml*"),
        glob_file("/conf/rhn/sysconfig/rhn/rhn-entitlement-cert.xml*")
    ])
    rhn_hibernate_conf = first_file([
        "/usr/share/rhn/config-defaults/rhn_hibernate.conf",
        "/config-defaults/rhn_hibernate.conf"
    ])
    rhn_schema_stats = simple_command("/usr/bin/rhn-schema-stats -")
    rhn_schema_version = simple_command("/usr/bin/rhn-schema-version")
    rhn_server_satellite_log = simple_file(
        "var/log/rhn/rhn_server_satellite.log")
    rhn_server_xmlrpc_log = first_file([
        "/var/log/rhn/rhn_server_xmlrpc.log",
        "/rhn-logs/rhn/rhn_server_xmlrpc.log"
    ])
    rhn_search_daemon_log = first_file([
        "/var/log/rhn/search/rhn_search_daemon.log",
        "/rhn-logs/rhn/search/rhn_search_daemon.log"
    ])
    rhn_taskomatic_daemon_log = first_file([
        "/var/log/rhn/rhn_taskomatic_daemon.log",
        "rhn-logs/rhn/rhn_taskomatic_daemon.log"
    ])
    rhsm_conf = simple_file("/etc/rhsm/rhsm.conf")
    rhsm_log = simple_file("/var/log/rhsm/rhsm.log")
    root_crontab = simple_command("/usr/bin/crontab -l -u root")
    route = simple_command("/sbin/route -n")
    rpm_V_packages = simple_command(
        "/usr/bin/rpm -V coreutils procps procps-ng shadow-utils passwd sudo")
    rsyslog_conf = simple_file("/etc/rsyslog.conf")
    samba = simple_file("/etc/samba/smb.conf")
    sap_host_profile = simple_file("/usr/sap/hostctrl/exe/host_profile")
    saphostctl_getcimobject_sapinstance = simple_command(
        "/usr/sap/hostctrl/exe/saphostctrl -function GetCIMObject -enuminstances SAPInstance"
    )
    saphostexec_status = simple_command(
        "/usr/sap/hostctrl/exe/saphostexec -status")
    saphostexec_version = simple_command(
        "/usr/sap/hostctrl/exe/saphostexec -version")
    satellite_version_rb = simple_file(
        "/usr/share/foreman/lib/satellite/version.rb")
    block_devices = listdir("/sys/block")
    scheduler = foreach_collect(block_devices, "/sys/block/%s/queue/scheduler")
    scsi = simple_file("/proc/scsi/scsi")
    secure = simple_file("/var/log/secure")
    selinux_config = simple_file("/etc/selinux/config")
    sestatus = simple_command("/usr/sbin/sestatus -b")

    @datasource(HostContext)
    def block(broker):
        """Path: /sys/block directories starting with . or ram or dm- or loop"""
        remove = (".", "ram", "dm-", "loop")
        tmp = "/dev/%s"
        return [(tmp % f) for f in os.listdir("/sys/block")
                if not f.startswith(remove)]

    smbstatus_p = simple_command("/usr/bin/smbstatus -p")
    smbstatus_S = simple_command("/usr/bin/smbstatus -S")
    smartctl = foreach_execute(block, "/sbin/smartctl -a %s", keep_rc=True)
    smartpdc_settings = simple_file(
        "/etc/smart_proxy_dynflow_core/settings.yml")
    softnet_stat = simple_file("proc/net/softnet_stat")
    software_collections_list = simple_command('/usr/bin/scl --list')
    spfile_ora = glob_file("${ORACLE_HOME}/dbs/spfile*.ora")
    ss = simple_command("/usr/sbin/ss -tulpn")
    ss_tupna = simple_command("/usr/sbin/ss -tupna")
    ssh_config = simple_file("/etc/ssh/ssh_config")
    sshd_config = simple_file("/etc/ssh/sshd_config")
    sshd_config_perms = simple_command("/bin/ls -l /etc/ssh/sshd_config")
    sssd_config = simple_file("/etc/sssd/sssd.conf")
    subscription_manager_list_consumed = simple_command(
        '/usr/bin/subscription-manager list --consumed')
    subscription_manager_list_installed = simple_command(
        '/usr/bin/subscription-manager list --installed')
    subscription_manager_release_show = simple_command(
        '/usr/bin/subscription-manager release --show')
    subscription_manager_repos_list_enabled = simple_command(
        '/usr/bin/subscription-manager repos --list-enabled')
    swift_object_expirer_conf = first_file([
        "/var/lib/config-data/swift/etc/swift/object-expirer.conf",
        "/etc/swift/object-expirer.conf"
    ])
    swift_proxy_server_conf = first_file([
        "/var/lib/config-data/swift/etc/swift/proxy-server.conf",
        "/etc/swift/proxy-server.conf"
    ])
    sysconfig_chronyd = simple_file("/etc/sysconfig/chronyd")
    sysconfig_httpd = simple_file("/etc/sysconfig/httpd")
    sysconfig_irqbalance = simple_file("etc/sysconfig/irqbalance")
    sysconfig_kdump = simple_file("etc/sysconfig/kdump")
    sysconfig_memcached = first_file([
        "/var/lib/config-data/memcached/etc/sysconfig/memcached",
        "/etc/sysconfig/memcached"
    ])
    sysconfig_ntpd = simple_file("/etc/sysconfig/ntpd")
    sysconfig_virt_who = simple_file("/etc/sysconfig/virt-who")
    sysctl = simple_command("/sbin/sysctl -a")
    sysctl_conf = simple_file("/etc/sysctl.conf")
    sysctl_conf_initramfs = simple_command(
        "/bin/lsinitrd /boot/initramfs-*kdump.img -f /etc/sysctl.conf /etc/sysctl.d/*.conf"
    )
    systemctl_cinder_volume = simple_command(
        "/bin/systemctl show openstack-cinder-volume")
    systemctl_httpd = simple_command("/bin/systemctl show httpd")
    systemctl_list_unit_files = simple_command(
        "/bin/systemctl list-unit-files")
    systemctl_list_units = simple_command("/bin/systemctl list-units")
    systemctl_mariadb = simple_command("/bin/systemctl show mariadb")
    systemctl_pulp_workers = simple_command("/bin/systemctl show pulp_workers")
    systemctl_pulp_resmg = simple_command(
        "/bin/systemctl show pulp_resource_manager")
    systemctl_pulp_celerybeat = simple_command(
        "/bin/systemctl show pulp_celerybeat")
    systemctl_qpidd = simple_command("/bin/systemctl show qpidd")
    systemctl_qdrouterd = simple_command("/bin/systemctl show qdrouterd")
    systemctl_smartpdc = simple_command(
        "/bin/systemctl show smart_proxy_dynflow_core")
    systemd_docker = simple_file("/usr/lib/systemd/system/docker.service")
    systemd_openshift_node = simple_file(
        "/usr/lib/systemd/system/atomic-openshift-node.service")
    systemd_system_conf = simple_file("/etc/systemd/system.conf")
    systemid = first_of([
        simple_file("/etc/sysconfig/rhn/systemid"),
        simple_file("/conf/rhn/sysconfig/rhn/systemid")
    ])
    teamdctl_state_dump = foreach_execute(ethernet_interfaces,
                                          "/usr/bin/teamdctl %s state dump")
    thp_use_zero_page = simple_file(
        "/sys/kernel/mm/transparent_hugepage/use_zero_page")
    thp_enabled = simple_file("/sys/kernel/mm/transparent_hugepage/enabled")
    tmpfilesd = glob_file([
        "/etc/tmpfiles.d/*.conf", "/usr/lib/tmpfiles.d/*.conf",
        "/run/tmpfiles.d/*.conf"
    ])
    tomcat_web_xml = first_of([
        glob_file("/etc/tomcat*/web.xml"),
        glob_file("/conf/tomcat/tomcat*/web.xml")
    ])
    tomcat_server_xml = first_of([
        foreach_collect(tomcat_base, "%s/conf/server.xml"),
        glob_file("conf/tomcat/tomcat*/server.xml", context=HostArchiveContext)
    ])

    @datasource(ps_auxww)
    def tomcat_home_base(broker):
        """Command: tomcat_home_base_paths"""
        ps = broker[DefaultSpecs.ps_auxww].content
        results = []
        findall = re.compile(r"\-Dcatalina\.(home|base)=(\S+)").findall
        for p in ps:
            found = findall(p)
            if found:
                # Only get the path which is absolute
                results.extend(f[1] for f in found if f[1][0] == '/')
        return list(set(results))

    tomcat_vdc_targeted = foreach_execute(
        tomcat_home_base,
        "/bin/grep -R -s 'VirtualDirContext' --include '*.xml' %s")
    tomcat_vdc_fallback = simple_command(
        "/usr/bin/find /usr/share -maxdepth 1 -name 'tomcat*' -exec /bin/grep -R -s 'VirtualDirContext' --include '*.xml' '{}' +"
    )
    tuned_adm = simple_command("/usr/sbin/tuned-adm list")
    udev_persistent_net_rules = simple_file(
        "/etc/udev/rules.d/70-persistent-net.rules")
    uname = simple_command("/usr/bin/uname -a")
    up2date = simple_file("/etc/sysconfig/rhn/up2date")
    up2date_log = simple_file("/var/log/up2date")
    uploader_log = simple_file(
        "/var/log/redhat-access-insights/redhat-access-insights.log")
    uptime = simple_command("/usr/bin/uptime")
    usr_journald_conf_d = glob_file(
        r"usr/lib/systemd/journald.conf.d/*.conf"
    )  # note that etc_journald.conf.d also exists
    vgdisplay = simple_command("/sbin/vgdisplay")
    vdsm_conf = simple_file("etc/vdsm/vdsm.conf")
    vdsm_id = simple_file("etc/vdsm/vdsm.id")
    vdsm_log = simple_file("var/log/vdsm/vdsm.log")
    vdsm_logger_conf = simple_file("etc/vdsm/logger.conf")
    vmware_tools_conf = simple_file("etc/vmware-tools/tools.conf")
    vgs = None  # simple_command('/sbin/vgs -v -o +vg_mda_count,vg_mda_free,vg_mda_size,vg_mda_used_count,vg_tags --config="global{locking_type=0}"')
    vgs_noheadings = simple_command(
        "/sbin/vgs --nameprefixes --noheadings --separator='|' -a -o vg_all --config=\"global{locking_type=0}\""
    )
    vgs_noheadings_all = simple_command(
        "/sbin/vgs --nameprefixes --noheadings --separator='|' -a -o vg_all --config='global{locking_type=0} devices{filter=[\"a|.*|\"]}'"
    )
    virsh_list_all = simple_command("/usr/bin/virsh --readonly list --all")
    virt_what = simple_command("/usr/sbin/virt-what")
    virt_who_conf = glob_file([r"etc/virt-who.conf", r"etc/virt-who.d/*.conf"])
    vmcore_dmesg = glob_file("/var/crash/*/vmcore-dmesg.txt")
    vsftpd = simple_file("/etc/pam.d/vsftpd")
    vsftpd_conf = simple_file("/etc/vsftpd/vsftpd.conf")
    woopsie = simple_command(
        r"/usr/bin/find /var/crash /var/tmp -path '*.reports-*/whoopsie-report'"
    )
    x86_pti_enabled = simple_file("sys/kernel/debug/x86/pti_enabled")
    x86_ibpb_enabled = simple_file("sys/kernel/debug/x86/ibpb_enabled")
    x86_ibrs_enabled = simple_file("sys/kernel/debug/x86/ibrs_enabled")
    x86_retp_enabled = simple_file("sys/kernel/debug/x86/retp_enabled")

    xinetd_conf = glob_file(["/etc/xinetd.conf", "/etc/xinetd.d/*"])
    yum_conf = simple_file("/etc/yum.conf")
    yum_log = simple_file("/var/log/yum.log")
    yum_repolist = simple_command("/usr/bin/yum -C repolist")
    yum_repos_d = glob_file("/etc/yum.repos.d/*")
    zipl_conf = simple_file("/etc/zipl.conf")

    rpm_format = format_rpm()

    host_installed_rpms = simple_command("/usr/bin/rpm -qa --qf '%s'" %
                                         rpm_format,
                                         context=HostContext)

    @datasource(DockerImageContext)
    def docker_installed_rpms(broker):
        """ Command: /usr/bin/rpm -qa --root `%s` --qf `%s`"""
        ctx = broker[DockerImageContext]
        root = ctx.root
        fmt = DefaultSpecs.rpm_format
        cmd = "/usr/bin/rpm -qa --root %s --qf '%s'" % (root, fmt)
        result = ctx.shell_out(cmd)
        return CommandOutputProvider(cmd, ctx, content=result)

    # unify the different installed rpm provider types
    installed_rpms = first_of([host_installed_rpms, docker_installed_rpms])

    @datasource(ps_auxww, context=HostContext)
    def jboss_home(broker):
        """Command: JBoss home progress command content paths"""
        ps = broker[DefaultSpecs.ps_auxww].content
        results = []
        findall = re.compile(r"\-Djboss\.home\.dir=(\S+)").findall
        # JBoss progress command content should contain jboss.home.dir
        # and any of string ['-D[Standalone]', '-D[Host Controller]', '-D[Server:']
        for p in ps:
            if any(i in p for i in
                   ['-D[Standalone]', '-D[Host Controller]', '-D[Server:']):
                found = findall(p)
                if found:
                    # Only get the path which is absolute
                    results.extend(f for f in found if f[0] == '/')
        return list(set(results))

    jboss_version = foreach_collect(jboss_home, "%s/version.txt")

    @datasource(ps_auxww, context=HostContext, multi_output=True)
    def jboss_domain_server_log_dir(broker):
        """Command: JBoss domain server log directory"""
        ps = broker[DefaultSpecs.ps_auxww].content
        results = []
        findall = re.compile(r"\-Djboss\.server\.log\.dir=(\S+)").findall
        # JBoss domain server progress command content should contain jboss.server.log.dir
        for p in ps:
            if '-D[Server:' in p:
                found = findall(p)
                if found:
                    # Only get the path which is absolute
                    results.extend(f for f in found if f[0] == '/')
        return list(set(results))

    jboss_domain_server_log = foreach_collect(jboss_domain_server_log_dir,
                                              "%s/server.log*")

    @datasource(ps_auxww, context=HostContext, multi_output=True)
    def jboss_standalone_main_config_files(broker):
        """Command: JBoss standalone main config files"""
        ps = broker[DefaultSpecs.ps_auxww].content
        results = []
        search = re.compile(r"\-Djboss\.server\.base\.dir=(\S+)").search
        # JBoss progress command content should contain jboss.home.dir
        for p in ps:
            if '-D[Standalone]' in p:
                match = search(p)
                # Only get the path which is absolute
                if match and match.group(1)[0] == "/":
                    main_config_path = match.group(1)
                    main_config_file = "standalone.xml"
                    if " -c " in p:
                        main_config_file = p.split(" -c ")[1].split()[0]
                    elif "--server-config" in p:
                        main_config_file = p.split(
                            "--server-config=")[1].split()[0]
                    results.append(main_config_path + "/" + main_config_file)
        return list(set(results))

    jboss_standalone_main_config = foreach_collect(
        jboss_standalone_main_config_files, "%s")
class SosSpecs(Specs):
    auditctl_status = simple_file("sos_commands/auditd/auditctl_-s")
    blkid = simple_file("sos_commands/block/blkid_-c_.dev.null")
    candlepin_log = first_of([
        simple_file("/var/log/candlepin/candlepin.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/candlepin/candlepin.log"
        )
    ])
    candlepin_error_log = first_of([
        simple_file("var/log/candlepin/error.log"),
        simple_file(
            r"sos_commands/foreman/foreman-debug/var/log/candlepin/error.log")
    ])
    catalina_out = glob_file("tomcat-logs/tomcat*/catalina.out")
    catalina_server_log = glob_file("tomcat-logs/tomcat*/catalina*.log")
    chkconfig = simple_file("sos_commands/startup/chkconfig_--list")
    date = simple_file("sos_commands/general/date")
    df__al = first_file([
        "sos_commands/filesys/df_-al", "sos_commands/filesys/df_-al_-x_autofs"
    ])
    df__alP = simple_file("sos_commands/filesys/df_-alP")
    df__li = first_file([
        "sos_commands/filesys/df_-li", "sos_commands/filesys/df_-ali_-x_autofs"
    ])
    display_java = simple_file("sos_commands/java/alternatives_--display_java")
    docker_info = simple_file("sos_commands/docker/docker_info")
    docker_list_containers = first_file(
        ["sos_commands/docker/docker_ps", "sos_commands/docker/docker_ps_-a"])
    dmesg = simple_file("sos_commands/kernel/dmesg")
    dmidecode = simple_file("dmidecode")
    dmsetup_info = simple_file("sos_commands/devicemapper/dmsetup_info_-c")
    dumpe2fs_h = glob_file("sos_commands/filesys/dumpe2fs_-h_*")
    ethtool = glob_file("sos_commands/networking/ethtool_*",
                        ignore="ethtool_-.*")
    ethtool_S = glob_file("sos_commands/networking/ethtool_-S_*")
    ethtool_a = glob_file("sos_commands/networking/ethtool_-a_*")
    ethtool_c = glob_file("sos_commands/networking/ethtool_-c_*")
    ethtool_g = glob_file("sos_commands/networking/ethtool_-g_*")
    ethtool_i = glob_file("sos_commands/networking/ethtool_-i_*")
    ethtool_k = glob_file("sos_commands/networking/ethtool_-k_*")
    fdisk_l_sos = glob_file(r"sos_commands/filesys/fdisk_-l_*")
    foreman_production_log = first_of([
        simple_file("/var/log/foreman/production.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman/production.log"
        )
    ])
    foreman_proxy_conf = first_of([
        simple_file("/etc/foreman-proxy/settings.yml"),
        simple_file(
            "sos_commands/foreman/foreman-debug/etc/foreman-proxy/settings.yml"
        )
    ])
    foreman_proxy_log = first_of([
        simple_file("/var/log/foreman-proxy/proxy.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman-proxy/proxy.log"
        )
    ])
    foreman_satellite_log = first_of([
        simple_file("/var/log/foreman-installer/satellite.log"),
        simple_file(
            "sos_commands/foreman/foreman-debug/var/log/foreman-installer/satellite.log"
        )
    ])
    foreman_ssl_access_ssl_log = first_file([
        "var/log/httpd/foreman-ssl_access_ssl.log",
        r"sos_commands/foreman/foreman-debug/var/log/httpd/foreman-ssl_access_ssl.log"
    ])
    getcert_list = simple_file("sos_commands/ipa/ipa-getcert_list")
    gluster_v_info = simple_file("sos_commands/gluster/gluster_volume_info")
    gluster_v_status = simple_file(
        "sos_commands/gluster/gluster_volume_status")
    hostname = first_file([
        "sos_commands/general/hostname_-f", "sos_commands/general/hostname",
        "hostname"
    ])
    httpd_conf_sos = glob_file(
        ["/conf/httpd/conf/httpd.conf", "/conf/httpd/conf.d/*.conf"])
    installed_rpms = simple_file("installed-rpms")
    ip_addr = first_of([
        simple_file("sos_commands/networking/ip_-d_address"),
        simple_file("sos_commands/networking/ip_address")
    ])
    ip_route_show_table_all = simple_file(
        "sos_commands/networking/ip_route_show_table_all")
    journal_since_boot = simple_file(
        "sos_commands/logs/journalctl_--no-pager_--boot")
    locale = simple_file("sos_commands/i18n/locale")
    lsblk = simple_file("sos_commands/block/lsblk")
    lsof = simple_file("lsof")
    lsmod = simple_file("lsmod")
    lspci = first_of([
        simple_file("sos_commands/pci/lspci_-nnvv"),
        simple_file("sos_commands/pci/lspci_-nvv"),
        simple_file("sos_commands/pci/lspci")
    ])
    lsscsi = simple_file("sos_commands/scsi/lsscsi")
    ls_dev = simple_file("sos_commands/block/ls_-lanR_.dev")
    lvs = simple_file(
        "sos_commands/lvm2/lvs_-a_-o_lv_tags_devices_--config_global_locking_type_0"
    )
    mount = simple_file("mount")
    multipath__v4__ll = simple_file("sos_commands/multipath/multipath_-v4_-ll")
    netstat = simple_file("netstat")
    netstat_agn = simple_file("sos_commands/networking/netstat_-agn")
    netstat_i = simple_file("sos_commands/networking/netstat_-i")
    netstat_s = simple_file("sos_commands/networking/netstat_-s")
    nmcli_dev_show = simple_file("sos_commands/networking/nmcli_dev_show")
    ntptime = simple_file("sos_commands/ntp/ntptime")
    pcs_config = first_file([
        "sos_commands/pacemaker/pcs_config", "sos_commands/cluster/pcs_config"
    ])
    pcs_status = first_file([
        "sos_commands/pacemaker/pcs_status", "sos_commands/cluster/pcs_status"
    ])
    ps_aux = first_file([
        "sos_commands/process/ps_aux", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_auxcww"
    ])
    ps_auxcww = first_file([
        "sos_commands/process/ps_auxcww", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_aux"
    ])
    ps_auxww = first_file([
        "sos_commands/process/ps_auxww", "sos_commands/process/ps_auxwww",
        "sos_commands/process/ps_aux", "sos_commands/process/ps_auxcww"
    ])
    puppet_ssl_cert_ca_pem = simple_file(
        "sos_commands/foreman/foreman-debug/var/lib/puppet/ssl/certs/ca.pem")
    pvs = simple_file(
        "sos_commands/lvm2/pvs_-a_-v_-o_pv_mda_free_pv_mda_size_pv_mda_count_pv_mda_used_count_pe_start_--config_global_locking_type_0"
    )
    qpid_stat_q = first_of([
        simple_file("qpid_stat_queues"),
        simple_file("qpid-stat-q"),
        simple_file("sos_commands/foreman/foreman-debug/qpid_stat_queues"),
        simple_file("sos_commands/foreman/foreman-debug/qpid-stat-q")
    ])
    qpid_stat_u = first_of([
        simple_file("qpid_stat_subscriptions"),
        simple_file("qpid-stat-u"),
        simple_file(
            "sos_commands/foreman/foreman-debug/qpid_stat_subscriptions"),
        simple_file("sos_commands/foreman/foreman-debug/qpid-stat-u")
    ])
    rhn_charsets = simple_file("database-character-sets")
    root_crontab = simple_file("sos_commands/cron/root_crontab")
    route = simple_file("sos_commands/networking/route_-n")
    sestatus = simple_file("sos_commands/selinux/sestatus_-b")
    subscription_manager_list_consumed = first_file([
        'sos_commands/yum/subscription-manager_list_--consumed',
        'sos_commands/subscription_manager/subscription-manager_list_--consumed',
        'sos_commands/general/subscription-manager_list_--consumed'
    ])
    subscription_manager_list_installed = first_file([
        'sos_commands/yum/subscription-manager_list_--installed',
        'sos_commands/subscription_manager/subscription-manager_list_--installed',
        'sos_commands/general/subscription-manager_list_--installed'
    ])
    sysctl = simple_file("sos_commands/kernel/sysctl_-a")
    systemctl_list_unit_files = simple_file(
        "sos_commands/systemd/systemctl_list-unit-files")
    systemctl_list_units = simple_file(
        "sos_commands/systemd/systemctl_list-units")
    uname = simple_file("sos_commands/kernel/uname_-a")
    uptime = simple_file("sos_commands/general/uptime")
    var_qemu_xml = glob_file(r"var/run/libvirt/qemu/*.xml")
    vdsm_import_log = glob_file("var/log/vdsm/import/import-*.log")
    vgdisplay = simple_file("vgdisplay")
    vgs = simple_file(
        "sos_commands/lvm2/vgs_-v_-o_vg_mda_count_vg_mda_free_vg_mda_size_vg_mda_used_count_vg_tags_--config_global_locking_type_0"
    )
    xfs_info = glob_file("sos_commands/xfs/xfs_info*")
    yum_repolist = simple_file("sos_commands/yum/yum_-C_repolist")
Exemple #7
0
class SosSpecs(Specs):
    blkid = simple_file("sos_commands/block/blkid_-c_.dev.null")
    candlepin_error_log = first_of([
        simple_file("var/log/candlepin/error.log"),
        simple_file(
            r"sos_commands/foreman/foreman-debug/var/log/candlepin/error.log")
    ])
    catalina_out = glob_file("tomcat-logs/tomcat*/catalina.out")
    catalina_server_log = glob_file("tomcat-logs/tomcat*/catalina*.log")
    chkconfig = simple_file("sos_commands/startup/chkconfig_--list")
    date = simple_file("sos_commands/general/date")
    df__al = simple_file("sos_commands/filesys/df_-al")
    df__alP = simple_file("sos_commands/filesys/df_-alP")
    df__li = simple_file("sos_commands/filesys/df_-li")
    display_java = simple_file("sos_commands/java/alternatives_--display_java")
    dmesg = simple_file("sos_commands/kernel/dmesg")
    dmidecode = simple_file("dmidecode")
    dumpe2fs_h = glob_file("sos_commands/filesys/dumpe2fs_-h_*")
    ethtool = glob_file("sos_commands/networking/ethtool_*",
                        ignore="ethtool_-.*")
    ethtool_S = glob_file("sos_commands/networking/ethtool_-S_*")
    ethtool_a = glob_file("sos_commands/networking/ethtool_-a_*")
    ethtool_c = glob_file("sos_commands/networking/ethtool_-c_*")
    ethtool_g = glob_file("sos_commands/networking/ethtool_-g_*")
    ethtool_i = glob_file("sos_commands/networking/ethtool_-i_*")
    ethtool_k = glob_file("sos_commands/networking/ethtool_-k_*")
    fdisk_l_sos = glob_file(r"sos_commands/filesys/fdisk_-l_*")
    foreman_ssl_access_ssl_log = first_file([
        "var/log/httpd/foreman-ssl_access_ssl.log",
        r"sos_commands/foreman/foreman-debug/var/log/httpd/foreman-ssl_access_ssl.log"
    ])
    getcert_list = simple_file("sos_commands/ipa/ipa-getcert_list")
    hostname = first_of([
        simple_file("sos_commands/general/hostname_-f"),
        simple_file("sos_commands/general/hostname")
    ])
    httpd_conf_sos = glob_file(
        ["/conf/httpd/conf/httpd.conf", "/conf/httpd/conf.d/*.conf"])
    installed_rpms = simple_file("installed-rpms")
    journal_since_boot = simple_file(
        "sos_commands/logs/journalctl_--no-pager_--boot")
    locale = simple_file("sos_commands/i18n/locale")
    lsblk = simple_file("sos_commands/block/lsblk")
    lsof = simple_file("lsof")
    lsmod = simple_file("lsmod")
    lspci = simple_file("lspci")
    lvs = simple_file(
        "sos_commands/lvm2/lvs_-a_-o_lv_tags_devices_--config_global_locking_type_0"
    )
    mount = simple_file("mount")
    multipath__v4__ll = simple_file("sos_commands/multipath/multipath_-v4_-ll")
    netstat = simple_file("netstat")
    netstat_agn = simple_file("sos_commands/networking/netstat_-agn")
    netstat_i = simple_file("sos_commands/networking/netstat_-i")
    netstat_s = simple_file("sos_commands/networking/netstat_-s")
    nmcli_dev_show = simple_file("sos_commands/networking/nmcli_dev_show")
    ntptime = simple_file("sos_commands/ntp/ntptime")
    ps_auxww = first_file([
        "sos_commands/process/ps_auxwww", "sos_commands/process/ps_aux",
        "sos_commands/process/ps_auxcww"
    ])
    puppet_ssl_cert_ca_pem = simple_file(
        "sos_commands/foreman/foreman-debug/var/lib/puppet/ssl/certs/ca.pem")
    pvs = simple_file(
        "sos_commands/lvm2/pvs_-a_-v_-o_pv_mda_free_pv_mda_size_pv_mda_count_pv_mda_used_count_pe_start_--config_global_locking_type_0"
    )
    qpid_stat_q = simple_file("sos_commands/foreman/foreman-debug/qpid-stat-q")
    qpid_stat_u = simple_file("sos_commands/foreman/foreman-debug/qpid-stat-u")
    root_crontab = simple_file("sos_commands/cron/root_crontab")
    route = simple_file("sos_commands/networking/route_-n")
    sestatus = simple_file("sos_commands/selinux/sestatus_-b")
    subscription_manager_list_consumed = first_file([
        'sos_commands/yum/subscription-manager_list_--consumed',
        'sos_commands/subscription_manager/subscription-manager_list_--consumed',
        'sos_commands/general/subscription-manager_list_--consumed'
    ])
    subscription_manager_list_installed = first_file([
        'sos_commands/yum/subscription-manager_list_--installed',
        'sos_commands/subscription_manager/subscription-manager_list_--installed',
        'sos_commands/general/subscription-manager_list_--installed'
    ])
    sysctl = simple_file("sos_commands/kernel/sysctl_-a")
    uname = simple_file("sos_commands/kernel/uname_-a")
    uptime = simple_file("sos_commands/general/uptime")
    vgdisplay = simple_file("vgdisplay")
    vgs = simple_file(
        "sos_commands/lvm2/vgs_-v_-o_vg_mda_count_vg_mda_free_vg_mda_size_vg_mda_used_count_vg_tags_--config_global_locking_type_0"
    )
    yum_repolist = simple_file("sos_commands/yum/yum_-C_repolist")
Exemple #8
0
class DefaultSpecs(Specs):
    abrt_ccpp_conf = simple_file("/etc/abrt/plugins/CCpp.conf")
    abrt_status_bare = simple_command("/usr/bin/abrt status --bare=True")
    alternatives_display_python = simple_command("/usr/sbin/alternatives --display python")
    amq_broker = glob_file("/var/opt/amq-broker/*/etc/broker.xml")
    dse_ldif = glob_file("/etc/dirsrv/*/dse.ldif")
    auditctl_status = simple_command("/sbin/auditctl -s")
    auditd_conf = simple_file("/etc/audit/auditd.conf")
    audit_log = simple_file("/var/log/audit/audit.log")
    avc_hash_stats = simple_file("/sys/fs/selinux/avc/hash_stats")
    avc_cache_threshold = simple_file("/sys/fs/selinux/avc/cache_threshold")
    aws_instance_id_doc = simple_command("/usr/bin/curl -s http://169.254.169.254/latest/dynamic/instance-identity/document --connect-timeout 5", deps=[IsAWS])
    aws_instance_id_pkcs7 = simple_command("/usr/bin/curl -s http://169.254.169.254/latest/dynamic/instance-identity/pkcs7 --connect-timeout 5", deps=[IsAWS])
    awx_manage_check_license = simple_command("/usr/bin/awx-manage check_license")
    awx_manage_check_license_data = awx_manage.awx_manage_check_license_data_datasource
    awx_manage_print_settings = simple_command("/usr/bin/awx-manage print_settings INSIGHTS_TRACKING_STATE SYSTEM_UUID INSTALL_UUID TOWER_URL_BASE AWX_CLEANUP_PATHS AWX_PROOT_BASE_PATH LOG_AGGREGATOR_ENABLED LOG_AGGREGATOR_LEVEL --format json")
    azure_instance_type = simple_command("/usr/bin/curl -s -H Metadata:true http://169.254.169.254/metadata/instance/compute/vmSize?api-version=2018-10-01&format=text --connect-timeout 5", deps=[IsAzure])
    azure_instance_plan = simple_command("/usr/bin/curl -s -H Metadata:true http://169.254.169.254/metadata/instance/compute/plan?api-version=2018-10-01&format=json --connect-timeout 5", deps=[IsAzure])
    bios_uuid = simple_command("/usr/sbin/dmidecode -s system-uuid")
    blkid = simple_command("/sbin/blkid -c /dev/null")
    bond = glob_file("/proc/net/bonding/bond*")
    bond_dynamic_lb = glob_file("/sys/class/net/bond[0-9]*/bonding/tlb_dynamic_lb")
    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_broker = candlepin_broker.candlepin_broker
    candlepin_log = simple_file("/var/log/candlepin/candlepin.log")
    cgroups = simple_file("/proc/cgroups")
    ps_alxwww = simple_command("/bin/ps alxwww")
    ps_aux = simple_command("/bin/ps aux")
    ps_auxcww = simple_command("/bin/ps auxcww")
    ps_auxww = simple_command("/bin/ps auxww")
    ps_ef = simple_command("/bin/ps -ef")
    ps_eo = simple_command("/usr/bin/ps -eo pid,ppid,comm")
    ps_eo_cmd = ps_datasource.ps_eo_cmd
    cciss = glob_file("/proc/driver/cciss/cciss*")
    cdc_wdm = simple_file("/sys/bus/usb/drivers/cdc_wdm/module/refcnt")
    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_conf = first_file(["/var/lib/config-data/puppet-generated/ceph/etc/ceph/ceph.conf", "/etc/ceph/ceph.conf"])
    ceph_df_detail = simple_command("/usr/bin/ceph df detail -f json")
    ceph_health_detail = simple_command("/usr/bin/ceph health detail -f json")
    ceph_insights = simple_command("/usr/bin/ceph insights", deps=[IsCephMonitor])
    ceph_log = glob_file(r"var/log/ceph/ceph.log*")
    ceph_osd_dump = simple_command("/usr/bin/ceph osd dump -f json")
    ceph_osd_ec_profile_ls = simple_command("/usr/bin/ceph osd erasure-code-profile ls")
    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")
    ceph_v = simple_command("/usr/bin/ceph -v")
    certificates_enddate = simple_command("/usr/bin/find /etc/origin/node /etc/origin/master /etc/pki /etc/ipa /etc/tower/tower.cert -type f -exec /usr/bin/openssl x509 -noout -enddate -in '{}' \; -exec echo 'FileName= {}' \;", keep_rc=True)
    chkconfig = simple_command("/sbin/chkconfig --list")
    chrony_conf = simple_file("/etc/chrony.conf")
    chronyc_sources = simple_command("/usr/bin/chronyc sources")
    cib_xml = simple_file("/var/lib/pacemaker/cib/cib.xml")
    cinder_api_log = first_file(["/var/log/containers/cinder/cinder-api.log", "/var/log/cinder/cinder-api.log"])
    cinder_conf = first_file(["/var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf", "/etc/cinder/cinder.conf"])
    cinder_volume_log = first_file(["/var/log/containers/cinder/volume.log", "/var/log/containers/cinder/cinder-volume.log", "/var/log/cinder/volume.log"])
    cloud_cfg = cloud_init.cloud_cfg
    cloud_init_custom_network = simple_file("/etc/cloud/cloud.cfg.d/99-custom-networking.cfg")
    cloud_init_log = simple_file("/var/log/cloud-init.log")
    cluster_conf = simple_file("/etc/cluster/cluster.conf")
    cmdline = simple_file("/proc/cmdline")
    corosync = simple_file("/etc/sysconfig/corosync")

    @datasource(HostContext, [IsRhel7, IsRhel8, IsRhel9])
    def corosync_cmapctl_cmd_list(broker):
        """
        corosync-cmapctl add different arguments on RHEL7 and RHEL8.

        Returns:
            list: A list of related corosync-cmapctl commands based the RHEL version.
        """
        corosync_cmd = '/usr/sbin/corosync-cmapctl'
        if os.path.exists(corosync_cmd):
            if broker.get(IsRhel7):
                return [
                    corosync_cmd,
                    ' '.join([corosync_cmd, '-d runtime.schedmiss.timestamp']),
                    ' '.join([corosync_cmd, '-d runtime.schedmiss.delay'])]
            if broker.get(IsRhel8) or broker.get(IsRhel9):
                return [
                    corosync_cmd,
                    ' '.join([corosync_cmd, '-m stats']),
                    ' '.join([corosync_cmd, '-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_vulns = glob_file("sys/devices/system/cpu/vulnerabilities/*")
    cpuinfo = simple_file("/proc/cpuinfo")
    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")
    crypto_policies_config = simple_file("/etc/crypto-policies/config")
    crypto_policies_state_current = simple_file("/etc/crypto-policies/state/current")
    crypto_policies_opensshserver = simple_file("/etc/crypto-policies/back-ends/opensshserver.config")
    crypto_policies_bind = simple_file("/etc/crypto-policies/back-ends/bind.config")
    cups_ppd = glob_file("etc/cups/ppd/*")
    current_clocksource = simple_file("/sys/devices/system/clocksource/clocksource0/current_clocksource")
    date = simple_command("/bin/date")
    date_utc = simple_command("/bin/date --utc")
    designate_conf = first_file(["/var/lib/config-data/puppet-generated/designate/etc/designate/designate.conf",
                                 "/etc/designate/designate.conf"])
    df__al = simple_command("/bin/df -al -x autofs")
    df__alP = simple_command("/bin/df -alP -x autofs")
    df__li = simple_command("/bin/df -li -x autofs")
    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_errors = glob_file("var/log/dirsrv/*/errors*")
    dm_mod_use_blk_mq = simple_file("/sys/module/dm_mod/parameters/use_blk_mq")
    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")
    dmsetup_status = simple_command("/usr/sbin/dmsetup status")
    dnf_conf = simple_file("/etc/dnf/dnf.conf")
    dnf_modules = glob_file("/etc/dnf/modules.d/*.module")
    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")
    doveconf = simple_command("/usr/bin/doveconf")
    docker_storage_setup = simple_file("/etc/sysconfig/docker-storage-setup")
    docker_sysconfig = simple_file("/etc/sysconfig/docker")
    dotnet_version = simple_command("/usr/bin/dotnet --version")
    dracut_kdump_capture_service = simple_file("/usr/lib/dracut/modules.d/99kdumpbase/kdump-capture.service")

    @datasource(HostContext)
    def du_dirs_list(broker):
        """ Provide a list of directorys for the ``du_dirs`` spec to scan """
        return ['/var/lib/candlepin/activemq-artemis']
    du_dirs = foreach_execute(du_dirs_list, "/bin/du -s -k %s")
    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")
    etc_journald_conf_d = glob_file(r"etc/systemd/journald.conf.d/*.conf")
    etc_machine_id = simple_file("/etc/machine-id")
    etc_udev_40_redhat_rules = first_file(["/etc/udev/rules.d/40-redhat.rules", "/run/udev/rules.d/40-redhat.rules",
                                       "/usr/lib/udev/rules.d/40-redhat.rules", "/usr/local/lib/udev/rules.d/40-redhat.rules"])
    etc_udev_oracle_asm_rules = glob_file(r"/etc/udev/rules.d/*asm*.rules")
    etcd_conf = simple_file("/etc/etcd/etcd.conf")
    ethernet_interfaces = listdir("/sys/class/net", context=HostContext)
    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_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")
    fc_match = simple_command("/bin/fc-match -sv 'sans:regular:roman' family fontformat")
    fcoeadm_i = simple_command("/usr/sbin/fcoeadm -i")
    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_ssl_error_ssl_log = simple_file("/var/log/httpd/foreman-ssl_error_ssl.log")
    fstab = simple_file("/etc/fstab")
    fw_devices = simple_command("/bin/fwupdagent get-devices", deps=[IsBareMetal])
    fw_security = simple_command("/bin/fwupdagent security --force", deps=[IsBareMetal])
    galera_cnf = first_file(["/var/lib/config-data/puppet-generated/mysql/etc/my.cnf.d/galera.cnf", "/etc/my.cnf.d/galera.cnf"])
    getcert_list = simple_command("/usr/bin/getcert list")
    getconf_page_size = simple_command("/usr/bin/getconf PAGE_SIZE")
    getenforce = simple_command("/usr/sbin/getenforce")
    getsebool = simple_command("/usr/sbin/getsebool -a")
    gluster_v_info = simple_command("/usr/sbin/gluster volume info")
    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"])
    gcp_instance_type = simple_command("/usr/bin/curl -s -H 'Metadata-Flavor: Google' http://metadata.google.internal/computeMetadata/v1/instance/machine-type --connect-timeout 5", deps=[IsGCP])
    gcp_license_codes = simple_command("/usr/bin/curl -s -H 'Metadata-Flavor: Google' http://metadata.google.internal/computeMetadata/v1/instance/licenses/?recursive=True --connect-timeout 5", deps=[IsGCP])
    greenboot_status = simple_command("/usr/libexec/greenboot/greenboot-status")
    grubenv = first_file(["/boot/grub2/grubenv", "/boot/efi/EFI/redhat/grubenv"])
    grub_conf = simple_file("/boot/grub/grub.conf")
    grub_config_perms = simple_command("/bin/ls -l /boot/grub2/grub.cfg")  # only RHEL7 and updwards
    grub_efi_conf = simple_file("/boot/efi/EFI/redhat/grub.conf")
    grub1_config_perms = simple_command("/bin/ls -l /boot/grub/grub.conf")  # RHEL6
    grub2_cfg = simple_file("/boot/grub2/grub.cfg")
    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_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"])
    haproxy_cfg_scl = simple_file("/etc/opt/rh/rh-haproxy18/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"])
    hostname = simple_command("/bin/hostname -f")
    hostname_default = simple_command("/bin/hostname")
    hostname_short = simple_command("/bin/hostname -s")
    hosts = simple_file("/etc/hosts")
    httpd_conf = glob_file(
        [
            "/etc/httpd/conf/httpd.conf",
            "/etc/httpd/conf.d/*.conf",
            "/etc/httpd/conf.d/*/*.conf",
            "/etc/httpd/conf.modules.d/*.conf"
        ]
    )
    httpd_conf_scl_httpd24 = glob_file(
        [
            "/opt/rh/httpd24/root/etc/httpd/conf/httpd.conf",
            "/opt/rh/httpd24/root/etc/httpd/conf.d/*.conf",
            "/opt/rh/httpd24/root/etc/httpd/conf.d/*/*.conf",
            "/opt/rh/httpd24/root/etc/httpd/conf.modules.d/*.conf"
        ]
    )
    httpd_conf_scl_jbcs_httpd24 = glob_file(
        [
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf/httpd.conf",
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/*.conf",
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/*/*.conf",
            "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.modules.d/*.conf"
        ]
    )
    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")
    virt_uuid_facts = simple_file("/etc/rhsm/facts/virt_uuid.facts")

    @datasource(Ps, HostContext)
    def httpd_cmd(broker):
        """
        Function to search the output of ``ps auxcww`` to find all running Apache
        webserver processes and extract the binary path.

        Returns:
            list: List of the binary paths to each running process
        """
        return get_running_commands(broker[Ps], broker[HostContext], ['httpd', ])

    httpd_pid = simple_command("/usr/bin/pgrep -o httpd")
    httpd_limits = foreach_collect(httpd_pid, "/proc/%s/limits")
    httpd_M = foreach_execute(httpd_cmd, "%s -M")
    httpd_ssl_cert_enddate = foreach_execute(ssl_certificate.httpd_ssl_certificate_files, "/usr/bin/openssl x509 -in %s -enddate -noout")
    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-*")
    imagemagick_policy = glob_file(["/etc/ImageMagick/policy.xml", "/usr/lib*/ImageMagick-6.5.4/config/policy.xml"])
    initctl_lst = simple_command("/sbin/initctl --system list")
    init_process_cgroup = simple_file("/proc/1/cgroup")
    insights_client_conf = simple_file('/etc/insights-client/insights-client.conf')
    interrupts = simple_file("/proc/interrupts")
    ip_addr = simple_command("/sbin/ip addr")
    ip_addresses = simple_command("/bin/hostname -I")
    ip_route_show_table_all = simple_command("/sbin/ip route show table all")
    ip_s_link = simple_command("/sbin/ip -s -d link")
    ipaupgrade_log = simple_file("/var/log/ipaupgrade.log")
    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")
    ipcs_s_i = foreach_execute(ipcs.semid, "/usr/bin/ipcs -s -i %s")
    ipsec_conf = simple_file("/etc/ipsec.conf")
    iptables = simple_command("/sbin/iptables-save")
    iptables_permanent = simple_file("etc/sysconfig/iptables")
    ip6tables = simple_command("/sbin/ip6tables-save")
    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 = first_file(["/var/log/containers/ironic-inspector/ironic-inspector.log", "/var/log/ironic-inspector/ironic-inspector.log"])
    iscsiadm_m_session = simple_command("/usr/sbin/iscsiadm -m session")
    kdump_conf = simple_file("/etc/kdump.conf")
    kernel_config = glob_file("/boot/config-*")
    kexec_crash_size = simple_file("/sys/kernel/kexec_crash_size")
    keystone_crontab = simple_command("/usr/bin/crontab -l -u keystone")
    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")
    kubepods_cpu_quota = glob_file("/sys/fs/cgroup/cpu/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod[a-f0-9_]*.slice/cpu.cfs_quota_us")
    last_upload_globs = ["/etc/redhat-access-insights/.lastupload", "/etc/insights-client/.lastupload"]
    lastupload = glob_file(last_upload_globs)
    ld_library_path_of_user = sap.ld_library_path_of_user
    ldif_config = glob_file("/etc/dirsrv/slapd-*/dse.ldif")
    libssh_client_config = simple_file("/etc/libssh/libssh_client.config")
    libssh_server_config = simple_file("/etc/libssh/libssh_server.config")
    libvirtd_log = simple_file("/var/log/libvirt/libvirtd.log")
    limits_conf = glob_file(["/etc/security/limits.conf", "/etc/security/limits.d/*.conf"])
    localtime = simple_command("/usr/bin/file -L /etc/localtime")
    logrotate_conf = glob_file(["/etc/logrotate.conf", "/etc/logrotate.d/*"])
    lpfc_max_luns = simple_file("/sys/module/lpfc/parameters/lpfc_max_luns")
    lpstat_p = simple_command("/usr/bin/lpstat -p")
    lpstat_protocol_printers = lpstat.lpstat_protocol_printers_info
    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_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", "/etc/rc.d/init.d"])
    ls_etc = simple_command("/bin/ls -lan {0}".format(' '.join(etc_and_sub_dirs)), keep_rc=True)
    ls_ipa_idoverride_memberof = simple_command("/bin/ls -lan /usr/share/ipa/ui/js/plugins/idoverride-memberof")
    ls_lib_firmware = simple_command("/bin/ls -lanR /lib/firmware")
    ls_ocp_cni_openshift_sdn = simple_command("/bin/ls -l /var/lib/cni/networks/openshift-sdn")
    ls_origin_local_volumes_pods = simple_command("/bin/ls -l /var/lib/origin/openshift.local.volumes/pods")
    ls_osroot = simple_command("/bin/ls -lan /")
    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_bin = simple_command("/bin/ls -lan /usr/bin")
    ls_usr_lib64 = simple_command("/bin/ls -lan /usr/lib64")
    ls_var_cache_pulp = simple_command("/bin/ls -lan /var/cache/pulp")
    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")
    ls_var_opt_mssql = simple_command("/bin/ls -ld /var/opt/mssql")
    ls_var_opt_mssql_log = simple_command("/bin/ls -la /var/opt/mssql/log")
    ls_var_spool_clientmq = simple_command("/bin/ls -ln /var/spool/clientmqueue")
    ls_var_spool_postfix_maildrop = simple_command("/bin/ls -ln /var/spool/postfix/maildrop")
    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
    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")
    lsmod = simple_command("/sbin/lsmod")
    lsof = first_of([
        simple_command("/usr/bin/lsof"),
        simple_command("/usr/sbin/lsof")
    ])
    lspci = simple_command("/sbin/lspci -k")
    lspci_vmmkn = simple_command("/sbin/lspci -vmmkn")
    lsscsi = simple_command("/usr/bin/lsscsi")
    lsvmbus = simple_command("/usr/sbin/lsvmbus -vv")
    lvm_conf = simple_file("/etc/lvm/lvm.conf")
    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,lv_kernel_major,lv_kernel_minor --config=\"global{locking_type=0}\"")
    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"])
    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")

    @datasource(HostContext)
    def md5chk_file_list(broker):
        """ Provide a list of files to be processed by the ``md5chk_files`` spec """
        return ["/etc/pki/product/69.pem", "/etc/pki/product-default/69.pem", "/usr/lib/libsoftokn3.so", "/usr/lib64/libsoftokn3.so", "/usr/lib/libfreeblpriv3.so", "/usr/lib64/libfreeblpriv3.so"]
    md5chk_files = foreach_execute(md5chk_file_list, "/usr/bin/md5sum %s", keep_rc=True)
    mdstat = simple_file("/proc/mdstat")

    meminfo = first_file(["/proc/meminfo", "/meminfo"])
    messages = simple_file("/var/log/messages")
    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")
    modprobe = glob_file(["/etc/modprobe.conf", "/etc/modprobe.d/*.conf"])
    mokutil_sbstate = simple_command("/bin/mokutil --sb-state")
    mongod_conf = glob_file([
        "/etc/mongod.conf",
        "/etc/opt/rh/rh-mongodb34/mongod.conf"
    ])
    mount = simple_command("/bin/mount")
    mounts = simple_file("/proc/mounts")
    mssql_api_assessment = simple_file("/var/opt/mssql/log/assessments/assessment-latest")
    mssql_conf = simple_file("/var/opt/mssql/mssql.conf")
    mssql_tls_cert_enddate = command_with_args("/usr/bin/openssl x509 -in %s -enddate -noout", ssl_certificate.mssql_tls_cert_file)
    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_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"
                          ])
    named_checkconf_p = simple_command("/usr/sbin/named-checkconf -p")
    named_conf = simple_file("/etc/named.conf")
    namespace = simple_command("/bin/ls /var/run/netns")
    ndctl_list_Ni = simple_command("/usr/bin/ndctl list -Ni")
    netconsole = simple_file("/etc/sysconfig/netconsole")
    netstat = simple_command("/bin/netstat -neopa")
    netstat_agn = simple_command("/bin/netstat -agn")
    netstat_i = simple_command("/bin/netstat -i")
    netstat_s = simple_command("/bin/netstat -s")
    networkmanager_conf = simple_file("/etc/NetworkManager/NetworkManager.conf")
    networkmanager_dispatcher_d = glob_file("/etc/NetworkManager/dispatcher.d/*-dhclient")
    neutron_conf = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/neutron.conf", "/etc/neutron/neutron.conf"])
    neutron_sriov_agent = first_file([
        "/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/ml2/sriov_agent.ini",
        "/etc/neutron/plugins/ml2/sriov_agent.ini"])
    neutron_dhcp_agent_ini = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/dhcp_agent.ini", "/etc/neutron/dhcp_agent.ini"])
    neutron_l3_agent_ini = first_file(["/var/lib/config-data/puppet-generated/neutron/etc/neutron/l3_agent.ini", "/etc/neutron/l3_agent.ini"])
    neutron_l3_agent_log = first_file(["/var/log/containers/neutron/l3-agent.log", "/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_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"])
    nfnetlink_queue = simple_file("/proc/net/netfilter/nfnetlink_queue")
    nfs_exports = simple_file("/etc/exports")
    nfs_exports_d = glob_file("/etc/exports.d/*.exports")
    nginx_conf = glob_file([
                           "/etc/nginx/*.conf", "/etc/nginx/conf.d/*", "/etc/nginx/default.d/*",
                           "/opt/rh/nginx*/root/etc/nginx/*.conf", "/opt/rh/nginx*/root/etc/nginx/conf.d/*", "/opt/rh/nginx*/root/etc/nginx/default.d/*",
                           "/etc/opt/rh/rh-nginx*/nginx/*.conf", "/etc/opt/rh/rh-nginx*/nginx/conf.d/*", "/etc/opt/rh/rh-nginx*/nginx/default.d/*"
                           ])
    nginx_ssl_cert_enddate = foreach_execute(ssl_certificate.nginx_ssl_certificate_files, "/usr/bin/openssl x509 -in %s -enddate -noout")
    nmcli_conn_show = simple_command("/usr/bin/nmcli conn show")
    nmcli_dev_show = simple_command("/usr/bin/nmcli dev show")
    nova_api_log = first_file(["/var/log/containers/nova/nova-api.log", "/var/log/nova/nova-api.log"])
    nova_compute_log = first_file(["/var/log/containers/nova/nova-compute.log", "/var/log/nova/nova-compute.log"])
    nova_conf = first_file([
                           "/var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf",
                           "/var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf",
                           "/etc/nova/nova.conf"
                           ])
    nova_crontab = simple_command("/usr/bin/crontab -l -u nova")
    nova_uid = simple_command("/usr/bin/id -u nova")
    nscd_conf = simple_file("/etc/nscd.conf")
    nss_rhel7 = simple_file("/etc/pki/nss-legacy/nss-rhel7.config")
    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_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")
    odbc_ini = simple_file("/etc/odbc.ini")
    odbcinst_ini = simple_file("/etc/odbcinst.ini")
    open_vm_tools_stat_raw_text_session = simple_command("/usr/bin/vmware-toolbox-cmd stat raw text session")
    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")
    os_release = simple_file("etc/os-release")
    ose_master_config = simple_file("/etc/origin/master/master-config.yaml")
    ose_node_config = simple_file("/etc/origin/node/node-config.yaml")
    ovirt_engine_server_log = simple_file("/var/log/ovirt-engine/server.log")
    ovirt_engine_ui_log = simple_file("/var/log/ovirt-engine/ui.log")
    ovs_vsctl_list_bridge = simple_command("/usr/bin/ovs-vsctl list bridge")
    ovs_vsctl_show = simple_command("/usr/bin/ovs-vsctl show")
    package_provides_command = package_provides.cmd_and_pkg
    pacemaker_log = first_file(["/var/log/pacemaker.log", "/var/log/pacemaker/pacemaker.log"])
    partitions = simple_file("/proc/partitions")
    pci_rport_target_disk_paths = simple_command("/usr/bin/find /sys/devices/ -maxdepth 10 -mindepth 9 -name stat -type f")
    pcp_metrics = simple_command("/usr/bin/curl -s http://127.0.0.1:44322/metrics --connect-timeout 5", deps=[pcp_enabled])
    passenger_status = simple_command("/usr/bin/passenger-status")
    password_auth = simple_file("/etc/pam.d/password-auth")
    pcs_quorum_status = simple_command("/usr/sbin/pcs quorum status")
    pcs_status = simple_command("/usr/sbin/pcs status")
    php_ini = first_file(["/etc/opt/rh/php73/php.ini", "/etc/opt/rh/php72/php.ini", "/etc/php.ini"])
    pluginconf_d = glob_file("/etc/yum/pluginconf.d/*.conf")
    pmlog_summary = command_with_args("/usr/bin/pmlogsummary %s", pmlog_summary_args)
    pmrep_metrics = simple_command("/usr/bin/pmrep -t 1s -T 1s network.interface.out.packets network.interface.collisions swap.pagesout mssql.memory_manager.stolen_server_memory mssql.memory_manager.total_server_memory -o csv")
    postconf_builtin = simple_command("/usr/sbin/postconf -C builtin")
    postconf = simple_command("/usr/sbin/postconf")
    postgresql_conf = first_file([
        "/var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf",
        "/var/lib/pgsql/data/postgresql.conf",
    ])
    postgresql_log = first_of(
        [
            glob_file("/var/opt/rh/rh-postgresql12/lib/pgsql/data/log/postgresql-*.log"),
            glob_file("/var/lib/pgsql/data/pg_log/postgresql-*.log"),
        ]
    )
    puppetserver_config = simple_file("/etc/sysconfig/puppetserver")
    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")
    puppet_ca_cert_expire_date = simple_command("/usr/bin/openssl x509 -in /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem -enddate -noout")
    pvs_noheadings = simple_command("/sbin/pvs --nameprefixes --noheadings --separator='|' -a -o pv_all,vg_name --config=\"global{locking_type=0}\"")
    rhsm_katello_default_ca_cert = simple_command("/usr/bin/openssl x509 -in /etc/rhsm/ca/katello-default-ca.pem -noout -issuer")
    qemu_conf = simple_file("/etc/libvirt/qemu.conf")
    qemu_xml = glob_file(r"/etc/libvirt/qemu/*.xml")
    ql2xmaxlun = simple_file("/sys/module/qla2xxx/parameters/ql2xmaxlun")
    qpidd_conf = simple_file("/etc/qpid/qpidd.conf")
    rabbitmq_env = simple_file("/etc/rabbitmq/rabbitmq-env.conf")
    rabbitmq_report = simple_command("/usr/sbin/rabbitmqctl report")
    rabbitmq_startup_log = simple_file("/var/log/rabbitmq/startup_log")
    rabbitmq_users = simple_command("/usr/sbin/rabbitmqctl list_users")
    rc_local = simple_file("/etc/rc.d/rc.local")
    rdma_conf = simple_file("/etc/rdma/rdma.conf")
    readlink_e_etc_mtab = simple_command("/usr/bin/readlink -e /etc/mtab")
    readlink_e_shift_cert_client = simple_command("/usr/bin/readlink -e /etc/origin/node/certificates/kubelet-client-current.pem")
    readlink_e_shift_cert_server = simple_command("/usr/bin/readlink -e /etc/origin/node/certificates/kubelet-server-current.pem")
    redhat_release = simple_file("/etc/redhat-release")
    resolv_conf = simple_file("/etc/resolv.conf")
    rhn_conf = first_file(["/etc/rhn/rhn.conf", "/conf/rhn/rhn/rhn.conf"])
    rhsm_conf = simple_file("/etc/rhsm/rhsm.conf")
    rhsm_log = simple_file("/var/log/rhsm/rhsm.log")
    rhsm_releasever = simple_file('/var/lib/rhsm/cache/releasever.json')
    rndc_status = simple_command("/usr/sbin/rndc status")
    ros_config = simple_file("/var/lib/pcp/config/pmlogger/config.ros")
    rpm_ostree_status = simple_command("/usr/bin/rpm-ostree status --json")
    rpm_V_packages = simple_command("/bin/rpm -V coreutils procps procps-ng shadow-utils passwd sudo chrony", keep_rc=True, signum=signal.SIGTERM)
    rsyslog_conf = glob_file(["/etc/rsyslog.conf", "/etc/rsyslog.d/*.conf"])
    samba = simple_file("/etc/samba/smb.conf")
    sap_hana_landscape = foreach_execute(sap_hana_sid_SID_nr, "/bin/su -l %sadm -c 'python /usr/sap/%s/HDB%s/exe/python_support/landscapeHostConfiguration.py'", keep_rc=True)
    sap_hdb_version = foreach_execute(sap_hana_sid, "/bin/su -l %sadm -c 'HDB version'", keep_rc=True)
    saphostctl_getcimobject_sapinstance = simple_command("/usr/sap/hostctrl/exe/saphostctrl -function GetCIMObject -enuminstances SAPInstance")
    saphostexec_status = simple_command("/usr/sap/hostctrl/exe/saphostexec -status")
    saphostexec_version = simple_command("/usr/sap/hostctrl/exe/saphostexec -version")
    sat5_insights_properties = simple_file("/etc/redhat-access/redhat-access-insights.properties")
    satellite_compute_resources = simple_command(
        "/usr/bin/sudo -iu postgres /usr/bin/psql -d foreman -c 'select name, type from compute_resources' --csv",
        deps=[SatelliteVersion]
    )
    satellite_content_hosts_count = simple_command(
        "/usr/bin/sudo -iu postgres /usr/bin/psql -d foreman -c 'select count(*) from hosts'",
        deps=[SatelliteVersion]
    )
    satellite_custom_ca_chain = simple_command(
        '/usr/bin/awk \'BEGIN { pipe="openssl x509 -noout -subject -enddate"} /^-+BEGIN CERT/,/^-+END CERT/ { print | pipe } /^-+END CERT/ { close(pipe); printf("\\n")}\' /etc/pki/katello/certs/katello-server-ca.crt',
    )
    satellite_custom_hiera = simple_file("/etc/foreman-installer/custom-hiera.yaml")
    satellite_missed_pulp_agent_queues = satellite_missed_queues.satellite_missed_pulp_agent_queues
    satellite_mongodb_storage_engine = simple_command("/usr/bin/mongo pulp_database --eval 'db.serverStatus().storageEngine'")
    satellite_non_yum_type_repos = simple_command(
        "/usr/bin/mongo pulp_database --eval 'db.repo_importers.find({\"importer_type_id\": { $ne: \"yum_importer\"}}).count()'",
        deps=[[SatelliteVersion, CapsuleVersion]]
    )
    satellite_sca_status = simple_command(
        "/usr/bin/sudo -iu postgres /usr/bin/psql -d candlepin -c \"select displayname,content_access_mode from cp_owner\" --csv",
        deps=[SatelliteVersion]
    )
    satellite_settings = simple_command(
        "/usr/bin/sudo -iu postgres /usr/bin/psql -d foreman -c \"select name, value, \\\"default\\\" from settings where name in ('destroy_vm_on_host_delete', 'unregister_delete_host')\" --csv",
        deps=[SatelliteVersion]
    )
    satellite_version_rb = simple_file("/usr/share/foreman/lib/satellite/version.rb")
    satellite_yaml = simple_file("/etc/foreman-installer/scenarios.d/satellite.yaml")
    scheduler = glob_file("/sys/block/*/queue/scheduler")
    scsi = simple_file("/proc/scsi/scsi")
    scsi_eh_deadline = glob_file('/sys/class/scsi_host/host[0-9]*/eh_deadline')
    scsi_fwver = glob_file('/sys/class/scsi_host/host[0-9]*/fwrev')
    scsi_mod_max_report_luns = simple_file("/sys/module/scsi_mod/parameters/max_report_luns")
    scsi_mod_use_blk_mq = simple_file("/sys/module/scsi_mod/parameters/use_blk_mq")
    sctp_asc = simple_file('/proc/net/sctp/assocs')
    sctp_eps = simple_file('/proc/net/sctp/eps')
    sctp_snmp = simple_file('/proc/net/sctp/snmp')
    sealert = simple_command('/usr/bin/sealert -l "*"')
    selinux_config = simple_file("/etc/selinux/config")
    sestatus = simple_command("/usr/sbin/sestatus -b")
    setup_named_chroot = simple_file("/usr/libexec/setup-named-chroot.sh")
    smbstatus_p = simple_command("/usr/bin/smbstatus -p")
    smartpdc_settings = simple_file("/etc/smart_proxy_dynflow_core/settings.yml")
    sockstat = simple_file("/proc/net/sockstat")
    softnet_stat = simple_file("proc/net/softnet_stat")
    software_collections_list = simple_command('/usr/bin/scl --list')
    spamassassin_channels = simple_command("/bin/grep -r '^\\s*CHANNELURL=' /etc/mail/spamassassin/channel.d")
    ss = simple_command("/usr/sbin/ss -tupna")
    ssh_config = simple_file("/etc/ssh/ssh_config")
    ssh_config_d = glob_file(r"/etc/ssh/ssh_config.d/*.conf")
    ssh_foreman_proxy_config = simple_file("/usr/share/foreman-proxy/.ssh/ssh_config")
    sshd_config = simple_file("/etc/ssh/sshd_config")
    sshd_config_perms = simple_command("/bin/ls -l /etc/ssh/sshd_config")
    sssd_config = simple_file("/etc/sssd/sssd.conf")
    subscription_manager_id = simple_command("/usr/sbin/subscription-manager identity")  # use "/usr/sbin" here, BZ#1690529
    subscription_manager_installed_product_ids = simple_command("/usr/bin/find /etc/pki/product-default/ /etc/pki/product/ -name '*pem' -exec rct cat-cert --no-content '{}' \;")
    swift_object_expirer_conf = first_file(["/var/lib/config-data/puppet-generated/swift/etc/swift/object-expirer.conf", "/etc/swift/object-expirer.conf"])
    swift_proxy_server_conf = first_file(["/var/lib/config-data/puppet-generated/swift/etc/swift/proxy-server.conf", "/etc/swift/proxy-server.conf"])
    sysconfig_grub = simple_file("/etc/default/grub")  # This is the file where the "/etc/sysconfig/grub" point to
    sysconfig_kdump = simple_file("etc/sysconfig/kdump")
    sysconfig_libvirt_guests = simple_file("etc/sysconfig/libvirt-guests")
    sysconfig_network = simple_file("etc/sysconfig/network")
    sysconfig_ntpd = simple_file("/etc/sysconfig/ntpd")
    sysconfig_oracleasm = simple_file("/etc/sysconfig/oracleasm")
    sysconfig_prelink = simple_file("/etc/sysconfig/prelink")
    sysconfig_sshd = simple_file("/etc/sysconfig/sshd")
    sysconfig_virt_who = simple_file("/etc/sysconfig/virt-who")
    sysctl = simple_command("/sbin/sysctl -a")
    sysctl_conf = simple_file("/etc/sysctl.conf")
    systemctl_cat_dnsmasq_service = simple_command("/bin/systemctl cat dnsmasq.service")
    systemctl_cat_rpcbind_socket = simple_command("/bin/systemctl cat rpcbind.socket")
    systemctl_cinder_volume = simple_command("/bin/systemctl show openstack-cinder-volume")
    systemctl_httpd = simple_command("/bin/systemctl show httpd")
    systemctl_nginx = simple_command("/bin/systemctl show nginx")
    systemctl_list_unit_files = simple_command("/bin/systemctl list-unit-files")
    systemctl_list_units = simple_command("/bin/systemctl list-units")
    systemctl_mariadb = simple_command("/bin/systemctl show mariadb")
    systemctl_qpidd = simple_command("/bin/systemctl show qpidd")
    systemctl_qdrouterd = simple_command("/bin/systemctl show qdrouterd")
    systemctl_show_all_services = simple_command("/bin/systemctl show *.service")
    systemctl_show_target = simple_command("/bin/systemctl show *.target")
    systemctl_smartpdc = simple_command("/bin/systemctl show smart_proxy_dynflow_core")
    systemd_analyze_blame = simple_command("/bin/systemd-analyze blame")
    systemd_docker = simple_command("/usr/bin/systemctl cat docker.service")
    systemd_logind_conf = simple_file("/etc/systemd/logind.conf")
    systemd_openshift_node = simple_command("/usr/bin/systemctl cat atomic-openshift-node.service")
    systemd_system_conf = simple_file("/etc/systemd/system.conf")
    systemid = first_of([
        simple_file("/etc/sysconfig/rhn/systemid"),
        simple_file("/conf/rhn/sysconfig/rhn/systemid")
    ])
    systool_b_scsi_v = first_of([
        simple_command("/usr/bin/systool -b scsi -v"),
        simple_command("/bin/systool -b scsi -v")
    ])
    sys_vmbus_device_id = glob_file('/sys/bus/vmbus/devices/*/device_id')
    sys_vmbus_class_id = glob_file('/sys/bus/vmbus/devices/*/class_id')
    testparm_s = simple_command("/usr/bin/testparm -s")
    testparm_v_s = simple_command("/usr/bin/testparm -v -s")
    tags = simple_file("/tags.json", kind=RawFileProvider)
    thp_use_zero_page = simple_file("/sys/kernel/mm/transparent_hugepage/use_zero_page")
    thp_enabled = simple_file("/sys/kernel/mm/transparent_hugepage/enabled")
    tmpfilesd = glob_file(["/etc/tmpfiles.d/*.conf", "/usr/lib/tmpfiles.d/*.conf", "/run/tmpfiles.d/*.conf"])
    tomcat_vdc_fallback = simple_command("/usr/bin/find /usr/share -maxdepth 1 -name 'tomcat*' -exec /bin/grep -R -s 'VirtualDirContext' --include '*.xml' '{}' +")
    tuned_adm = simple_command("/usr/sbin/tuned-adm list")
    udev_fc_wwpn_id_rules = simple_file("/usr/lib/udev/rules.d/59-fc-wwpn-id.rules")
    uname = simple_command("/usr/bin/uname -a")
    up2date = simple_file("/etc/sysconfig/rhn/up2date")
    up2date_log = simple_file("/var/log/up2date")
    uptime = simple_command("/usr/bin/uptime")
    usr_journald_conf_d = glob_file(r"usr/lib/systemd/journald.conf.d/*.conf")  # note that etc_journald.conf.d also exists
    vdo_status = simple_command("/usr/bin/vdo status")
    version_info = simple_file("/version_info")
    vgdisplay = simple_command("/sbin/vgdisplay")
    vhost_net_zero_copy_tx = simple_file("/sys/module/vhost_net/parameters/experimental_zcopytx")
    vdsm_log = simple_file("var/log/vdsm/vdsm.log")
    vdsm_logger_conf = simple_file("etc/vdsm/logger.conf")
    vma_ra_enabled = simple_file("/sys/kernel/mm/swap/vma_ra_enabled")
    vgs_noheadings = simple_command("/sbin/vgs --nameprefixes --noheadings --separator='|' -a -o vg_all --config=\"global{locking_type=0}\"")
    virsh_list_all = simple_command("/usr/bin/virsh --readonly list --all")
    virt_what = simple_command("/usr/sbin/virt-what")
    virt_who_conf = glob_file([r"etc/virt-who.conf", r"etc/virt-who.d/*.conf"])
    virtlogd_conf = simple_file("/etc/libvirt/virtlogd.conf")
    vmware_tools_conf = simple_file("/etc/vmware-tools/tools.conf")
    vsftpd = simple_file("/etc/pam.d/vsftpd")
    vsftpd_conf = simple_file("/etc/vsftpd/vsftpd.conf")
    x86_pti_enabled = simple_file("sys/kernel/debug/x86/pti_enabled")
    x86_ibpb_enabled = simple_file("sys/kernel/debug/x86/ibpb_enabled")
    x86_ibrs_enabled = simple_file("sys/kernel/debug/x86/ibrs_enabled")
    x86_retp_enabled = simple_file("sys/kernel/debug/x86/retp_enabled")
    xinetd_conf = glob_file(["/etc/xinetd.conf", "/etc/xinetd.d/*"])
    yum_conf = simple_file("/etc/yum.conf")
    yum_list_available = simple_command("yum -C --noplugins list available", signum=signal.SIGTERM)
    yum_log = simple_file("/var/log/yum.log")
    yum_repolist = simple_command("/usr/bin/yum -C --noplugins repolist", signum=signal.SIGTERM)
    yum_repos_d = glob_file("/etc/yum.repos.d/*.repo")
    yum_updateinfo = simple_command("/usr/bin/yum -C updateinfo list", signum=signal.SIGTERM)
    yum_updates = yum_updates.yum_updates

    zipl_conf = simple_file("/etc/zipl.conf")
    rpm_format = format_rpm()
    installed_rpms = simple_command("/bin/rpm -qa --qf '%s'" % rpm_format, context=HostContext, signum=signal.SIGTERM)
Exemple #9
0
class InsightsArchiveSpecs(Specs):

    abrt_status_bare = simple_file("insights_commands/abrt_status_--bare_True")
    all_installed_rpms = glob_file("insights_commands/rpm_-qa*")
    alternatives_display_python = simple_file(
        "insights_commands/alternatives_--display_python")
    ansible_host = simple_file("ansible_host")
    auditctl_status = simple_file("insights_commands/auditctl_-s")
    aws_instance_id_doc = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_aws_instance_id_doc"
    )
    aws_instance_id_pkcs7 = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_aws_instance_id_pkcs7"
    )
    awx_manage_check_license = simple_file(
        "insights_commands/awx-manage_check_license")
    azure_instance_type = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_azure_instance_type"
    )
    azure_instance_plan = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_azure_instance_plan"
    )
    bios_uuid = simple_file("insights_commands/dmidecode_-s_system-uuid")
    blkid = simple_file("insights_commands/blkid_-c_.dev.null")
    brctl_show = simple_file("insights_commands/brctl_show")
    ceph_df_detail = first_file([
        "insights_commands/ceph_df_detail_-f_json-pretty",
        "insights_commands/ceph_df_detail_-f_json"
    ])
    ceph_health_detail = first_file([
        "insights_commands/ceph_health_detail_-f_json-pretty",
        "insights_commands/ceph_health_detail_-f_json"
    ])
    ceph_insights = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_ceph_insights"
    )
    ceph_osd_dump = first_file([
        "insights_commands/ceph_osd_dump_-f_json-pretty",
        "insights_commands/ceph_osd_dump_-f_json"
    ])
    ceph_osd_tree = first_file([
        "insights_commands/ceph_osd_tree_-f_json-pretty",
        "insights_commands/ceph_osd_tree_-f_json"
    ])
    ceph_s = first_file([
        "insights_commands/ceph_-s_-f_json-pretty",
        "insights_commands/ceph_-s_-f_json"
    ])
    ceph_v = simple_file("insights_commands/ceph_-v")
    certificates_enddate = first_file([
        "insights_commands/find_.etc.origin.node_.etc.origin.master_.etc.pki_.etc.ipa_-type_f_-exec_.usr.bin.openssl_x509_-noout_-enddate_-in_-exec_echo_FileName",
        "insights_commands/find_.etc.origin.node_.etc.origin.master_.etc.pki_-type_f_-exec_.usr.bin.openssl_x509_-noout_-enddate_-in_-exec_echo_FileName"
    ])
    chkconfig = simple_file("insights_commands/chkconfig_--list")
    chronyc_sources = simple_file("insights_commands/chronyc_sources")
    corosync_cmapctl = glob_file("insights_commands/corosync-cmapctl*")
    cpupower_frequency_info = simple_file(
        "insights_commands/cpupower_-c_all_frequency-info")
    date = simple_file("insights_commands/date")
    date_utc = simple_file("insights_commands/date_--utc")
    df__al = first_file(
        ["insights_commands/df_-al_-x_autofs", "insights_commands/df_-al"])
    df__alP = first_file(
        ["insights_commands/df_-alP_-x_autofs", "insights_commands/df_-alP"])
    df__li = first_file(
        ["insights_commands/df_-li_-x_autofs", "insights_commands/df_-li"])
    dig_dnssec = simple_file("insights_commands/dig_dnssec_._SOA")
    dig_edns = simple_file("insights_commands/dig_edns_0_._SOA")
    dig_noedns = simple_file("insights_commands/dig_noedns_._SOA")
    display_name = simple_file("display_name")
    dmesg = simple_file("insights_commands/dmesg")
    dmidecode = simple_file("insights_commands/dmidecode")
    dmsetup_info = simple_file("insights_commands/dmsetup_info_-C")
    dmsetup_status = simple_file("insights_commands/dmsetup_status")
    docker_info = simple_file("insights_commands/docker_info")
    docker_list_containers = simple_file(
        "insights_commands/docker_ps_--all_--no-trunc")
    docker_list_images = simple_file(
        "insights_commands/docker_images_--all_--no-trunc_--digests")
    dotnet_version = simple_file("insights_commands/dotnet_--version")
    doveconf = simple_file("insights_commands/doveconf")
    du_dirs = glob_file("insights_commands/du_-s_-k_*")
    engine_db_query_vdsm_version = simple_file(
        "insights_commands/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"
    )
    ethtool = glob_file("insights_commands/ethtool_*", ignore="ethtool_-.*")
    ethtool_S = glob_file("insights_commands/ethtool_-S_*")
    ethtool_T = glob_file("insights_commands/ethtool_-T_*")
    ethtool_c = glob_file("insights_commands/ethtool_-c_*")
    ethtool_g = glob_file("insights_commands/ethtool_-g_*")
    ethtool_i = glob_file("insights_commands/ethtool_-i_*")
    ethtool_k = glob_file("insights_commands/ethtool_-k_*")
    facter = simple_file("insights_commands/facter")
    fc_match = simple_file(
        "insights_commands/fc-match_-sv_sans_regular_roman_family_fontformat")
    fcoeadm_i = simple_file("insights_commands/fcoeadm_-i")
    findmnt_lo_propagation = simple_file(
        "insights_commands/findmnt_-lo_PROPAGATION")
    firewall_cmd_list_all_zones = simple_file(
        "insights_commands/firewall-cmd_--list-all-zones")
    gcp_license_codes = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_gcp_license_codes"
    )
    getconf_page_size = simple_file("insights_commands/getconf_PAGE_SIZE")
    getenforce = simple_file("insights_commands/getenforce")
    getsebool = simple_file("insights_commands/getsebool_-a")
    grub1_config_perms = simple_file(
        "insights_commands/ls_-l_.boot.grub.grub.conf")
    grub_config_perms = simple_file(
        "insights_commands/ls_-l_.boot.grub2.grub.cfg")
    grubby_default_index = simple_file(
        "insights_commands/grubby_--default-index")
    grubby_default_kernel = simple_file(
        "insights_commands/grubby_--default-kernel")
    gluster_v_info = simple_file("insights_commands/gluster_volume_info")
    hammer_task_list = simple_file(
        "insights_commands/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"
    )
    installed_rpms = head(all_installed_rpms)
    hostname = simple_file("insights_commands/hostname_-f")
    hostname_default = simple_file("insights_commands/hostname")
    hostname_short = simple_file("insights_commands/hostname_-s")
    httpd_M = glob_file("insights_commands/*httpd*_-M")
    httpd_on_nfs = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_httpd_on_nfs"
    )
    httpd_V = glob_file("insights_commands/*httpd*_-V")
    initctl_lst = simple_file("insights_commands/initctl_--system_list")
    ip6tables = simple_file("insights_commands/ip6tables-save")
    ip_addr = simple_file("insights_commands/ip_addr")
    ip_addresses = simple_file("insights_commands/hostname_-I")
    ip_route_show_table_all = simple_file(
        "insights_commands/ip_route_show_table_all")
    ip_s_link = first_file(
        ["insights_commands/ip_-s_-d_link", "insights_commands/ip_-s_link"])
    ipcs_m = simple_file("insights_commands/ipcs_-m")
    ipcs_m_p = simple_file("insights_commands/ipcs_-m_-p")
    ipcs_s = simple_file("insights_commands/ipcs_-s")
    iptables = simple_file("insights_commands/iptables-save")
    ipv4_neigh = simple_file("insights_commands/ip_-4_neighbor_show_nud_all")
    ipv6_neigh = simple_file("insights_commands/ip_-6_neighbor_show_nud_all")
    iscsiadm_m_session = simple_file("insights_commands/iscsiadm_-m_session")
    keystone_crontab = simple_file("insights_commands/crontab_-l_-u_keystone")
    kpatch_list = simple_file("insights_commands/kpatch_list")
    localtime = simple_file("insights_commands/file_-L_.etc.localtime")
    lpstat_p = simple_file("insights_commands/lpstat_-p")
    ls_boot = simple_file("insights_commands/ls_-lanR_.boot")
    ls_dev = simple_file("insights_commands/ls_-lanR_.dev")
    ls_disk = simple_file("insights_commands/ls_-lanR_.dev.disk")
    ls_edac_mc = simple_file(
        "insights_commands/ls_-lan_.sys.devices.system.edac.mc")
    ls_etc = simple_file(
        "insights_commands/ls_-lan_.etc_.etc.cloud.cloud.cfg.d_.etc.nova.migration_.etc.pki.ovirt-vmconsole_.etc.pki.tls.certs_.etc.pki.tls.private_.etc.rc.d.init.d_.etc.sysconfig"
    )
    ls_ipa_idoverride_memberof = simple_file(
        "insights_commands/ls_-lan_.usr.share.ipa.ui.js.plugins.idoverride-memberof"
    )
    ls_lib_firmware = simple_file("insights_commands/ls_-lanR_.lib.firmware")
    ls_ocp_cni_openshift_sdn = simple_file(
        "insights_commands/ls_-l_.var.lib.cni.networks.openshift-sdn")
    ls_origin_local_volumes_pods = simple_file(
        "insights_commands/ls_-l_.var.lib.origin.openshift.local.volumes.pods")
    ls_osroot = simple_file("insights_commands/ls_-lan")
    ls_run_systemd_generator = simple_file(
        "insights_commands/ls_-lan_.run.systemd.generator")
    ls_R_var_lib_nova_instances = simple_file(
        "insights_commands/ls_-laR_.var.lib.nova.instances")
    ls_sys_firmware = simple_file("insights_commands/ls_-lanR_.sys.firmware")
    ls_tmp = simple_file("insights_commands/ls_-la_.tmp")
    ls_usr_bin = simple_file("insights_commands/ls_-lan_.usr.bin")
    ls_usr_lib64 = simple_file("insights_commands/ls_-lan_.usr.lib64")
    ls_var_cache_pulp = simple_file(
        "insights_commands/ls_-lan_.var.cache.pulp")
    ls_var_lib_mongodb = simple_file(
        "insights_commands/ls_-la_.var.lib.mongodb")
    ls_var_lib_nova_instances = simple_file(
        "insights_commands/ls_-laRZ_.var.lib.nova.instances")
    ls_var_log = simple_file(
        "insights_commands/ls_-la_.var.log_.var.log.audit")
    ls_var_opt_mssql = simple_file("insights_commands/ls_-ld_.var.opt.mssql")
    ls_var_opt_mssql_log = simple_file(
        "insights_commands/ls_-la_.var.opt.mssql.log")
    ls_var_spool_clientmq = simple_file(
        "insights_commands/ls_-ln_.var.spool.clientmqueue")
    ls_var_spool_postfix_maildrop = simple_file(
        "insights_commands/ls_-ln_.var.spool.postfix.maildrop")
    ls_var_tmp = simple_file("insights_commands/ls_-ln_.var.tmp")
    ls_var_run = simple_file("insights_commands/ls_-lnL_.var.run")
    ls_var_www = simple_file("insights_commands/ls_-la_.dev.null_.var.www")
    lsblk = simple_file("insights_commands/lsblk")
    lsblk_pairs = simple_file(
        "insights_commands/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_file("insights_commands/lscpu")
    lsmod = simple_file("insights_commands/lsmod")
    lsof = simple_file("insights_commands/lsof")
    lspci = simple_file("insights_commands/lspci_-k")
    lspci_vmmkn = simple_file("insights_commands/lspci_-vmmkn")
    lssap = simple_file("insights_commands/usr.sap.hostctrl.exe.lssap")
    lsscsi = simple_file("insights_commands/lsscsi")
    lsvmbus = simple_file("insights_commands/lsvmbus_-vv")
    lvmconfig = first_file([
        "insights_commands/lvmconfig_--type_full",
        "insights_commands/lvm_dumpconfig_--type_full"
    ])
    lvs_noheadings = first_file([
        "insights_commands/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_lv_kernel_major_lv_kernel_minor_--config_global_locking_type_0",
        "insights_commands/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"
    ])
    max_uid = simple_file(
        "insights_commands/awk_-F_if_3_max_max_3_END_print_max_.etc.passwd")
    md5chk_files = glob_file("insights_commands/md5sum_*")
    mount = simple_file("insights_commands/mount")
    modinfo = glob_file("insights_commands/modinfo_*")
    modinfo_i40e = simple_file("insights_commands/modinfo_i40e")
    modinfo_igb = simple_file("insights_commands/modinfo_igb")
    modinfo_ixgbe = simple_file("insights_commands/modinfo_ixgbe")
    modinfo_veth = simple_file("insights_commands/modinfo_veth")
    modinfo_vmxnet3 = simple_file("insights_commands/modinfo_vmxnet3")
    mokutil_sbstate = simple_file("insights_commands/mokutil_--sb-state")
    multicast_querier = simple_file(
        "insights_commands/find_.sys.devices.virtual.net._-name_multicast_querier_-print_-exec_cat"
    )
    multipath_conf_initramfs = simple_file(
        "insights_commands/lsinitrd_-f_.etc.multipath.conf")
    multipath__v4__ll = simple_file("insights_commands/multipath_-v4_-ll")
    mysqladmin_vars = simple_file("insights_commands/mysqladmin_variables")
    named_checkconf_p = simple_file("insights_commands/named-checkconf_-p")
    ndctl_list_Ni = simple_file("insights_commands/ndctl_list_-Ni")
    netstat = simple_file("insights_commands/netstat_-neopa")
    netstat_agn = simple_file("insights_commands/netstat_-agn")
    netstat_i = simple_file("insights_commands/netstat_-i")
    netstat_s = simple_file("insights_commands/netstat_-s")
    nmcli_conn_show = simple_file("insights_commands/nmcli_conn_show")
    nmcli_dev_show = simple_file("insights_commands/nmcli_dev_show")
    nova_crontab = simple_file("insights_commands/crontab_-l_-u_nova")
    nova_uid = simple_file("insights_commands/id_-u_nova")
    ntpq_leap = simple_file("insights_commands/ntpq_-c_rv_0_leap")
    ntptime = simple_file("insights_commands/ntptime")
    numeric_user_group_name = simple_file(
        "insights_commands/grep_-c_digit_.etc.passwd_.etc.group")
    oc_get_clusterrole_with_config = simple_file(
        "insights_commands/oc_get_clusterrole_--config_.etc.origin.master.admin.kubeconfig"
    )
    oc_get_clusterrolebinding_with_config = simple_file(
        "insights_commands/oc_get_clusterrolebinding_--config_.etc.origin.master.admin.kubeconfig"
    )
    open_vm_tools_stat_raw_text_session = simple_file(
        "insights_commands/vmware-toolbox-cmd_stat_raw_text_session")
    openvswitch_other_config = simple_file(
        "insights_commands/ovs-vsctl_-t_5_get_Open_vSwitch_._other_config")
    ovs_vsctl_list_bridge = simple_file(
        "insights_commands/ovs-vsctl_list_bridge")
    ovs_vsctl_show = simple_file("insights_commands/ovs-vsctl_show")
    package_provides_command = glob_file("insights_commands/echo_*java*")
    passenger_status = simple_file("insights_commands/passenger-status")
    pci_rport_target_disk_paths = simple_file(
        "insights_commands/find_.sys.devices._-maxdepth_10_-mindepth_9_-name_stat_-type_f"
    )
    pcp_metrics = simple_file(
        "insights_commands/curl_-s_http_..127.0.0.1_44322.metrics_--connect-timeout_5"
    )
    pcs_quorum_status = simple_file("insights_commands/pcs_quorum_status")
    pcs_status = simple_file("insights_commands/pcs_status")
    pmrep_metrics = simple_file(
        "insights_commands/pmrep_-t_1s_-T_1s_network.interface.out.packets_network.interface.collisions_swap.pagesout_-o_csv"
    )
    postconf_builtin = simple_file("insights_commands/postconf_-C_builtin")
    postconf = simple_file("insights_commands/postconf")
    ps_alxwww = simple_file("insights_commands/ps_alxwww")
    ps_aux = simple_file("insights_commands/ps_aux")
    ps_auxcww = simple_file("insights_commands/ps_auxcww")
    ps_auxww = simple_file("insights_commands/ps_auxww")
    ps_ef = simple_file("insights_commands/ps_-ef")
    ps_eo = simple_file("insights_commands/ps_-eo_pid_ppid_comm")
    puppet_ca_cert_expire_date = simple_file(
        "insights_commands/openssl_x509_-in_.etc.puppetlabs.puppet.ssl.ca.ca_crt.pem_-enddate_-noout"
    )
    pvs_noheadings = simple_file(
        "insights_commands/pvs_--nameprefixes_--noheadings_--separator_-a_-o_pv_all_vg_name_--config_global_locking_type_0"
    )
    rabbitmq_report = simple_file("insights_commands/rabbitmqctl_report")
    rabbitmq_users = simple_file("insights_commands/rabbitmqctl_list_users")
    readlink_e_etc_mtab = simple_file(
        "insights_commands/readlink_-e_.etc.mtab")
    readlink_e_shift_cert_client = simple_file(
        "insights_commands/readlink_-e_.etc.origin.node.certificates.kubelet-client-current.pem"
    )
    readlink_e_shift_cert_server = simple_file(
        "insights_commands/readlink_-e_.etc.origin.node.certificates.kubelet-server-current.pem"
    )
    rhev_data_center = simple_file(
        "insights_commands/python_-m_insights.tools.cat_--no-header_rhev_data_center"
    )
    rhsm_katello_default_ca_cert = simple_file(
        "insights_commands/openssl_x509_-in_.etc.rhsm.ca.katello-default-ca.pem_-noout_-issuer"
    )
    rndc_status = simple_file("insights_commands/rndc_status")
    rpm_V_packages = first_file([
        "insights_commands/rpm_-V_coreutils_procps_procps-ng_shadow-utils_passwd_sudo_chrony",
        "insights_commands/rpm_-V_coreutils_procps_procps-ng_shadow-utils_passwd_sudo"
    ])
    saphostctl_getcimobject_sapinstance = simple_file(
        "insights_commands/usr.sap.hostctrl.exe.saphostctrl_-function_GetCIMObject_-enuminstances_SAPInstance"
    )
    satellite_content_hosts_count = first_file([
        "insights_commands/sudo_-iu_postgres_.usr.bin.psql_-d_foreman_-c_select_count_from_hosts",
        "insights_commands/sudo_-iu_postgres_psql_-d_foreman_-c_select_count_from_hosts"
    ])
    saphostexec_status = simple_file(
        "insights_commands/usr.sap.hostctrl.exe.saphostexec_-status")
    saphostexec_version = simple_file(
        "insights_commands/usr.sap.hostctrl.exe.saphostexec_-version")
    satellite_custom_ca_chain = simple_file(
        "insights_commands/awk_BEGIN_pipe_openssl_x509_-noout_-subject_-enddate_._-_BEGIN_CERT._._-_END_CERT._print_pipe_._-_END_CERT._close_pipe_printf_n_.etc.pki.katello.certs.katello-server-ca.crt"
    )
    satellite_mongodb_storage_engine = simple_file(
        "insights_commands/mongo_pulp_database_--eval_db.serverStatus_.storageEngine"
    )
    sealert = simple_file('insights_commands/sealert_-l')
    sestatus = simple_file("insights_commands/sestatus_-b")
    smbstatus_p = simple_file("insights_commands/smbstatus_-p")
    software_collections_list = simple_file('insights_commands/scl_--list')
    spamassassin_channels = simple_file(
        'insights_commands/grep_-r_s_CHANNELURL_.etc.mail.spamassassin.channel.d'
    )
    ss = simple_file("insights_commands/ss_-tupna")
    sshd_config_perms = simple_file(
        "insights_commands/ls_-l_.etc.ssh.sshd_config")
    subscription_manager_id = simple_file(
        "insights_commands/subscription-manager_identity")
    subscription_manager_installed_product_ids = simple_file(
        "insights_commands/find_.etc.pki.product-default._.etc.pki.product._-name_pem_-exec_rct_cat-cert_--no-content"
    )
    sysctl = simple_file("insights_commands/sysctl_-a")
    systemctl_cat_rpcbind_socket = simple_file(
        "insights_commands/systemctl_cat_rpcbind.socket")
    systemctl_cinder_volume = simple_file(
        "insights_commands/systemctl_show_openstack-cinder-volume")
    systemctl_httpd = simple_file("insights_commands/systemctl_show_httpd")
    systemctl_nginx = simple_file("insights_commands/systemctl_show_nginx")
    systemctl_list_unit_files = simple_file(
        "insights_commands/systemctl_list-unit-files")
    systemctl_list_units = simple_file(
        "insights_commands/systemctl_list-units")
    systemctl_mariadb = simple_file("insights_commands/systemctl_show_mariadb")
    systemctl_qpidd = simple_file("insights_commands/systemctl_show_qpidd")
    systemctl_qdrouterd = simple_file(
        "insights_commands/systemctl_show_qdrouterd")
    systemctl_show_all_services = simple_file(
        "insights_commands/systemctl_show_.service")
    systemctl_show_target = simple_file(
        "insights_commands/systemctl_show_.target")
    systemctl_smartpdc = simple_file(
        "insights_commands/systemctl_show_smart_proxy_dynflow_core")
    systemd_analyze_blame = simple_file(
        "insights_commands/systemd-analyze_blame")
    systemd_docker = first_file([
        "insights_commands/systemctl_cat_docker.service",
        "/usr/lib/systemd/system/docker.service"
    ])
    systemd_openshift_node = first_file([
        "insights_commands/systemctl_cat_atomic-openshift-node.service",
        "/usr/lib/systemd/system/atomic-openshift-node.service"
    ])
    systool_b_scsi_v = simple_file("insights_commands/systool_-b_scsi_-v")
    testparm_s = simple_file("insights_commands/testparm_-s")
    testparm_v_s = simple_file("insights_commands/testparm_-v_-s")
    tomcat_vdc_fallback = simple_file(
        "insights_commands/find_.usr.share_-maxdepth_1_-name_tomcat_-exec_.bin.grep_-R_-s_VirtualDirContext_--include_.xml"
    )
    tuned_adm = simple_file("insights_commands/tuned-adm_list")
    uname = simple_file("insights_commands/uname_-a")
    uptime = simple_file("insights_commands/uptime")
    version_info = simple_file("version_info")
    vdo_status = simple_file("insights_commands/vdo_status")
    vgdisplay = simple_file("insights_commands/vgdisplay")
    vgs_noheadings = simple_file(
        "insights_commands/vgs_--nameprefixes_--noheadings_--separator_-a_-o_vg_all_--config_global_locking_type_0"
    )
    virsh_list_all = simple_file(
        "insights_commands/virsh_--readonly_list_--all")
    virt_what = simple_file("insights_commands/virt-what")
    yum_list_available = simple_file(
        "insights_commands/yum_-C_--noplugins_list_available")
    yum_repolist = first_file([
        "insights_commands/yum_-C_--noplugins_repolist",
        "insights_commands/yum_-C_repolist"
    ])
    yum_updateinfo = simple_file("insights_commands/yum_-C_updateinfo_list")
class InsightsArchiveSpecs(Specs):

    blkid = simple_file("insights_commands/blkid_-c_.dev.null")
    brctl_show = simple_file("insights_commands/brctl_show")
    ceph_df_detail = simple_file(
        "insights_commands/ceph_df_detail_-f_json-pretty")
    ceph_health_detail = simple_file(
        "insights_commands/ceph_health_detail_-f_json-pretty")
    ceph_osd_df = simple_file("insights_commands/ceph_osd_df_-f_json-pretty")
    ceph_osd_dump = simple_file(
        "insights_commands/ceph_osd_dump_-f_json-pretty")
    ceph_osd_ec_profile_ls = simple_file(
        "insights_commands/ceph_osd_erasure-code-profile_ls")
    ceph_osd_tree = simple_file(
        "insights_commands/ceph_osd_tree_-f_json-pretty")
    ceph_s = simple_file("insights_commands/ceph_-s_-f_json-pretty")
    ceph_v = simple_file("insights_commands/ceph_-v")
    certificates_enddate = simple_file(
        "insights_commands/find_.etc.origin.node_.etc.origin.master_.etc.pki_-type_f_-exec_.usr.bin.openssl_x509_-noout_-enddate_-in_-exec_echo_FileName"
    )
    chkconfig = simple_file("insights_commands/chkconfig_--list")
    chronyc_sources = simple_file("insights_commands/chronyc_sources")
    crt = simple_file(
        "insights_commands/find_.etc.origin.node_.etc.origin.master_-type_f_-path_.crt"
    )
    date = simple_file("insights_commands/date")
    date_iso = simple_file("insights_commands/date_--iso-8601_seconds")
    date_utc = simple_file("insights_commands/date_--utc")
    df__al = simple_file("insights_commands/df_-al")
    df__alP = simple_file("insights_commands/df_-alP")
    df__li = simple_file("insights_commands/df_-li")
    dig = simple_file("insights_commands/dig_dnssec_._DNSKEY")
    dig_dnssec = simple_file("insights_commands/dig_dnssec_._SOA")
    dig_edns = simple_file("insights_commands/dig_edns_0_._SOA")
    dig_noedns = simple_file("insights_commands/dig_noedns_._SOA")
    display_java = simple_file("insights_commands/alternatives_--display_java")
    dmesg = simple_file("insights_commands/dmesg")
    dmidecode = simple_file("insights_commands/dmidecode")
    docker_info = simple_file("insights_commands/docker_info")
    docker_list_containers = simple_file(
        "insights_commands/docker_ps_--all_--no-trunc")
    docker_list_images = simple_file(
        "insights_commands/docker_images_--all_--no-trunc_--digests")
    dumpdev = simple_file(
        "insights_commands/awk_.ext_234_._print_1_.proc.mounts")
    engine_config_all = simple_file("insights_commands/engine-config_--all")
    ethtool = glob_file("insights_commands/ethtool_*", ignore="ethtool_-.*")
    ethtool_S = glob_file("insights_commands/ethtool_-S_*")
    ethtool_a = glob_file("insights_commands/ethtool_-a_*")
    ethtool_c = glob_file("insights_commands/ethtool_-c_*")
    ethtool_g = glob_file("insights_commands/ethtool_-g_*")
    ethtool_i = glob_file("insights_commands/ethtool_-i_*")
    ethtool_k = glob_file("insights_commands/ethtool_-k_*")
    facter = simple_file("insights_commands/facter")
    fc_match = simple_file(
        "insights_commands/fc-match_-sv_sans_regular_roman_family_fontformat")
    fdisk_l = simple_file("insights_commands/fdisk_-l")
    foreman_rake_db_migrate_status = simple_file(
        'insights_commands/foreman-rake_db_migrate_status')
    getcert_list = simple_file("insights_commands/getcert_list")
    getenforce = simple_file("insights_commands/getenforce")
    getsebool = simple_file("insights_commands/getsebool_-a")
    grub1_config_perms = simple_file(
        "insights_commands/ls_-l_.boot.grub.grub.conf")
    grub_config_perms = simple_file(
        "insights_commands/ls_-l_.boot.grub2.grub.cfg")
    hammer_ping = simple_file("insights_commands/hammer_ping")
    hammer_task_list = simple_file("insights_commands/hammer_--csv_task_list")
    heat_crontab = simple_file("insights_commands/crontab_-l_-u_heat")
    # simple_file("insights_commands/rpm_-qa_--qf_NAME_-_VERSION_-_RELEASE_._ARCH_INSTALLTIME_date_BUILDTIME_RSAHEADER_pgpsig_DSAHEADER_pgpsig")])
    installed_rpms = first_file([
        "insights_commands/rpm_-qa_--qf_NAME_-_VERSION_-_RELEASE_._ARCH_INSTALLTIME_date_BUILDTIME_VENDOR_BUILDHOST_DUMMY_SIGPGP_pgpsig",
        "insights_commands/rpm_-qa_--qf_NAME_-_VERSION_-_RELEASE_._ARCH_INSTALLTIME_date_BUILDTIME_RSAHEADER_pgpsig_DSAHEADER_pgpsig"
    ])
    hostname = first_of([
        simple_file("insights_commands/hostname_-f"),
        simple_file("insights_commands/hostname")
    ])
    hponcfg_g = simple_file("insights_commands/hponcfg_-g")
    httpd_M = glob_file("insights_commands/httpd*_-M")
    httpd_pid = simple_file("insights_commands/pgrep_-o_httpd")
    httpd_V = glob_file("insights_commands/httpd*_-V")
    ifconfig = simple_file("insights_commands/ifconfig_-a")
    ip6tables = simple_file("insights_commands/ip6tables-save")
    ip_addr = simple_file("insights_commands/ip_addr")
    ip_route_show_table_all = simple_file(
        "insights_commands/ip_route_show_table_all")
    ip_s_link = simple_file("insights_commands/ip_-s_link")
    ipcs_s = simple_file("insights_commands/ipcs_-s")
    iptables = simple_file("insights_commands/iptables-save")
    ipv4_neigh = simple_file("insights_commands/ip_-4_neighbor_show_nud_all")
    ipv6_neigh = simple_file("insights_commands/ip_-6_neighbor_show_nud_all")
    iscsiadm_m_session = simple_file("insights_commands/iscsiadm_-m_session")
    katello_service_status = simple_file(
        "insights_commands/katello-service_status")
    keystone_crontab = simple_file("insights_commands/crontab_-l_-u_keystone")
    libkeyutils = simple_file(
        "insights_commands/find_-L_.lib_.lib64_-name_libkeyutils.so")
    libkeyutils_objdumps = simple_file(
        "insights_commands/find_-L_.lib_.lib64_-name_libkeyutils.so.1_-exec_objdump_-x"
    )
    locale = simple_file("insights_commands/locale")
    localtime = simple_file("insights_commands/file_-L_.etc.localtime")
    lpstat_p = simple_file("insights_commands/lpstat_-p")
    ls_boot = simple_file("insights_commands/ls_-lanR_.boot")
    ls_dev = simple_file("insights_commands/ls_-lanR_.dev")
    ls_disk = simple_file("insights_commands/ls_-lanR_.dev.disk")
    ls_docker_volumes = simple_file(
        "insights_commands/ls_-lanR_.var.lib.docker.volumes")
    ls_etc = simple_file("insights_commands/ls_-lanR_.etc")
    ls_sys_firmware = simple_file("insights_commands/ls_-lanR_.sys.firmware")
    ls_var_log = simple_file(
        "insights_commands/ls_-la_.var.log_.var.log.audit")
    ls_var_www = simple_file("insights_commands/ls_-la_.dev.null_.var.www")
    ls_var_tmp = simple_file("insights_commands/ls_-lanR_.var.tmp")
    lsblk = simple_file("insights_commands/lsblk")
    lsblk_pairs = simple_file(
        "insights_commands/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_file("insights_commands/lscpu")
    lsmod = simple_file("insights_commands/lsmod")
    lsof = simple_file("insights_commands/lsof")
    lspci = simple_file("insights_commands/lspci")
    lssap = simple_file("insights_commands/usr.sap.hostctrl.exe.lssap")
    lvdisplay = simple_file("insights_commands/lvdisplay")
    lvs_noheadings = simple_file(
        "insights_commands/lvs_--nameprefixes_--noheadings_--separator_-a_-o_lv_name_lv_size_lv_attr_mirror_log_vg_name_devices_region_size_data_percent_metadata_percent_--config_global_locking_type_0"
    )
    lvs_noheadings_all = simple_file(
        "insights_commands/lvs_--nameprefixes_--noheadings_--separator_-a_-o_lv_name_lv_size_lv_attr_mirror_log_vg_name_devices_region_size_data_percent_metadata_percent_--config_global_locking_type_0_devices_filter_a"
    )
    md5chk_files = simple_file(
        "insights_commands/ls_-H_.usr.lib_._libfreeblpriv3.so_libsoftokn3.so_.etc.pki.product_.69.pem_.etc.fonts.fonts.conf_.dev.null_2_.dev.null"
    )
    mlx4_port = simple_file(
        "insights_commands/find_.sys.bus.pci.devices._.mlx4_port_0-9_-print_-exec_cat"
    )
    mount = simple_file("insights_commands/mount")
    multicast_querier = simple_file(
        "insights_commands/find_.sys.devices.virtual.net._-name_multicast_querier_-print_-exec_cat"
    )
    multipath__v4__ll = simple_file("insights_commands/multipath_-v4_-ll")
    named_checkconf_p = simple_file("insights_commands/named-checkconf_-p")
    netstat = simple_file("insights_commands/netstat_-neopa")
    netstat_agn = simple_file("insights_commands/netstat_-agn")
    netstat_i = simple_file("insights_commands/netstat_-i")
    netstat_s = simple_file("insights_commands/netstat_-s")
    nmcli_dev_show = simple_file("insights_commands/nmcli_dev_show")
    nova_crontab = simple_file("insights_commands/crontab_-l_-u_nova")
    ntpq_leap = simple_file("insights_commands/ntpq_-c_rv_0_leap")
    ntpq_pn = simple_file("insights_commands/ntpq_-pn")
    ntptime = simple_file("insights_commands/ntptime")
    numeric_user_group_name = simple_file(
        "insights_commands/grep_-c_digit_.etc.passwd_.etc.group")
    oc_get_bc = simple_file(
        "insights_commands/oc_get_bc_-o_yaml_--all-namespaces")
    oc_get_dc = simple_file(
        "insights_commands/oc_get_dc_-o_yaml_--all-namespaces")
    oc_get_egressnetworkpolicy = simple_file(
        "insights_commands/oc_get_egressnetworkpolicy_-o_yaml_--all-namespaces"
    )
    oc_get_endpoints = simple_file(
        "insights_commands/oc_get_endpoints_-o_yaml_--all-namespaces")
    oc_get_event = simple_file(
        "insights_commands/oc_get_event_-o_yaml_--all-namespaces")
    oc_get_node = simple_file("insights_commands/oc_get_nodes_-o_yaml")
    oc_get_pod = simple_file(
        "insights_commands/oc_get_pod_-o_yaml_--all-namespaces")
    oc_get_project = simple_file(
        "insights_commands/oc_get_project_-o_yaml_--all-namespaces")
    oc_get_pv = simple_file(
        "insights_commands/oc_get_pv_-o_yaml_--all-namespaces")
    oc_get_pvc = simple_file(
        "insights_commands/oc_get_pvc_-o_yaml_--all-namespaces")
    oc_get_rc = simple_file(
        "insights_commands/oc_get_rc_-o_yaml_--all-namespaces")
    oc_get_role = simple_file(
        "insights_commands/oc_get_role_-o_yaml_--all-namespaces")
    oc_get_rolebinding = simple_file(
        "insights_commands/oc_get_rolebinding_-o_yaml_--all-namespaces")
    oc_get_route = simple_file(
        "insights_commands/oc_get_route_-o_yaml_--all-namespaces")
    oc_get_service = simple_file(
        "insights_commands/oc_get_service_-o_yaml_--all-namespaces")
    openvswitch_other_config = simple_file(
        "insights_commands/ovs-vsctl_-t_5_get_Open_vSwitch_._other_config")
    ovs_vsctl_show = simple_file("insights_commands/ovs-vsctl_show")
    parted__l = simple_file("insights_commands/parted_-l_-s")
    pcs_status = simple_file("insights_commands/pcs_status")
    ps_aux = simple_file("insights_commands/ps_aux")
    ps_auxcww = simple_file("insights_commands/ps_auxcww")
    ps_auxww = simple_file("insights_commands/ps_auxww")
    pvs = simple_file(
        "insights_commands/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_file(
        "insights_commands/pvs_--nameprefixes_--noheadings_--separator_-a_-o_pv_all_vg_name_--config_global_locking_type_0"
    )
    pvs_noheadings_all = simple_file(
        "insights_commands/pvs_--nameprefixes_--noheadings_--separator_-a_-o_pv_all_vg_name_--config_global_locking_type_0_devices_filter_a"
    )
    qpid_stat_q = simple_file(
        "insights_commands/qpid-stat_-q_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671"
    )
    qpid_stat_u = simple_file(
        "insights_commands/qpid-stat_-u_--ssl-certificate_.etc.pki.katello.qpid_client_striped.crt_-b_amqps_..localhost_5671"
    )
    rabbitmq_policies = simple_file(
        "insights_commands/rabbitmqctl_list_policies")
    rabbitmq_queues = simple_file(
        "insights_commands/rabbitmqctl_list_queues_name_messages_consumers_auto_delete"
    )
    rabbitmq_report = simple_file("insights_commands/rabbitmqctl_report")
    rabbitmq_users = simple_file("insights_commands/rabbitmqctl_list_users")
    rhn_charsets = simple_file("insights_commands/rhn-charsets")
    rhn_schema_stats = simple_file("insights_commands/rhn-schema-stats")
    rhn_schema_version = simple_file("insights_commands/rhn-schema-version")
    root_crontab = simple_file("insights_commands/crontab_-l_-u_root")
    route = simple_file("insights_commands/route_-n")
    rpm_V_packages = simple_file(
        "insights_commands/rpm_-V_coreutils_procps_procps-ng_shadow-utils_passwd_sudo"
    )
    saphostctl_getcimobject_sapinstance = simple_file(
        "insights_commands/saphostctrl_-function_GetCIMObject_-enuminstances_SAPInstance"
    )
    sestatus = simple_file("insights_commands/sestatus_-b")
    smbstatus_S = simple_file("insights_commands/smbstatus_-S")
    smbstatus_p = simple_file("insights_commands/smbstatus_-p")
    ss = simple_file("insights_commands/ss_-tulpn")
    sshd_config_perms = simple_file(
        "insights_commands/ls_-l_.etc.ssh.sshd_config")
    subscription_manager_list_consumed = simple_file(
        'insights_commands/subscription-manager_list_--consumed')
    subscription_manager_list_installed = simple_file(
        'insights_commands/subscription-manager_list_--installed')
    sysctl = simple_file("insights_commands/sysctl_-a")
    sysctl_conf_initramfs = simple_file(
        "insights_commands/lsinitrd_.boot.initramfs-_kdump.img_-f_.etc.sysctl.conf_.etc.sysctl.d._.conf"
    )
    systemctl_cinder_volume = simple_file(
        "insights_commands/systemctl_show_openstack-cinder-volume")
    systemctl_list_unit_files = simple_file(
        "insights_commands/systemctl_list-unit-files")
    systemctl_list_units = simple_file(
        "insights_commands/systemctl_list-units")
    systemctl_mariadb = simple_file("insights_commands/systemctl_show_mariadb")
    systemctl_pulp_workers = simple_file(
        "insights_commands/systemctl_show_pulp_workers")
    systemctl_pulp_resmg = simple_file(
        "insights_commands/systemctl_show_pulp_resource_manager")
    systemctl_pulp_celerybeat = simple_file(
        "insights_commands/systemctl_show_pulp_celerybeat")
    tomcat_vdc_fallback = simple_file(
        "insights_commands/find_.usr.share_-maxdepth_1_-name_tomcat_-exec_.bin.grep_-R_-s_VirtualDirContext_--include_.xml"
    )
    tuned_adm = simple_file("insights_commands/tuned-adm_list")
    uname = simple_file("insights_commands/uname_-a")
    uptime = simple_file("insights_commands/uptime")
    vgdisplay = simple_file("insights_commands/vgdisplay")
    vgs_noheadings = simple_file(
        "insights_commands/vgs_--nameprefixes_--noheadings_--separator_-a_-o_vg_all_--config_global_locking_type_0"
    )
    vgs_noheadings_all = simple_file(
        "insights_commands/vgs_--nameprefixes_--noheadings_--separator_-a_-o_vg_all_--config_global_locking_type_0_devices_filter_a"
    )
    virt_what = simple_file("insights_commands/virt-what")
    woopsie = simple_file(
        "insights_commands/find_.var.crash_.var.tmp_-path_.reports-_.whoopsie-report"
    )
    yum_repolist = simple_file("insights_commands/yum_-C_repolist")
Exemple #11
0
class DefaultSpecs(Specs):
    abrt_status_bare = simple_command("/usr/bin/abrt status --bare=True")
    amq_broker = glob_file("/var/opt/amq-broker/*/etc/broker.xml")
    auditctl_status = simple_command("/sbin/auditctl -s")
    auditd_conf = simple_file("/etc/audit/auditd.conf")
    audit_log = simple_file("/var/log/audit/audit.log")
    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
        raise SkipComponent()

    aws_instance_id_doc = simple_command(
        "/usr/bin/curl -s http://169.254.169.254/latest/dynamic/instance-identity/document --connect-timeout 5",
        deps=[is_aws])
    aws_instance_id_pkcs7 = simple_command(
        "/usr/bin/curl -s http://169.254.169.254/latest/dynamic/instance-identity/pkcs7 --connect-timeout 5",
        deps=[is_aws])

    @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
        raise SkipComponent()

    azure_instance_type = simple_command(
        "/usr/bin/curl -s -H Metadata:true http://169.254.169.254/metadata/instance/compute/vmSize?api-version=2018-10-01&format=text --connect-timeout 5",
        deps=[is_azure])
    bios_uuid = simple_command("/usr/sbin/dmidecode -s system-uuid")
    blkid = simple_command("/sbin/blkid -c /dev/null")
    bond = glob_file("/proc/net/bonding/bond*")
    bond_dynamic_lb = glob_file(
        "/sys/class/net/bond[0-9]*/bonding/tlb_dynamic_lb")
    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")
    cgroups = simple_file("/proc/cgroups")
    ps_alxwww = simple_command("/bin/ps alxwww")
    ps_aux = simple_command("/bin/ps aux")
    ps_auxcww = simple_command("/bin/ps auxcww")
    ps_auxww = simple_command("/bin/ps auxww")
    ps_ef = simple_command("/bin/ps -ef")
    ps_eo = simple_command("/usr/bin/ps -eo pid,ppid,comm")

    @datasource(ps_auxww)
    def tomcat_base(broker):
        """
        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
        for p in ps:
            found = findall(p)
            if found:
                # Only get the path which is absolute
                results.extend(f for f in found if f[0] == '/')
        return list(set(results))

    catalina_out = foreach_collect(tomcat_base, "%s/catalina.out")
    cciss = glob_file("/proc/driver/cciss/cciss*")
    cdc_wdm = simple_file("/sys/bus/usb/drivers/cdc_wdm/module/refcnt")
    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_conf = first_file([
        "/var/lib/config-data/puppet-generated/ceph/etc/ceph/ceph.conf",
        "/etc/ceph/ceph.conf"
    ])
    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):
            return True
        raise SkipComponent()

    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_ec_profile_ls = simple_command(
        "/usr/bin/ceph osd erasure-code-profile ls")
    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")
    ceph_v = simple_command("/usr/bin/ceph -v")
    certificates_enddate = simple_command(
        "/usr/bin/find /etc/origin/node /etc/origin/master /etc/pki /etc/ipa -type f -exec /usr/bin/openssl x509 -noout -enddate -in '{}' \; -exec echo 'FileName= {}' \;"
    )
    chkconfig = simple_command("/sbin/chkconfig --list")
    chrony_conf = simple_file("/etc/chrony.conf")
    chronyc_sources = simple_command("/usr/bin/chronyc sources")
    cib_xml = simple_file("/var/lib/pacemaker/cib/cib.xml")
    cinder_api_log = first_file([
        "/var/log/containers/cinder/cinder-api.log",
        "/var/log/cinder/cinder-api.log"
    ])
    cinder_conf = first_file([
        "/var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf",
        "/etc/cinder/cinder.conf"
    ])
    cinder_volume_log = simple_file("/var/log/cinder/volume.log")
    cloud_init_custom_network = simple_file(
        "/etc/cloud/cloud.cfg.d/99-custom-networking.cfg")
    cloud_init_log = simple_file("/var/log/cloud-init.log")
    cluster_conf = simple_file("/etc/cluster/cluster.conf")
    cmdline = simple_file("/proc/cmdline")
    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")
    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_vulns = glob_file("sys/devices/system/cpu/vulnerabilities/*")
    cpuinfo = simple_file("/proc/cpuinfo")
    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")
    crypto_policies_config = simple_file("/etc/crypto-policies/config")
    crypto_policies_state_current = simple_file(
        "/etc/crypto-policies/state/current")
    crypto_policies_opensshserver = simple_file(
        "/etc/crypto-policies/back-ends/opensshserver.config")
    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_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_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_errors = glob_file("var/log/dirsrv/*/errors*")
    dmesg = simple_command("/bin/dmesg")
    dmesg_log = simple_file("/var/log/dmesg")
    dmidecode = simple_command("/usr/sbin/dmidecode")
    dnf_conf = simple_file("/etc/dnf/dnf.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")
    docker_storage_setup = simple_file("/etc/sysconfig/docker-storage-setup")
    docker_sysconfig = simple_file("/etc/sysconfig/docker")
    dracut_kdump_capture_service = simple_file(
        "/usr/lib/dracut/modules.d/99kdumpbase/kdump-capture.service")
    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")
    etc_journald_conf_d = glob_file(r"etc/systemd/journald.conf.d/*.conf")
    etc_machine_id = simple_file("/etc/machine-id")
    etcd_conf = simple_file("/etc/etcd/etcd.conf")
    ethernet_interfaces = listdir("/sys/class/net", context=HostContext)
    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_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")
    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")
    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")
    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")
    gluster_v_info = simple_command("/usr/sbin/gluster volume info")
    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")
    grub_config_perms = simple_command(
        "/bin/ls -l /boot/grub2/grub.cfg")  # only RHEL7 and updwards
    grub_efi_conf = simple_file("/boot/efi/EFI/redhat/grub.conf")
    grub1_config_perms = simple_command(
        "/bin/ls -l /boot/grub/grub.conf")  # RHEL6
    grub2_cfg = simple_file("/boot/grub2/grub.cfg")
    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_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"
    ])
    hostname = simple_command("/bin/hostname -f")
    hostname_default = simple_command("/bin/hostname")
    hostname_short = simple_command("/bin/hostname -s")
    hosts = simple_file("/etc/hosts")
    httpd_conf = glob_file([
        "/etc/httpd/conf/httpd.conf", "/etc/httpd/conf.d/*.conf",
        "/etc/httpd/conf.d/*/*.conf", "/etc/httpd/conf.modules.d/*.conf"
    ])
    httpd_conf_scl_httpd24 = glob_file([
        "/opt/rh/httpd24/root/etc/httpd/conf/httpd.conf",
        "/opt/rh/httpd24/root/etc/httpd/conf.d/*.conf",
        "/opt/rh/httpd24/root/etc/httpd/conf.d/*/*.conf",
        "/opt/rh/httpd24/root/etc/httpd/conf.modules.d/*.conf"
    ])
    httpd_conf_scl_jbcs_httpd24 = glob_file([
        "/opt/rh/jbcs-httpd24/root/etc/httpd/conf/httpd.conf",
        "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/*.conf",
        "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.d/*/*.conf",
        "/opt/rh/jbcs-httpd24/root/etc/httpd/conf.modules.d/*.conf"
    ])
    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")
    virt_uuid_facts = simple_file("/etc/rhsm/facts/virt_uuid.facts")

    @datasource(ps_auxww)
    def httpd_cmd(broker):
        """
        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:
            p_splits = p.split(None, 10)
            if len(p_splits) >= 11:
                cmd = p_splits[10].split()[0]
                # Should compatible with RHEL6
                # e.g. /usr/sbin/httpd, /usr/sbin/httpd.worker and /usr/sbin/httpd.event
                #      and SCL's httpd24-httpd
                if os.path.basename(cmd).startswith('httpd'):
                    ps_httpds.add(cmd)
        # Running multiple httpd instances on RHEL is supported
        # https://access.redhat.com/solutions/21680
        return list(ps_httpds)

    httpd_M = foreach_execute(httpd_cmd, "%s -M")
    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-*")
    imagemagick_policy = glob_file([
        "/etc/ImageMagick/policy.xml",
        "/usr/lib*/ImageMagick-6.5.4/config/policy.xml"
    ])
    initctl_lst = simple_command("/sbin/initctl --system list")
    initscript = glob_file("/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")
    ip_addresses = simple_command("/bin/hostname -I")
    ip_route_show_table_all = simple_command("/sbin/ip route show table all")
    ip_s_link = simple_command("/sbin/ip -s -d link")
    ipaupgrade_log = simple_file("/var/log/ipaupgrade.log")
    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")
    iptables = simple_command("/sbin/iptables-save")
    iptables_permanent = simple_file("etc/sysconfig/iptables")
    ip6tables = simple_command("/sbin/ip6tables-save")
    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")
    iscsiadm_m_session = simple_command("/usr/sbin/iscsiadm -m session")
    kdump_conf = simple_file("/etc/kdump.conf")
    kernel_config = glob_file("/boot/config-*")
    kexec_crash_size = simple_file("/sys/kernel/kexec_crash_size")
    keystone_crontab = simple_command("/usr/bin/crontab -l -u keystone")
    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")
    kubepods_cpu_quota = glob_file(
        "/sys/fs/cgroup/cpu/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod[a-f0-9_]*.slice/cpu.cfs_quota_us"
    )
    last_upload_globs = [
        "/etc/redhat-access-insights/.lastupload",
        "/etc/insights-client/.lastupload"
    ]
    lastupload = glob_file(last_upload_globs)
    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")
    limits_conf = glob_file(
        ["/etc/security/limits.conf", "/etc/security/limits.d/*.conf"])
    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")
    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"
    ])
    ls_etc = simple_command("ls -lan {0}".format(' '.join(etc_and_sub_dirs)))
    ls_lib_firmware = simple_command("/bin/ls -lanR /lib/firmware")
    ls_ocp_cni_openshift_sdn = simple_command(
        "/bin/ls -l /var/lib/cni/networks/openshift-sdn")
    ls_origin_local_volumes_pods = simple_command(
        "/bin/ls -l /var/lib/origin/openshift.local.volumes/pods")
    ls_osroot = simple_command("/bin/ls -lan /")
    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_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")
    ls_var_opt_mssql = simple_command("/bin/ls -ld /var/opt/mssql")
    ls_var_opt_mssql_log = simple_command("/bin/ls -la /var/opt/mssql/log")
    ls_var_spool_clientmq = simple_command(
        "/bin/ls -ln /var/spool/clientmqueue")
    ls_var_spool_postfix_maildrop = simple_command(
        "/bin/ls -ln /var/spool/postfix/maildrop")
    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
    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")
    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")
    lvm_conf = simple_file("/etc/lvm/lvm.conf")
    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}\""
    )
    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"
    ])
    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([
        "/etc/pki/product/69.pem", "/etc/pki/product-default/69.pem",
        "/usr/lib/libsoftokn3.so", "/usr/lib64/libsoftokn3.so",
        "/usr/lib/libfreeblpriv3.so", "/usr/lib64/libfreeblpriv3.so"
    ], "/usr/bin/md5sum %s")
    mdstat = simple_file("/proc/mdstat")
    meminfo = first_file(["/proc/meminfo", "/meminfo"])
    messages = simple_file("/var/log/messages")
    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")
    modprobe = glob_file(["/etc/modprobe.conf", "/etc/modprobe.d/*.conf"])
    mongod_conf = glob_file([
        "/etc/mongod.conf", "/etc/mongodb.conf",
        "/etc/opt/rh/rh-mongodb26/mongod.conf"
    ])
    mount = simple_command("/bin/mount")
    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_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"
    ])
    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")
    netconsole = simple_file("/etc/sysconfig/netconsole")
    netstat = simple_command("/bin/netstat -neopa")
    netstat_agn = simple_command("/bin/netstat -agn")
    netstat_i = simple_command("/bin/netstat -i")
    netstat_s = simple_command("/bin/netstat -s")
    networkmanager_dispatcher_d = glob_file(
        "/etc/NetworkManager/dispatcher.d/*-dhclient")
    neutron_conf = first_file([
        "/var/lib/config-data/puppet-generated/neutron/etc/neutron/neutron.conf",
        "/etc/neutron/neutron.conf"
    ])
    neutron_sriov_agent = first_file([
        "/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/ml2/sriov_agent.ini",
        "/etc/neutron/plugins/ml2/sriov_agent.ini"
    ])
    neutron_dhcp_agent_ini = first_file([
        "/var/lib/config-data/puppet-generated/neutron/etc/neutron/dhcp_agent.ini",
        "/etc/neutron/dhcp_agent.ini"
    ])
    neutron_l3_agent_ini = first_file([
        "/var/lib/config-data/puppet-generated/neutron/etc/neutron/l3_agent.ini",
        "/etc/neutron/l3_agent.ini"
    ])
    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_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"
    ])
    nfnetlink_queue = simple_file("/proc/net/netfilter/nfnetlink_queue")
    nfs_exports = simple_file("/etc/exports")
    nfs_exports_d = glob_file("/etc/exports.d/*.exports")
    nginx_conf = glob_file([
        "/etc/nginx/*.conf", "/etc/nginx/conf.d/*", "/etc/nginx/default.d/*",
        "/opt/rh/nginx*/root/etc/nginx/*.conf",
        "/opt/rh/nginx*/root/etc/nginx/conf.d/*",
        "/opt/rh/nginx*/root/etc/nginx/default.d/*",
        "/etc/opt/rh/rh-nginx*/nginx/*.conf",
        "/etc/opt/rh/rh-nginx*/nginx/conf.d/*",
        "/etc/opt/rh/rh-nginx*/nginx/default.d/*"
    ])
    nmcli_conn_show = simple_command("/usr/bin/nmcli conn show")
    nmcli_dev_show = simple_command("/usr/bin/nmcli dev show")
    nova_api_log = first_file([
        "/var/log/containers/nova/nova-api.log", "/var/log/nova/nova-api.log"
    ])
    nova_compute_log = first_file([
        "/var/log/containers/nova/nova-compute.log",
        "/var/log/nova/nova-compute.log"
    ])
    nova_conf = first_file([
        "/var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf",
        "/var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf",
        "/etc/nova/nova.conf"
    ])
    nova_crontab = simple_command("/usr/bin/crontab -l -u nova")
    nova_uid = simple_command("/usr/bin/id -u nova")
    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'")
    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_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"
    )
    odbc_ini = simple_file("/etc/odbc.ini")
    odbcinst_ini = simple_file("/etc/odbcinst.ini")
    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")
    os_release = simple_file("etc/os-release")
    ose_master_config = simple_file("/etc/origin/master/master-config.yaml")
    ose_node_config = simple_file("/etc/origin/node/node-config.yaml")
    ovirt_engine_server_log = simple_file("/var/log/ovirt-engine/server.log")
    ovirt_engine_ui_log = simple_file("/var/log/ovirt-engine/ui.log")
    ovs_vsctl_list_bridge = simple_command("/usr/bin/ovs-vsctl list bridge")
    ovs_vsctl_show = simple_command("/usr/bin/ovs-vsctl show")
    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])
    passenger_status = simple_command("/usr/bin/passenger-status")
    password_auth = simple_file("/etc/pam.d/password-auth")
    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")
    postgresql_conf = first_file([
        "/var/lib/pgsql/data/postgresql.conf",
        "/opt/rh/postgresql92/root/var/lib/pgsql/data/postgresql.conf",
        "database/postgresql.conf"
    ])
    postgresql_log = first_of([
        glob_file("/var/lib/pgsql/data/pg_log/postgresql-*.log"),
        glob_file(
            "/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_log/postgresql-*.log"
        ),
        glob_file("/database/postgresql-*.log")
    ])
    puppetserver_config = simple_file("/etc/sysconfig/puppetserver")
    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_noheadings = simple_command(
        "/sbin/pvs --nameprefixes --noheadings --separator='|' -a -o pv_all,vg_name --config=\"global{locking_type=0}\""
    )
    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"
    )
    qpidd_conf = simple_file("/etc/qpid/qpidd.conf")
    rabbitmq_env = simple_file("/etc/rabbitmq/rabbitmq-env.conf")
    rabbitmq_report = simple_command("/usr/sbin/rabbitmqctl report")
    rabbitmq_startup_log = simple_file("/var/log/rabbitmq/startup_log")
    rabbitmq_users = simple_command("/usr/sbin/rabbitmqctl list_users")
    rc_local = simple_file("/etc/rc.d/rc.local")
    rdma_conf = simple_file("/etc/rdma/rdma.conf")
    readlink_e_etc_mtab = simple_command("/usr/bin/readlink -e /etc/mtab")
    readlink_e_shift_cert_client = simple_command(
        "/usr/bin/readlink -e /etc/origin/node/certificates/kubelet-client-current.pem"
    )
    readlink_e_shift_cert_server = simple_command(
        "/usr/bin/readlink -e /etc/origin/node/certificates/kubelet-server-current.pem"
    )
    redhat_release = simple_file("/etc/redhat-release")
    resolv_conf = simple_file("/etc/resolv.conf")
    rhn_conf = first_file(["/etc/rhn/rhn.conf", "/conf/rhn/rhn/rhn.conf"])
    rhn_entitlement_cert_xml = first_of([
        glob_file("/etc/sysconfig/rhn/rhn-entitlement-cert.xml*"),
        glob_file("/conf/rhn/sysconfig/rhn/rhn-entitlement-cert.xml*")
    ])
    rhn_schema_version = simple_command("/usr/bin/rhn-schema-version")
    rhn_taskomatic_daemon_log = first_file([
        "/var/log/rhn/rhn_taskomatic_daemon.log",
        "rhn-logs/rhn/rhn_taskomatic_daemon.log"
    ])
    rhsm_conf = simple_file("/etc/rhsm/rhsm.conf")
    rhsm_log = simple_file("/var/log/rhsm/rhsm.log")
    rhsm_releasever = simple_file('/var/lib/rhsm/cache/releasever.json')
    rndc_status = simple_command("/usr/sbin/rndc status")
    rpm_V_packages = simple_command(
        "/bin/rpm -V coreutils procps procps-ng shadow-utils passwd sudo chrony",
        keep_rc=True)
    rsyslog_conf = simple_file("/etc/rsyslog.conf")
    samba = simple_file("/etc/samba/smb.conf")

    @datasource(Sap)
    def sap_sid_name(broker):
        """(list): Returns the list of (SAP SID, SAP InstanceName) """
        sap = broker[Sap]
        return [(sap.sid(i), i) for i in sap.local_instances]

    sap_dev_disp = foreach_collect(sap_sid_name,
                                   "/usr/sap/%s/%s/work/dev_disp")
    sap_dev_rd = foreach_collect(sap_sid_name, "/usr/sap/%s/%s/work/dev_rd")
    saphostctl_getcimobject_sapinstance = simple_command(
        "/usr/sap/hostctrl/exe/saphostctrl -function GetCIMObject -enuminstances SAPInstance"
    )
    sat5_insights_properties = simple_file(
        "/etc/redhat-access/redhat-access-insights.properties")
    satellite_mongodb_storage_engine = simple_command(
        "/usr/bin/mongo pulp_database --eval 'db.serverStatus().storageEngine'"
    )
    satellite_version_rb = simple_file(
        "/usr/share/foreman/lib/satellite/version.rb")
    satellite_custom_hiera = simple_file(
        "/etc/foreman-installer/custom-hiera.yaml")
    scsi = simple_file("/proc/scsi/scsi")
    scsi_eh_deadline = glob_file('/sys/class/scsi_host/host[0-9]*/eh_deadline')
    scsi_fwver = glob_file('/sys/class/scsi_host/host[0-9]*/fwrev')
    sctp_asc = simple_file('/proc/net/sctp/assocs')
    sctp_eps = simple_file('/proc/net/sctp/eps')
    sctp_snmp = simple_file('/proc/net/sctp/snmp')
    sealert = simple_command('/usr/bin/sealert -l "*"')
    selinux_config = simple_file("/etc/selinux/config")
    sestatus = simple_command("/usr/sbin/sestatus -b")
    setup_named_chroot = simple_file("/usr/libexec/setup-named-chroot.sh")
    smbstatus_p = simple_command("/usr/bin/smbstatus -p")
    smartpdc_settings = simple_file(
        "/etc/smart_proxy_dynflow_core/settings.yml")
    sockstat = simple_file("/proc/net/sockstat")
    softnet_stat = simple_file("proc/net/softnet_stat")
    software_collections_list = simple_command('/usr/bin/scl --list')
    ss = simple_command("/usr/sbin/ss -tupna")
    ssh_config = simple_file("/etc/ssh/ssh_config")
    ssh_foreman_proxy_config = simple_file(
        "/usr/share/foreman-proxy/.ssh/ssh_config")
    sshd_config = simple_file("/etc/ssh/sshd_config")
    sshd_config_perms = simple_command("/bin/ls -l /etc/ssh/sshd_config")
    sssd_config = simple_file("/etc/sssd/sssd.conf")
    subscription_manager_id = simple_command(
        "/usr/sbin/subscription-manager identity"
    )  # use "/usr/sbin" here, BZ#1690529
    swift_object_expirer_conf = first_file([
        "/var/lib/config-data/puppet-generated/swift/etc/swift/object-expirer.conf",
        "/etc/swift/object-expirer.conf"
    ])
    swift_proxy_server_conf = first_file([
        "/var/lib/config-data/puppet-generated/swift/etc/swift/proxy-server.conf",
        "/etc/swift/proxy-server.conf"
    ])
    sysconfig_kdump = simple_file("etc/sysconfig/kdump")
    sysconfig_libvirt_guests = simple_file("etc/sysconfig/libvirt-guests")
    sysconfig_network = simple_file("etc/sysconfig/network")
    sysconfig_ntpd = simple_file("/etc/sysconfig/ntpd")
    sysconfig_prelink = simple_file("/etc/sysconfig/prelink")
    sysconfig_sshd = simple_file("/etc/sysconfig/sshd")
    sysconfig_virt_who = simple_file("/etc/sysconfig/virt-who")
    sysctl = simple_command("/sbin/sysctl -a")
    sysctl_conf = simple_file("/etc/sysctl.conf")
    systemctl_cat_rpcbind_socket = simple_command(
        "/bin/systemctl cat rpcbind.socket")
    systemctl_cinder_volume = simple_command(
        "/bin/systemctl show openstack-cinder-volume")
    systemctl_httpd = simple_command("/bin/systemctl show httpd")
    systemctl_nginx = simple_command("/bin/systemctl show nginx")
    systemctl_list_unit_files = simple_command(
        "/bin/systemctl list-unit-files")
    systemctl_list_units = simple_command("/bin/systemctl list-units")
    systemctl_mariadb = simple_command("/bin/systemctl show mariadb")
    systemctl_qpidd = simple_command("/bin/systemctl show qpidd")
    systemctl_qdrouterd = simple_command("/bin/systemctl show qdrouterd")
    systemctl_show_all_services = simple_command(
        "/bin/systemctl show *.service")
    systemctl_show_target = simple_command("/bin/systemctl show *.target")
    systemctl_smartpdc = simple_command(
        "/bin/systemctl show smart_proxy_dynflow_core")
    systemd_analyze_blame = simple_command("/bin/systemd-analyze blame")
    systemd_docker = simple_command("/usr/bin/systemctl cat docker.service")
    systemd_logind_conf = simple_file("/etc/systemd/logind.conf")
    systemd_openshift_node = simple_command(
        "/usr/bin/systemctl cat atomic-openshift-node.service")
    systemd_system_conf = simple_file("/etc/systemd/system.conf")
    systemid = first_of([
        simple_file("/etc/sysconfig/rhn/systemid"),
        simple_file("/conf/rhn/sysconfig/rhn/systemid")
    ])
    systool_b_scsi_v = simple_command("/bin/systool -b scsi -v")
    tags = simple_file("/tags.json", kind=RawFileProvider)
    thp_use_zero_page = simple_file(
        "/sys/kernel/mm/transparent_hugepage/use_zero_page")
    thp_enabled = simple_file("/sys/kernel/mm/transparent_hugepage/enabled")
    tmpfilesd = glob_file([
        "/etc/tmpfiles.d/*.conf", "/usr/lib/tmpfiles.d/*.conf",
        "/run/tmpfiles.d/*.conf"
    ])
    tomcat_vdc_fallback = simple_command(
        "/usr/bin/find /usr/share -maxdepth 1 -name 'tomcat*' -exec /bin/grep -R -s 'VirtualDirContext' --include '*.xml' '{}' +"
    )
    tuned_adm = simple_command("/usr/sbin/tuned-adm list")
    udev_fc_wwpn_id_rules = simple_file(
        "/usr/lib/udev/rules.d/59-fc-wwpn-id.rules")
    uname = simple_command("/usr/bin/uname -a")
    up2date = simple_file("/etc/sysconfig/rhn/up2date")
    up2date_log = simple_file("/var/log/up2date")
    uptime = simple_command("/usr/bin/uptime")
    usr_journald_conf_d = glob_file(
        r"usr/lib/systemd/journald.conf.d/*.conf"
    )  # note that etc_journald.conf.d also exists
    vdo_status = simple_command("/usr/bin/vdo status")
    vgdisplay = simple_command("/sbin/vgdisplay")
    vdsm_log = simple_file("var/log/vdsm/vdsm.log")
    vdsm_logger_conf = simple_file("etc/vdsm/logger.conf")
    vma_ra_enabled = simple_file("/sys/kernel/mm/swap/vma_ra_enabled")
    vgs_noheadings = simple_command(
        "/sbin/vgs --nameprefixes --noheadings --separator='|' -a -o vg_all --config=\"global{locking_type=0}\""
    )
    virsh_list_all = simple_command("/usr/bin/virsh --readonly list --all")
    virt_what = simple_command("/usr/sbin/virt-what")
    virt_who_conf = glob_file([r"etc/virt-who.conf", r"etc/virt-who.d/*.conf"])
    virtlogd_conf = simple_file("/etc/libvirt/virtlogd.conf")
    vsftpd = simple_file("/etc/pam.d/vsftpd")
    vsftpd_conf = simple_file("/etc/vsftpd/vsftpd.conf")
    woopsie = simple_command(
        r"/usr/bin/find /var/crash /var/tmp -path '*.reports-*/whoopsie-report' -print -quit"
    )
    x86_pti_enabled = simple_file("sys/kernel/debug/x86/pti_enabled")
    x86_ibpb_enabled = simple_file("sys/kernel/debug/x86/ibpb_enabled")
    x86_ibrs_enabled = simple_file("sys/kernel/debug/x86/ibrs_enabled")
    x86_retp_enabled = simple_file("sys/kernel/debug/x86/retp_enabled")
    xinetd_conf = glob_file(["/etc/xinetd.conf", "/etc/xinetd.d/*"])
    yum_conf = simple_file("/etc/yum.conf")
    yum_list_available = simple_command("yum -C --noplugins list available")
    yum_repolist = simple_command("/usr/bin/yum -C --noplugins repolist")
    yum_repos_d = glob_file("/etc/yum.repos.d/*")
    zipl_conf = simple_file("/etc/zipl.conf")
    rpm_format = format_rpm()
    installed_rpms = simple_command("/bin/rpm -qa --qf '%s'" % rpm_format,
                                    context=HostContext)