Using remote health reporting in a restricted network

You can manually gather and upload Insights Operator archives to diagnose issues from a restricted network.

To use the Insights Operator in a restricted network, you must:

  • Create a copy of your Insights Operator archive.

  • Upload the Insights Operator archive to console.redhat.com.

Copying an Insights Operator archive

You must create a copy of your Insights Operator data archive for upload to cloud.redhat.com.

Prerequisites

  • You are logged in to OKD as cluster-admin.

Procedure

  1. Find the name of the Insights Operator pod that is currently running:

    1. $ INSIGHTS_OPERATOR_POD=$(oc get pods --namespace=openshift-insights -o custom-columns=:metadata.name --no-headers --field-selector=status.phase=Running)
  2. Copy the recent data archives from the Insights Operator container:

    1. $ oc cp openshift-insights/$INSIGHTS_OPERATOR_POD:/var/lib/insights-operator ./insights-data

The recent Insights Operator archives are now available in the insights-data directory.

Uploading an Insights Operator archive

You can manually upload an Insights Operator archive to console.redhat.com to diagnose potential issues.

Prerequisites

  • You are logged in to OKD as cluster-admin.

  • You have a workstation with unrestricted internet access.

  • You have created a copy of the Insights Operator archive.

Procedure

  1. Download the dockerconfig.json file:

    1. $ oc extract secret/pull-secret -n openshift-config --to=.
  2. Copy your "cloud.openshift.com" "auth" token from the dockerconfig.json file:

    1. {
    2. "auths": {
    3. "cloud.openshift.com": {
    4. "auth": "<your_token>",
    5. "email": "asd@redhat.com"
    6. }
    7. }
  3. Upload the archive to console.redhat.com:

    1. $ curl -v -H "User-Agent: insights-operator/one10time200gather184a34f6a168926d93c330 cluster/<cluster_id>" -H "Authorization: Bearer <your_token>" -F "upload=@<path_to_archive>; type=application/vnd.redhat.openshift.periodic+tar" https://console.redhat.com/api/ingress/v1/upload

    where *<cluster_id>* is your cluster ID, *<your_token>* is the token from your pull secret, and *<path_to_archive>* is the path to the Insights Operator archive.

    If the operation is successful, the command returns a "request_id" and "account_number":

    Example output

    1. * Connection #0 to host console.redhat.com left intact
    2. {"request_id":"393a7cf1093e434ea8dd4ab3eb28884c","upload":{"account_number":"6274079"}}%

Verification steps

  1. Log in to https://console.redhat.com/openshift.

  2. Click the Clusters menu in the left pane.

  3. To display the details of the cluster, click the cluster name.

  4. Open the Insights Advisor tab of the cluster.

    If the upload was successful, the tab displays one of the following:

    • Your cluster passed all recommendations, if Insights Advisor did not identify any issues.

    • A list of issues that Insights Advisor has detected, prioritized by risk (low, moderate, important, and critical).