GithubHelp home page GithubHelp logo

Comments (5)

michaelklishin avatar michaelklishin commented on June 9, 2024

Partially addressed by #90.

from rabbitmq-cli.

michaelklishin avatar michaelklishin commented on June 9, 2024

Further addressed by #115.

from rabbitmq-cli.

michaelklishin avatar michaelklishin commented on June 9, 2024

FWIW the core of multi-format support is there. We are not 100% happy with the state of things at the moment but there's only so much time left in the 3.7.0 cycle. Considering this closed with further improvements we have in mind.

from rabbitmq-cli.

visbits avatar visbits commented on June 9, 2024

So how about this now..

from rabbitmq-cli.

michaelklishin avatar michaelklishin commented on June 9, 2024

@visbits if there's a question, consider asking on the mailing list.

Some commands support --formatter=json, possibly even --formatter=csv. It doesn't make sense for all commands and in some cases the output could be formatted much better. We've concluded that we want to support multiple formatters better but there's a fair amount of command-specific work and we have close to 100 commands now. So the degree of support varies and for some commands, only one formatter is supported by design.

Here are some examples with 3.7.13:

rabbitmqctl list_vhosts --formatter=json | jq
[
  {
    "name": "/"
  }
]

rabbitmqctl list_users --formatter=json | jq
[
  {
    "user": "guest",
    "tags": [
      "administrator"
    ]
  }
]

rabbitmqctl list_parameters --formatter=json | jq
[
  {
    "component": "federation-upstream",
    "name": "up-hare",
    "value": "{\"expires\":3600000,\"uri\":\"amqp://localhost:5673\"}"
  }
]

rabbitmqctl list_queues --formatter=json | jq
[
  {
    "name": "q1",
    "messages": 0
  },
  {
    "name": "amq.gen-IdssHRoMD4umuqnuHCGdaQ",
    "messages": 0
  }
]

rabbitmqctl list_consumers --formatter=json | jq
[
  {
    "queue_name": "amq.gen-IdssHRoMD4umuqnuHCGdaQ",
    "channel_pid": "#PID<10132.853.0>",
    "consumer_tag": "bunny-1552068127000-449053712679",
    "ack_required": false,
    "prefetch_count": 0,
    "arguments": []
  }
]

rabbitmq-diagnostics listeners --formatter=json | jq
{
  "listeners": [
    {
      "interface": "[::]",
      "node": "rabbit@warp10",
      "port": 25672,
      "protocol": "clustering",
      "purpose": "inter-node and CLI tool communication"
    },
    {
      "interface": "[::]",
      "node": "rabbit@warp10",
      "port": 5672,
      "protocol": "amqp",
      "purpose": "AMQP 0-9-1 and AMQP 1.0"
    },
    {
      "interface": "[::]",
      "node": "rabbit@warp10",
      "port": 5671,
      "protocol": "amqp/ssl",
      "purpose": "AMQP 0-9-1 and AMQP 1.0 over TLS"
    },
    {
      "interface": "[::]",
      "node": "rabbit@warp10",
      "port": 15672,
      "protocol": "http",
      "purpose": "HTTP API"
    },
    {
      "interface": "[::]",
      "node": "rabbit@warp10",
      "port": 15671,
      "protocol": "https",
      "purpose": "HTTP API over TLS (HTTPS)"
    },
    {
      "interface": "[::]",
      "node": "rabbit@warp10",
      "port": 1883,
      "protocol": "mqtt",
      "purpose": "MQTT"
    }
  ],
  "result": "ok"
}

rabbitmq-diagnostics alarms --formatter=json | jq
{
  "alarms": [],
  "node": "rabbit@warp10",
  "result": "ok"
}

from rabbitmq-cli.

Related Issues (20)

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.