Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Spring actuator shows GCP Pub/Sub health 'UNKNOWN' #2030

Closed
veereshwaran opened this issue Nov 13, 2019 · 5 comments · Fixed by #2040
Closed

Spring actuator shows GCP Pub/Sub health 'UNKNOWN' #2030

veereshwaran opened this issue Nov 13, 2019 · 5 comments · Fixed by #2040
Labels
P2 pubsub GCP PubSub

Comments

@veereshwaran
Copy link

Hi,
In my application, I am using following versions
Spring cloud version 'Finchley.SR2'
Spring-cloud-gcp-starter-pubsub version '1.1.0.RELEASE'
Spring-cloud-gcp-pubsub-stream-binder version '1.1.0.RELEASE'
Spring version '5.1.2.RELEASE'

When I getting health from spring actuator,

Pub/Sub health mentioned as 'UNKNOWN'
"binders":{"status":"UNKNOWN","details":{"pubsub":{"status":"UNKNOWN"}}}

Is there any configuration I missed to enable health check for Pub/Sub?

@meltsufin meltsufin added the pubsub GCP PubSub label Nov 13, 2019
@meltsufin
Copy link
Contributor

We do not have a health indicator implemented for Pub/Sub.
I'm not sure why it's even listed in Spring Actuator. Is this some built-in feature in Spring Cloud Stream?
@artembilan?

@artembilan
Copy link
Contributor

I have similar request in AWS Kinesis Binder: spring-cloud/spring-cloud-stream-binder-aws-kinesis#105

So, yeah... It looks like there is a composite in Spring Cloud Stream Core scanning all the available binders in the classpath, but it looks like afterwards it fully depends on the implementation provided by the binder.
Since we don't have a HealthContributor for Pub/Sub binder it is natural that its status is UNKNOWN.

See Kafka and Rabbit binders for possible health check implementations:

https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/blob/master/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaBinderHealthIndicator.java
https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/blob/master/spring-cloud-stream-binder-rabbit/src/main/java/org/springframework/cloud/stream/binder/rabbit/config/RabbitServiceAutoConfiguration.java#L202

@meltsufin meltsufin added the P2 label Nov 13, 2019
@meltsufin
Copy link
Contributor

OK, then we'll accept it as a feature request. Contributions are welcomed, as always!
cc/ @viniciusccarvalho

@viniciusccarvalho
Copy link
Contributor

@meltsufin I'll gladly contribute with an implementation, will look into it today

@viniciusccarvalho
Copy link
Contributor

Just as an FYI I was unable to reproduce this error on the 1.2.0.BUILD-SNAPSHOT the health comes up when using that build. So chances are that this got fixed anyways by the BindersHealthIndicator.

However, if there's an issue, say your service account does not have access to pubsub, it would still come up as healthy, which I think its wrong.

I have a PR ready to go to at least implement the right health endpoint.

@meltsufin I'll submit a much smaller PR for a PubSubHealthIndicator not binder specific, will follow up with one for the binders as it will require changes to the PubSubBinder too

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 pubsub GCP PubSub
Development

Successfully merging a pull request may close this issue.

4 participants