Instead of waiting for the next periodic data gather operation, you can run a custom on-demand Insights Operator data gather operation by using the OKD web console or command-line interface (CLI).
A periodic data gather operation uses the InsightsDataGather custom resource definition (CRD) for configuration instructions, whereas an on-demand equivalent requires a DataGather CRD to be configured.
An on-demand DataGather operation is:
-
Useful for one-off data collections that require different CRD configurations to the periodic data gathering (InsightsDataGather) specification.
-
Independent from the periodic data gathering. When you create an on-demand DataGather CRD, the configuration is independent from the InsightsDataGather CRD specification of your periodic data gathering job.
Custom specification options
You can optionally customize the following items for the on-demand data gather operation:
-
Enable and define data obfuscation: By defining the DataGather dataPolicy specification, you can enable additional obfuscation of the Red Hat Lightspeed archive data, for example, the IP address or workload names.
-
Enable persistant storage: By default, the Insights Operator uses ephemeral storage, which means that a new pod will be created for each gather operation and the history of gather operations and data collected is not retained. You can switch to persistent storage to retain the data and history for up to the last 10 gather operations by defining the DataGather storage specification in the CRD.
-
Exclude specific data gather operations: You can choose to disable specific gather operations from running by defining the DataGather gatherers specification. For example, you can choose to disable the cluster authentication operation or the workload data operation.
|
|
Excluding gather operations from the default list might reduce or limit the recommendations offered by the Red Hat Lightspeed advisor service for your cluster.
|
If you do not configure any custom specification options in the DataGather CRD, the default Insights Operator data collection job will run. This means that all gather operations will run, the collected data will be unobfuscated and the archive file will not be retained.
When you run a gather operation on-demand, any configuration that was previously applied to disable Insights Operator gather operations for your cluster will be overridden.
|
|
The DataGather custom resource is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see the following link:
|
|
|
If you enable Technology Preview in your cluster, the Insights Operator runs gather operations in individual pods. This is part of the Technology Preview feature set for the Insights Operator and supports the new data gathering features.
|
Viewing Insights Operator gather durations
You can view the time it takes for the Insights Operator to gather the information contained in the archive. This helps you to understand Insights Operator resource usage and issues with Red Hat Lightspeed Advisor.
Procedure
-
From your archive, open /insights-operator/gathers.json.
The file contains a list of Insights Operator gather operations:
{
"name": "clusterconfig/authentication",
"duration_in_ms": 730, (1)
"records_count": 1,
"errors": null,
"panic": null
}
| 1 |
duration_in_ms is the amount of time in milliseconds for each gather operation. |
-
Inspect each gather operation for abnormalities.
Gathering data on demand with the Insights Operator from the web console
You can run a custom Insights Operator gather operation on-demand from the OKD web console. An on-demand DataGather operation is useful for one-off data collections that require different configurations to the periodic data gathering (InsightsDataGather) specification.
Use the following procedure to create a DataGather custom resource definition (CRD), and then run the data gather operation on demand from the web console.
Procedure
-
On the console, select Administration > CustomResourceDefinitions.
-
On the CustomResourceDefinitions page, in the Search by name field, find the DataGather resource definition, and then click it.
-
On the CustomResourceDefinition details page, click the Instances tab.
-
Click Create DataGather.
-
To create a new DataGather operation where all gather operations will run, complete the following YAML specification, and then save your changes.
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
# Gatherers configuration
gatherers:
mode: All # Options: All, Custom
# ...
|
|
-
The name you specify for your gather operation, <your_data_gather>, must be unique and must not include a prefix of periodic-gathering- because this string is reserved for other administrative operations and might impact the intended gather operation.
-
If the spec of DataGather CRD is undefined, the default Insights Operator data collection job will run. This means that all gather operations will run, the collected data will be unobfuscated and the archive file will not be retained.
|
-
Optional: To customize the data gather operation, you can configure any of the following options in your DataGather YAML file:
-
To disable specific gatherers, change the value of mode to Custom, and then specify the individual gatherer that you intend to disable. For example, to disable the workload gatherer, add the following example:
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
# Gatherers configuration
gatherers:
mode: Custom # Options: All, Custom
custom:
configs:
# Essential cluster configuration gatherers
- name: clusterconfig/authentication
state: Enabled
- name: clusterconfig/clusteroperators
state: Enabled
- name: workloads
state: Disabled
-
To enable persistent storage to retain the data archive file and history for up to the last 10 data gathering jobs, define the storage specification. Set type to PersistentVolume, and define the mountPath and name of the volume, as outlined in the following example:
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
storage:
type: PersistentVolume
mountPath: /data
persistentVolume:
claim:
name: on-demand-gather-pvc
|
|
Ensure that the volume name specified matches the existing PersistentVolumeClaim value in the openshift-insights namespace. For more information, see Persistent volume claims.
|
-
To enable data obfuscation, define the dataPolicy key and required values. For example, to obfuscate IP addresses and workload names, add the following configuration:
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
dataPolicy:
- ObfuscateNetworking
- WorkloadNames
Verification
-
On the console, select to Workloads > Pods.
-
On the Pods page, go to the Project pull-down menu, and then select Show default projects.
-
Select the openshift-insights project from the Project pull-down menu.
-
Check that your new gather operation is prefixed with your chosen name under the list of pods in the openshift-insights project. Upon completion, the Insights Operator automatically uploads the data to Red Hat for processing.
Gathering data on demand with the Insights Operator from the OpenShift CLI
You can run a custom Insights Operator gather operation on-demand from the OKD command-line interface (CLI).
An on-demand DataGather operation is useful for one-off data collections that require different configurations to the periodic data gathering (InsightsDataGather) specification.
Use the following procedure to create a DataGather custom resource definition (CRD), and then run the data gather operation on demand from the CLI.
Procedure
-
Create a YAML file with the following DataGather specification:
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
# Gatherers configuration
gatherers:
mode: All # Options: All, Custom
# ...
|
|
-
The name you specify for your gather operation, <your_data_gather>, must be unique and must not include a prefix of periodic-gathering- because this string is reserved for other administrative operations and might impact the intended gather operation.
-
If the spec of DataGather CRD is undefined, the default Insights Operator data collection job will run. This means that all gather operations will run, the collected data will be unobfuscated and the archive file will not be retained.
|
-
Optional: To customize the data gather operation, you can configure any of the following options in your DataGather YAML file:
-
To disable specific gatherers, change the value of mode to Custom, and then specify the individual gatherer that you intend to disable. For example, to disable the workload gatherer, add the following example:
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
# Gatherers configuration
gatherers:
mode: Custom # Options: All, Custom
custom:
configs:
# Essential cluster configuration gatherers
- name: clusterconfig/authentication
state: Enabled
- name: clusterconfig/clusteroperators
state: Enabled
- name: workloads
state: Disabled
-
To enable persistent storage to retain the data archive file and history for up to the last 10 data gathering jobs, define the storage specification. Set type to PersistentVolume, and define the mountPath and name of the volume, as outlined in the following example:
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
storage:
type: PersistentVolume
mountPath: /data
persistentVolume:
claim:
name: on-demand-gather-pvc
|
|
Ensure that the volume name specified matches the existing PersistentVolumeClaim value in the openshift-insights namespace. For more information, see Persistent volume claims.
|
-
To enable data obfuscation, define the dataPolicy key and required values. For example, to obfuscate IP addresses and workload names, add the following configuration:
apiVersion: insights.openshift.io/v1alpha2
kind: DataGather
metadata:
name: <your_data_gather>
spec:
dataPolicy:
- ObfuscateNetworking
- WorkloadNames
-
On the OKD CLI, enter the following command to run the gather operation:
$ oc apply -f <your_data_gather_definition>.yaml
Disabling the Insights Operator periodic gather operations
You can optionally disable the periodic InsightsDataGather operations that the Insights Operator runs every 2 hours by default. Disabling the periodic data gather operations increases privacy for your organization as Insights Operator will no longer gather and send Red Hat Lightspeed cluster reports to Red Hat.
Disabling gather operations will also disable Red Hat Lightspeed analysis and recommendations for your cluster without affecting other core functions that require communication with Red Hat such as cluster transfers.
You can view a list of attempted gather operations for your cluster from the /insights-operator/gathers.json file in your Insights Operator archive. Be aware that some gather operations occur only when certain conditions are met and might not show in your most recent archive.
|
|
The InsightsDataGather custom resource is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see the following link:
|
|
|
If you enable Technology Preview in your cluster, the Insights Operator runs gather operations in individual pods. This is part of the Technology Preview feature set for the Insights Operator and supports the new data gathering features.
|
Procedure
-
Navigate to Administration > CustomResourceDefinitions.
-
On the CustomResourceDefinitions page, use the Search by name field to find the InsightsDataGather custom resource definition (CRD), and click to open.
-
On the CustomResourceDefinition details page, click the Instances tab.
-
Click cluster, and then click the YAML tab.
-
Edit the InsightsDataGather CRD, and complete one of the following steps:
-
To disable all the gather operations and data collection, define the gatherers specification and set the mode to None as outlined in the following example extract:
apiVersion: insights.openshift.io/v1alpha2
kind: InsightsDataGather
metadata:
name: cluster
spec:
# Gatherers configuration
gatherers:
mode: None # Options: All, None, Custom
-
To disable individual gather operations, under gatherers, set the mode to Custom and then specify the individual gatherer that you intend to disable. For example, to disable the workload gatherer, define the following specification:
apiVersion: insights.openshift.io/v1alpha2
kind: InsightsDataGather
metadata:
name: cluster
spec:
# Gatherers configuration
gatherers:
mode: Custom # Options: All, None, Custom
custom:
configs:
# Essential cluster configuration gatherers
- name: clusterconfig/authentication
state: Enabled
- name: clusterconfig/clusteroperators
state: Enabled
- name: workloads
state: Disabled
-
Click Save.
Results
After you save the changes, the Insights Operator gather configurations are updated and the operations that you disabled in the configuration will no longer occur.
|
|
Disabling gather operations restricts the ability of the Red Hat Lightspeed advisor service to offer effective recommendations for your cluster.
|
Re-enabling the Insights Operator periodic gather operations
If you disabled the default InsightsDataGather data gather operations, you can enable them again so that the Insights Operator resumes the periodic data collection, and sends the resulting Red Hat Lightspeed cluster reports to Red Hat.
|
|
The InsightsDataGather custom resource is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see the following link:
|
Procedure
-
Navigate to Administration > CustomResourceDefinitions.
-
On the CustomResourceDefinitions page, use the Search by name field to find the InsightsDataGather custom resource definition (CRD), and click to open.
-
On the CustomResourceDefinition details page, click the Instances tab.
-
Click cluster, and then click the YAML tab.
-
Edit the InsightsDataGather CRD, and complete one of the following steps:
-
To enable all disabled gather operations, under the gatherers specification, set the mode back to All as outlined in the following example extract:
apiVersion: insights.openshift.io/v1alpha2
kind: InsightsDataGather
metadata:
name: cluster
spec:
# Gatherers configuration
gatherers:
mode: All # Options: All, None, Custom
-
To enable individual gather operations that were previously disabled, find the name of the gatherer operation under the gatherers:custom:configs key section and change the state to Enabled. Alternatively, under the config specification, remove the name and state configuration lines for the operation you want to enable.
apiVersion: insights.openshift.io/v1alpha2
kind: InsightsDataGather
metadata:
name: cluster
spec:
# Gatherers configuration
gatherers:
mode: Custom # Options: All, None, Custom
custom:
configs:
# Essential cluster configuration gatherers
- name: clusterconfig/authentication
state: Enabled
- name: clusterconfig/clusteroperators
state: Enabled
- name: workloads
state: Enabled
-
Click Save.
After you save the changes, the Insights Operator gather configurations are updated and the affected gather operations start.
|
|
Disabling gather operations restricts the ability of the Red Hat Lightspeed advisor service to offer effective recommendations for your cluster.
|