jbossjboss-cli

jboss cli command to get datasource connection pool details in json format


using jboss cli to get connection pool details, gets output like this

    {
        "outcome" => "success",
        "result" => {
            "ActiveCount" => 1,
            "AvailableCount" => 20L
       }
    }

is there a way to get the same in json format?


Solution

  • You could use the --output-json argument. Something like:

    $JBOSS_HOME/bin/jboss-cli.sh -c --output-json "/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime=true)"