// Module included in the following assemblies:
//
// * support/remote_health_monitoring/using-insights-operator.adoc

:_mod-docs-content-type: PROCEDURE
[id="disabling-insights-operator-gather_{context}"]
= Disabling the {insights-operator} periodic gather operations

[role="_abstract"]
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{nbsp}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{nbsp}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.

:FeatureName: The `InsightsDataGather` custom resource
include::snippets/technology-preview.adoc[]

[NOTE]
====
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.
====

.Prerequisites

ifndef::openshift-rosa,openshift-dedicated[]
* You are logged in to the {product-title} web console as a user with the `cluster-admin` role.
endif::openshift-rosa,openshift-dedicated[]
ifdef::openshift-rosa,openshift-dedicated[]
* You are logged in to the {product-title} web console as a user with the `dedicated-admin` role.
endif::openshift-rosa,openshift-dedicated[]

.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`:
+
[source,yaml]
----

apiVersion: insights.openshift.io/v1
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:
+
[source,yaml]
----
apiVersion: insights.openshift.io/v1
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

The {insights-operator} updates the gather configurations and no longer runs the operations that you disabled.

[NOTE]
====
Disabling gather operations restricts the ability of the {red-hat-lightspeed} advisor service to offer effective recommendations for your cluster.
====
