R K
R K

Reputation: 382

Spring cloud Kafka streams binder health is "UNKNOWN"

We are using 2.1.3 version for spring cloud stream kafka streams -

      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream-binder-kafka-streams</artifactId>
        <version>2.1.3.RELEASE</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream-binder-kafka-core</artifactId>
        <version>2.1.3.RELEASE</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-stream-kafka</artifactId>
        <version>2.1.3.RELEASE</version>
      </dependency>

application.yml has property set -

management.health.binders.enabled = true
management.health.kafka.enabled = true

But we are still get the status as UNKNOWN for kafka binders -

"binders": {
      "status": "UNKNOWN",
      "details": {
        "ktable": {
          "status": "UNKNOWN"
        },
        "kstream": {
          "status": "UNKNOWN"
        },
        "globalktable": {
          "status": "UNKNOWN"
        }
      }
    }

Appreciate any help on this.

Upvotes: 2

Views: 896

Answers (1)

sobychacko
sobychacko

Reputation: 5904

The health indicators for Kafka Streams family of binders only went into the 2.2 line. Any chance you can upgrade to 2.2 from 2.1.3? Here is an application where the health indicators are working. This is using the 3.0 snapshots, but 2.2 also should work. When running this app, I am getting the output as below.

curl --silent http://localhost:8080/actuator/health/ | jq .
{
  "status": "UP",
  "components": {
    "binders": {
      "status": "UP",
      "components": {
        "globalktable": {
          "status": "UP",
          "details": {
            "threadState": "RUNNING",
            "standbyTasks": {},
            "activeTasks": {
              "partitions": [
                "partition=0, topic=process-applicationId-KSTREAM-AGGREGATE-STATE-STORE-0000000003-repartition"
              ],
              "taskId": "1_0"
            },
            "threadName": "process-applicationId-fa4e65eb-6060-43f0-94eb-4c4bf1497613-StreamThread-1"
          }
        },
        "kstream": {
          "status": "UP",
          "details": {
            "threadState": "RUNNING",
            "standbyTasks": {},
            "activeTasks": {
              "partitions": [
                "partition=0, topic=process-applicationId-KSTREAM-AGGREGATE-STATE-STORE-0000000003-repartition"
              ],
              "taskId": "1_0"
            },
            "threadName": "process-applicationId-fa4e65eb-6060-43f0-94eb-4c4bf1497613-StreamThread-1"
          }
        },
        "ktable": {
          "status": "UP",
          "details": {
            "threadState": "RUNNING",
            "standbyTasks": {},
            "activeTasks": {
              "partitions": [
                "partition=0, topic=process-applicationId-KSTREAM-AGGREGATE-STATE-STORE-0000000003-repartition"
              ],
              "taskId": "1_0"
            },
            "threadName": "process-applicationId-fa4e65eb-6060-43f0-94eb-4c4bf1497613-StreamThread-1"
          }
        }
      }
    },
    "diskSpace": {
      "status": "UP",
      "details": {
       ...
      }
    },
    "ping": {
      "status": "UP"
    }
  }
}

Note - The issue mentioned in the comments below where multiple processor's health information is not shown is addressed in the latest snapshots of the binder (3.0.0) and will be available as part of RC1.

Upvotes: 2

Related Questions