:doc:`Kafka <../../kafka>` / Client / update_monitoring

*****************
update_monitoring
*****************



.. py:method:: Kafka.Client.update_monitoring(**kwargs)

  

  Updates the monitoring settings for the cluster. You can use this operation to specify which Apache Kafka metrics you want Amazon MSK to send to Amazon CloudWatch. You can also specify settings for open monitoring with Prometheus.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/UpdateMonitoring>`_  


  **Request Syntax**
  ::

    response = client.update_monitoring(
        ClusterArn='string',
        CurrentVersion='string',
        EnhancedMonitoring='DEFAULT'|'PER_BROKER'|'PER_TOPIC_PER_BROKER'|'PER_TOPIC_PER_PARTITION',
        OpenMonitoring={
            'Prometheus': {
                'JmxExporter': {
                    'EnabledInBroker': True|False
                },
                'NodeExporter': {
                    'EnabledInBroker': True|False
                }
            }
        },
        LoggingInfo={
            'BrokerLogs': {
                'CloudWatchLogs': {
                    'Enabled': True|False,
                    'LogGroup': 'string'
                },
                'Firehose': {
                    'DeliveryStream': 'string',
                    'Enabled': True|False
                },
                'S3': {
                    'Bucket': 'string',
                    'Enabled': True|False,
                    'Prefix': 'string'
                }
            }
        }
    )
    
  :type ClusterArn: string
  :param ClusterArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) that uniquely identifies the cluster.

    

  
  :type CurrentVersion: string
  :param CurrentVersion: **[REQUIRED]** 

    The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.

    

  
  :type EnhancedMonitoring: string
  :param EnhancedMonitoring: 

    Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster.

    

  
  :type OpenMonitoring: dict
  :param OpenMonitoring: 

    The settings for open monitoring.

    

  
    - **Prometheus** *(dict) --* **[REQUIRED]** 

      Prometheus settings.

      

    
      - **JmxExporter** *(dict) --* 

        Indicates whether you want to turn on or turn off the JMX Exporter.

        

      
        - **EnabledInBroker** *(boolean) --* **[REQUIRED]** 

          Indicates whether you want to turn on or turn off the JMX Exporter.

          

        
      
      - **NodeExporter** *(dict) --* 

        Indicates whether you want to turn on or turn off the Node Exporter.

        

      
        - **EnabledInBroker** *(boolean) --* **[REQUIRED]** 

          Indicates whether you want to turn on or turn off the Node Exporter.

          

        
      
    
  
  :type LoggingInfo: dict
  :param LoggingInfo: 

  
    - **BrokerLogs** *(dict) --* **[REQUIRED]** 

    
      - **CloudWatchLogs** *(dict) --* 

      
        - **Enabled** *(boolean) --* **[REQUIRED]** 

        
        - **LogGroup** *(string) --* 

        
      
      - **Firehose** *(dict) --* 

      
        - **DeliveryStream** *(string) --* 

        
        - **Enabled** *(boolean) --* **[REQUIRED]** 

        
      
      - **S3** *(dict) --* 

      
        - **Bucket** *(string) --* 

        
        - **Enabled** *(boolean) --* **[REQUIRED]** 

        
        - **Prefix** *(string) --* 

        
      
    
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ClusterArn': 'string',
          'ClusterOperationArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      HTTP Status Code 200: OK.

      
      

      - **ClusterArn** *(string) --* 

        The Amazon Resource Name (ARN) of the cluster.

        
      

      - **ClusterOperationArn** *(string) --* 

        The Amazon Resource Name (ARN) of the cluster operation.

        
  
  **Exceptions**
  
  *   :py:class:`Kafka.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`Kafka.Client.exceptions.BadRequestException`

  
  *   :py:class:`Kafka.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`Kafka.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`Kafka.Client.exceptions.ForbiddenException`

  