Generate a sosreport starting from 2019.2.7

Generate a sosreport starting from 2019.2.7

Note

This feature is available starting from the MCP 2019.2.7 maintenance update. Before using the feature, follow the steps described in Apply maintenance updates.

This section describes how to generate a sosreport starting from the MCP 2019.2.7 maintenance update. The tool does not require mandatory configuration. However, you can extend the sosreport tool as required.

To generate a sosreport:

  1. Optional. Recommended. Configure the sosreport tool using one of the following options:

    • Configure the sosreport tool through the Reclass model:

      1. To save the configuration for all nodes, specify the following pillar in the cluster/<cluster_name>/infra/init.yml file. Otherwise, add the pillar to a particular node or the common component file.

        linux:
          system:
            sosreport:
              cmd_options:
                tmp-dir: /root/reportdir
                no_arg_opts: [ '-q' ]
              config_options:
                general:
                  all-logs: true
                plugins:
                  disabled: [ docker ]
                tunables:
                  apache.log: true
        

        Parameters description:

        • cmd_options - defines additional arguments for a CLI and cmd call.

        • general - includes the parameters for the sos.conf general section.

        • plugins - defines the enabled or disabled plugins.

        • tunables - defines custom plugin options.

      2. Apply the changes from the Salt Master node:

        salt -C <target> saltutil.sync_all
        
    • Configure the sosreport tool by overriding the default settings from the Salt Master node. For example:

      salt -C '<target>' state.sls linux.system.sosreport.report pillar='{ \
      "sosreport" : { "ticket-number": 12345, "tmp-dir": "/root/reportdir2" } }'
      

      For a list of possible options, run sosreport --help.

  2. Select from the following options:

    • To generate a sosreport on one or multiple target nodes:

      1. Log in to the Salt Master node.

      2. Run the following command:

        salt -C '<target>' state.sls linux.system.sosreport.report
        
    • To generate a sosreport on a particular node:

      1. Log in to the required node.

      2. Run the following command:

        salt-call state.sls linux.system.sosreport.report
        

Now, proceed to Collect and archive the reports.