Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: gRPC Unary Method Support #1305

Open
Maixy opened this issue Oct 8, 2024 · 0 comments
Open

Feature Request: gRPC Unary Method Support #1305

Maixy opened this issue Oct 8, 2024 · 0 comments

Comments

@Maixy
Copy link

Maixy commented Oct 8, 2024

It would be really awesome if blackbox_exporter were able to exercise (and validate the response payloads of) gRPC service methods beyond the existing GRPC Health Checking Protocol support.

Proposed workflow:

  • A grpc_unary_method configuration is provided that describes a grpc request and response expectations (example below)
  • Based on the provided config, the probe would first reach out to the grpc server's Reflection API to grok the expected request and response types
  • The probe would marshal the request_plaintext payload provided in plaintext in the config and send it to the target gRPC method
  • The response would be compared to the expected_response_plaintext payload provided in plaintext in the config

Recorded metrics for each probe execution would include (but not be limited to):

  • Duration of the reflection API request
  • Success-iness of the reflection request (maybe a counter with different result types, ex. SUCCESS|REFLECTION_NOT_ENABLED|etc.
  • Duration of the unary method request
  • Counter including the status code of the method request (standard codes available here)
  • Success-iness of the probe (maybe a counter with different result types, ex. SUCCESS|REFLECTION_FAILED|UNARY_METHOD_NOT_FOUND|INVALID_REQUEST_PAYLOAD|EXPECTED_RESPONSE_NOT_RETURNED|etc.)
  • Duration of the entire probe execution

There are a few command line utilities that implement similar plaintext friendly functionality, ex gRPCurl and grpc_cli

Example configuration

grpc_unary_method_example:
  prober: grpc_unary_method
    service: hello.HelloService.SayHello
    tls: false
    request_plaintext: "name: Foo"
    expected_response_plaintext: "message: \"Hello Foo\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant