Coder Social home page Coder Social logo

how to output grpc messages about grpcdump HOT 2 CLOSED

rmedvedev avatar rmedvedev commented on July 1, 2024
how to output grpc messages

from grpcdump.

Comments (2)

rmedvedev avatar rmedvedev commented on July 1, 2024 4

Hi, the main feature of this tool is parsing grpc traffic using proto files. Now grpcdump does not support prints bytes of grpc messages. I think this feature is needed and i will do it soon.

from grpcdump.

jschwinger233 avatar jschwinger233 commented on July 1, 2024

I just figured it out that it's already there!

# ./main -i enp2s0f0 -p 5001 -proto-files core.proto  -proto-path $(pwd) -json | jq

INFO[0000] Starting sniff ethernet packets at interface enp2s0f0 on port 5001
{
  "src": "10.22.12.88:25284",
  "dst": "10.22.12.87:5001",
  "path": "/pb.CoreRPC/CreateWorkload",
  "body": "name:\"zc\" entrypoint:<name:\"zc\"> podname:\"local\" image:\"harbor.shopeemobile.com/cloud/bash\" count:1 deploy_strategy:FILLGLOBAL resource_opts:<cpu_quota_limit:0.1 memory_limit:100000000>",
  "headers": {
    ":authority": "10.22.12.87:5001",
    ":method": "POST",
    ":path": "/pb.CoreRPC/CreateWorkload",
    ":scheme": "http",
    "content-type": "application/grpc",
    "te": "trailers",
    "user-agent": "grpcurl/dev-build (no version set) grpc-go/1.35.0-dev"
  }
}
{
  "src": "10.22.12.87:5001",
  "dst": "10.22.12.88:25284",
  "path": "",
  "body": "error:\"not enough nodes\" resource:<>",
  "headers": {
    ":status": "200",
    "content-type": "application/grpc",
    "grpc-message": "",
    "grpc-status": "0"
  }
}

The body field over there is all I needed, and the key to get it correct is just specifying -proto-path and -proto-file together, I specified only -proto-file before!

Thank you very much for your effort, this saves my life!

from grpcdump.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.