(self, node_name, node_stats)
Process and send cluster health data (i.e. cluster membership status and node health
Process and send cluster health data (i.e. cluster membership status and node health
Process and send cluster health data ( i . e . cluster membership status and node health
def _process_cluster_health_data(self, node_name, node_stats):
        """
        Process and send cluster health data (i.e. cluster membership status and node health
        """

        # Tags for service check
        cluster_health_tags = list(self._tags) + ['node:{}'.format(node_name)]

        # Get the membership status of the node
        cluster_membership = node_stats.get('clusterMembership', None)
        membership_status = NODE_MEMBERSHIP_TRANSLATION.get(cluster_membership, AgentCheck.UNKNOWN)
        self.service_check(NODE_CLUSTER_SERVICE_CHECK_NAME, membership_status, tags=cluster_health_tags)

        # Get the health status of the node
        health = node_stats.get('status', None)
        health_status = NODE_HEALTH_TRANSLATION.get(health, AgentCheck.UNKNOWN)
        self.service_check(NODE_HEALTH_SERVICE_CHECK_NAME, health_status, tags=cluster_health_tags)
def _process_cluster_health_data ( self , node_name , node_stats ) : # Tags for service check cluster_health_tags = list ( self . _tags ) + [ 'node:{}' . format ( node_name ) ] # Get the membership status of the node cluster_membership = node_stats . get ( 'clusterMembership' , None ) membership_status = NODE_MEMBERSHIP_TRANSLATION . get ( cluster_membership , AgentCheck . UNKNOWN ) self . service_check ( NODE_CLUSTER_SERVICE_CHECK_NAME , membership_status , tags = cluster_health_tags ) # Get the health status of the node health = node_stats . get ( 'status' , None ) health_status = NODE_HEALTH_TRANSLATION . get ( health , AgentCheck . UNKNOWN ) self . service_check ( NODE_HEALTH_SERVICE_CHECK_NAME , health_status , tags = cluster_health_tags )