TwiN / gatus

⛑ Automated developer-oriented status page
https://gatus.io
Apache License 2.0
6.18k stars 414 forks source link

gRPC support #157

Open arnemolland opened 3 years ago

arnemolland commented 3 years ago

Would love to see support for gRPC service monitoring. We're using gatus for our external APIs but our internal service mesh consists of mostly gRPC services where we already implement the gRPC health checking protocol and integrate with k8s and Docker, and it would be nice to have on our status dashboard as well. I've just been introduced to the project so I'm not aware of the amount of work it requires, but let me know if you need some help!

TwiN commented 1 year ago

I gave implementing this a try but it's not as simple as I had hoped.

What exactly would you like to test? A simple check to see if the server is reachable is fine, it's even possible to check if a method is valid, but if you want to also send a proto message, then it's a different story altogether.

Feel free to give implementing it a shot if you have an idea!

arnemolland commented 1 year ago

I gave implementing this a try but it's not as simple as I had hoped.

What exactly would you like to test? A simple check to see if the server is reachable is fine, it's even possible to check if a method is valid, but if you want to also send a proto message, then it's a different story altogether.

Feel free to give implementing it a shot if you have an idea!

Primarily just checking the status given that the server is serving the gRPC healthcheck service, hopefully I can give it a shot sometime soon!

TwiN commented 1 year ago

FYI somebody has picked up this task, but the first iteration will only support the gRPC healthcheck service.

heitorPB commented 1 year ago

Hi @TwiN, is the person working on this task? Is there something I can do to help here?

TwiN commented 1 year ago

@heitorPB I believe the fork is on https://github.com/baechul/gatus

It may have been abandoned, but I believe they managed to get GRPC health checks working.

The bulk of the changes is here: https://github.com/baechul/gatus/commit/af50aae1fe0d63e207559ff621cd9d5735d1880c

heitorPB commented 1 year ago

I'm working on implementing basic gRPC support. I'm not familiar with the healthcheck service, but hopefully should also be supported :)

vax-r commented 10 months ago

@TwiN Is it still under construction? or no one is working on it now? If that is the case I would love to give it a shot

heitorPB commented 10 months ago

I have a branch with a working implementation of gRPC monitoring: https://github.com/heitorpb/gatus/tree/grpc-support. This branch requires the server to implement the gRPC Reflection Protocol and does not support local proto files.

The issue I had with this code is that the used golang gRPC library is awkward. In some apparently arbitrary cases, the response body is truncated at 1024 bytes even when explicitly setting the maximum size to 64k. The library client appears to not detect the gRPC version (v1alpha or v1) in all cases, even though the docs says so.

I'm not sure where is the issue: on my code, or in the library used :shrug: But I got it in a "working for us" state in the little time I was given to work on this.

Feel free to continue on top of my work there, this is an epic topic to collaborate :)

Pinging @TwiN here to get some of their wisdom :D