Hi,

JBoss AS7 is one of the bestest application available in the Middleware World, As it provides much more facilities to the Administrators in order to manage/configure and monitor various resources. As we are already familier with a utility called as “$JBOSS_HOME/bin/jboss-cli.sh” is one of the most powerful and easiest utility which can be used to manage and monitor JBossAS7.

In this demonstration we will see that JBoss AS7 provides another best feature, which allows us to easily access & monitor the JBoss AS7 using OS level utilities like “curl” or “wget”. Yes, JBoss AS7 provides HTTP-JSON based APIs which can be used to achieve the same. So lets see some of it’s features…

So lets start JBossAS7 like following:

    ./standalone.sh -c standalone-full.xml

NOTE: In all the following operations we will assume that you have created a ManagementRealm User with username “admin” and password as “admin123″ (you can create any user name/password based on your requirement), Then change the username & password in the mentioned demo URLs like “http://admin:admin123@localhost:9990/management/

NOTE: Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.
Wget can follow links in HTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is sometimes referred to as “recursive downloading.” While doing that, Wget respects the Robot Exclusion Standard (/robots.txt). Wget can be instructed to convert the links in downloaded HTML files to the local files for offline viewing.
More informations about “wget” utility can be found in the following link: http://en.wikipedia.org/wiki/Wget

Http Connector’s Runtime statistics

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/web/connector/http?operation=resource&include-runtime=true&recursive&json.pretty"

{
    "bytesReceived" : "0",
    "bytesSent" : "0",
    "enable-lookups" : false,
    "enabled" : true,
    "errorCount" : "0",
    "executor" : null,
    "max-connections" : 20,
    "max-post-size" : 2097152,
    "max-save-post-size" : 4096,
    "maxTime" : "124",
    "name" : "http",
    "processingTime" : "255",
    "protocol" : "HTTP/1.1",
    "proxy-name" : null,
    "proxy-port" : null,
    "redirect-port" : 8433,
    "requestCount" : "21",
    "scheme" : "http",
    "secure" : false,
    "socket-binding" : "http",
    "ssl" : null,
    "virtual-server" : null
}

Accessing the “jsp-configuration” of JBoss Web Container

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/web/configuration/jsp-configuration?operation=resource&recursive&json.pretty"

{
    "check-interval" : 0,
    "development" : false,
    "disabled" : false,
    "display-source-fragment" : true,
    "dump-smap" : false,
    "error-on-use-bean-invalid-class-attribute" : false,
    "generate-strings-as-char-arrays" : false,
    "java-encoding" : "UTF8",
    "keep-generated" : true,
    "mapped-file" : true,
    "modification-test-interval" : 4,
    "recompile-on-fail" : false,
    "scratch-dir" : null,
    "smap" : true,
    "source-vm" : "1.5",
    "tag-pooling" : true,
    "target-vm" : "1.5",
    "trim-spaces" : false,
    "x-powered-by" : true
}

Accessing Deployment Details

wget -O out.txt "http://admin:admin123@localhost:9990/management/deployment/TestLogging.ear/subdeployment/Log4jDemoOne.war?operation=resource&include-runtime&recursive&json.pretty"

Suppose you have deployed an EAP application with name “TestLogging.ear” which contains a sunmodule with name “Log4jDemoOne.war” then you can get it’s runtime information using the above command, the outputwill be something like following:


{"subsystem" : {"web" : {
    "active-sessions" : 0,
    "context-root" : "/Log4jDemoOne",
    "duplicated-session-ids" : 0,
    "expired-sessions" : 2,
    "max-active-sessions" : 2,
    "rejected-sessions" : 0,
    "servlet" : null,
    "session-avg-alive-time" : 1851,
    "session-max-alive-time" : 1852,
    "sessions-created" : 2,
    "virtual-host" : "default-host"
}}}

In order to get the EAR depployment details you can use the following command:

wget -O out.txt "http://admin:admin123@localhost:9990/management/deployment/TestLogging.ear?operation=resource&recursive&json.pretty"

{
    "content" : [{
        "path" : "deployments/TestLogging.ear",
        "relative-to" : "jboss.server.base.dir",
        "archive" : false
    }],
    "enabled" : true,
    "name" : "TestLogging.ear",
    "persistent" : false,
    "runtime-name" : "TestLogging.ear",
    "subsystem" : null,
    "subdeployment" : {
        "Log4jDemoOne.war" : {"subsystem" : {"web" : {
            "context-root" : "/Log4jDemoOne",
            "servlet" : null,
            "virtual-host" : "default-host"
        }}},
        "Log4jDemoTwo.war" : {"subsystem" : {"web" : {
            "context-root" : "/Log4jDemoTwo",
            "servlet" : null,
            "virtual-host" : "default-host"
        }}}
    }
}

Getting Management Interface Details

wget -O out.txt "http://admin:admin123@localhost:9990/management/interface/public?operation=resource&recursive&json.pretty"

{
    "any" : null,
    "any-address" : null,
    "any-ipv4-address" : null,
    "any-ipv6-address" : null,
    "inet-address" : {
        "EXPRESSION_VALUE" : "${jboss.bind.address:127.0.0.1}"
    },
    "link-local-address" : null,
    "loopback" : null,
    "loopback-address" : null,
    "multicast" : null,
    "name" : "public",
    "nic" : null,
    "nic-match" : null,
    "not" : null,
    "point-to-point" : null,
    "public-address" : null,
    "site-local-address" : null,
    "subnet-match" : null,
    "up" : null,
    "virtual" : null
}

DataSource Configuration & Runtime Details

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/datasources/data-source/ExampleDS/statistics/pool?read-resource&include-runtime=true&recursive&json.pretty"

{
    "ActiveCount" : "0",
    "AvailableCount" : "20",
    "AverageBlockingTime" : "0",
    "AverageCreationTime" : "0",
    "CreatedCount" : "0",
    "DestroyedCount" : "0",
    "MaxCreationTime" : "0",
    "MaxUsedCount" : "0",
    "MaxWaitTime" : "0",
    "TimedOut" : "0",
    "TotalBlockingTime" : "0",
    "TotalCreationTime" : "0"
}

Geting Jdbc Statictics:

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/datasources/data-source/ExampleDS/statistics/jdbc?read-resource&include-runtime=true&recursive&json.pretty"

{
    "PreparedStatementCacheAccessCount" : "0",
    "PreparedStatementCacheAddCount" : "0",
    "PreparedStatementCacheCurrentSize" : "0",
    "PreparedStatementCacheDeleteCount" : "0",
    "PreparedStatementCacheHitCount" : "0",
    "PreparedStatementCacheMissCount" : "0"
}

Getting all the informations related to DataSource at once:


wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/datasources/data-source/ExampleDS/statistics?read-resource&include-runtime=true&recursive&json.pretty"

{
    "allocation-retry" : null,
    "allocation-retry-wait-millis" : null,
    "allow-multiple-users" : null,
    "background-validation" : null,
    "background-validation-millis" : null,
    "blocking-timeout-wait-millis" : null,
    "check-valid-connection-sql" : null,
    "connection-properties" : null,
    "connection-url" : "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
    "datasource-class" : null,
    "driver-class" : null,
    "driver-name" : "h2",
    "enabled" : true,
    "exception-sorter-class-name" : null,
    "exception-sorter-properties" : null,
    "flush-strategy" : null,
    "idle-timeout-minutes" : null,
    "jndi-name" : "java:jboss/datasources/ExampleDS",
    "jta" : true,
    "max-pool-size" : null,
    "min-pool-size" : null,
    "new-connection-sql" : null,
    "password" : "sa",
    "pool-prefill" : null,
    "pool-use-strict-min" : null,
    "prepared-statements-cache-size" : null,
    "query-timeout" : null,
    "reauth-plugin-class-name" : null,
    "reauth-plugin-properties" : null,
    "security-domain" : null,
    "set-tx-query-timeout" : false,
    "share-prepared-statements" : false,
    "spy" : false,
    "stale-connection-checker-class-name" : null,
    "stale-connection-checker-properties" : null,
    "track-statements" : "NOWARN",
    "transaction-isolation" : null,
    "url-delimiter" : null,
    "url-selector-strategy-class-name" : null,
    "use-ccm" : true,
    "use-fast-fail" : false,
    "use-java-context" : true,
    "use-try-lock" : null,
    "user-name" : "sa",
    "valid-connection-checker-class-name" : null,
    "valid-connection-checker-properties" : null,
    "validate-on-match" : false,
    "statistics" : {
        "jdbc" : {
            "PreparedStatementCacheAccessCount" : "0",
            "PreparedStatementCacheAddCount" : "0",
            "PreparedStatementCacheCurrentSize" : "0",
            "PreparedStatementCacheDeleteCount" : "0",
            "PreparedStatementCacheHitCount" : "0",
            "PreparedStatementCacheMissCount" : "0"
        },
        "pool" : {
            "ActiveCount" : "0",
            "AvailableCount" : "20",
            "AverageBlockingTime" : "0",
            "AverageCreationTime" : "0",
            "CreatedCount" : "0",
            "DestroyedCount" : "0",
            "MaxCreationTime" : "0",
            "MaxUsedCount" : "0",
            "MaxWaitTime" : "0",
            "TimedOut" : "0",
            "TotalBlockingTime" : "0",
            "TotalCreationTime" : "0"
        }
    }
}

Getting the <connection-url> attribute details of DataSource:

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/datasources/data-source/ExampleDS?operation=attribute&name=connection-url"

"jdbc:h2:mem:test;DB_CLOSE_DELAY=-1"

Getting “set-tx-query-timeout” attribute information of DataSource

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/datasources/data-source/ExampleDS?operation=attribute&name=set-tx-query-timeout"

false

Getting DataSource’s Comlete Configuration related information

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/datasources/data-source/ExampleDS?operation=resource&recursive&json.pretty"

{
    "allocation-retry" : null,
    "allocation-retry-wait-millis" : null,
    "allow-multiple-users" : null,
    "background-validation" : null,
    "background-validation-millis" : null,
    "blocking-timeout-wait-millis" : null,
    "check-valid-connection-sql" : null,
    "connection-properties" : null,
    "connection-url" : "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
    "datasource-class" : null,
    "driver-class" : null,
    "driver-name" : "h2",
    "enabled" : true,
    "exception-sorter-class-name" : null,
    "exception-sorter-properties" : null,
    "flush-strategy" : null,
    "idle-timeout-minutes" : null,
    "jndi-name" : "java:jboss/datasources/ExampleDS",
    "jta" : true,
    "max-pool-size" : null,
    "min-pool-size" : null,
    "new-connection-sql" : null,
    "password" : "sa",
    "pool-prefill" : null,
    "pool-use-strict-min" : null,
    "prepared-statements-cache-size" : null,
    "query-timeout" : null,
    "reauth-plugin-class-name" : null,
    "reauth-plugin-properties" : null,
    "security-domain" : null,
    "set-tx-query-timeout" : false,
    "share-prepared-statements" : false,
    "spy" : false,
    "stale-connection-checker-class-name" : null,
    "stale-connection-checker-properties" : null,
    "track-statements" : "NOWARN",
    "transaction-isolation" : null,
    "url-delimiter" : null,
    "url-selector-strategy-class-name" : null,
    "use-ccm" : true,
    "use-fast-fail" : false,
    "use-java-context" : true,
    "use-try-lock" : null,
    "user-name" : "sa",
    "valid-connection-checker-class-name" : null,
    "valid-connection-checker-properties" : null,
    "validate-on-match" : false,
    "statistics" : {
        "jdbc" : null,
        "pool" : null
    }
}

Getting Memory & Thread & Runtime Details with server properties

 wget -O out.txt "http://admin:admin123@localhost:9990/management/core-service/platform-mbean?operation=resource&type=runtime&recursive&json.pretty"

{"type" : {
    "garbage-collector" : {"name" : {
        "PS_Scavenge" : {},
        "PS_MarkSweep" : {}
    }},
    "runtime" : {
        "name" : "24028@localhost.localdomain",
        "vm-name" : "Java HotSpot(TM) 64-Bit Server VM",
        "vm-vendor" : "Oracle Corporation",
        "vm-version" : "23.1-b03",
        "spec-name" : "Java Virtual Machine Specification",
        "spec-vendor" : "Oracle Corporation",
        "spec-version" : "1.7",
        "management-spec-version" : "1.2",
        "class-path" : "/home/userone/jboss-as-7.1.2/jboss-modules.jar",
        "library-path" : "/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib",
        "boot-class-path-supported" : true,
        "boot-class-path" : "/home/userone/jdk1.7.0_05/jre/lib/resources.jar:/home/userone/jdk1.7.0_05/jre/lib/rt.jar:/home/userone/jdk1.7.0_05/jre/lib/sunrsasign.jar:/home/userone/jdk1.7.0_05/jre/lib/jsse.jar:/home/userone/jdk1.7.0_05/jre/lib/jce.jar:/home/userone/jdk1.7.0_05/jre/lib/charsets.jar:/home/userone/jdk1.7.0_05/jre/lib/jfr.jar:/home/userone/jdk1.7.0_05/jre/classes",
        "input-arguments" : [
            "-D[Standalone]",
            "-XX:+UseCompressedOops",
            "-Xms1303m",
            "-Xmx1303m",
            "-XX:MaxPermSize=256m",
            "-Djava.net.preferIPv4Stack=true",
            "-Dorg.jboss.resolver.warning=true",
            "-Dsun.rmi.dgc.client.gcInterval=3600000",
            "-Dsun.rmi.dgc.server.gcInterval=3600000",
            "-Djboss.modules.system.pkgs=org.jboss.byteman",
            "-Djava.awt.headless=true",
            "-Djboss.server.default.config=standalone.xml",
            "-Dorg.jboss.boot.log.file=/home/userone/jboss-as-7.1.2/standalone/log/boot.log",
            "-Dlogging.configuration=file:/home/userone/jboss-as-7.1.2/standalone/configuration/logging.properties"
        ],
        "start-time" : 1348315286154,
        "system-properties" : {
            "[Standalone]" : "",
            "awt.toolkit" : "sun.awt.X11.XToolkit",
            "catalina.home" : "/home/userone/jboss-as-7.1.2/standalone/tmp",
            "file.encoding" : "UTF-8",
            "file.encoding.pkg" : "sun.io",
            "file.separator" : "/",
            "java.awt.graphicsenv" : "sun.awt.X11GraphicsEnvironment",
            "java.awt.headless" : "true",
            "java.awt.printerjob" : "sun.print.PSPrinterJob",
            "java.class.path" : "/home/userone/jboss-as-7.1.2/jboss-modules.jar",
            "java.class.version" : "51.0",
            "java.endorsed.dirs" : "/home/userone/jdk1.7.0_05/jre/lib/endorsed",
            "java.ext.dirs" : "/home/userone/jdk1.7.0_05/jre/lib/ext:/usr/java/packages/lib/ext",
            "java.home" : "/home/userone/jdk1.7.0_05/jre",
            "java.io.tmpdir" : "/tmp",
            "java.library.path" : "/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib",
            "java.naming.factory.url.pkgs" : "org.jboss.as.naming.interfaces:org.jboss.ejb.client.naming",
            "java.net.preferIPv4Stack" : "true",
            "java.protocol.handler.pkgs" : "org.jboss.net.protocol|org.jboss.vfs.protocol",
            "java.runtime.name" : "Java(TM) SE Runtime Environment",
            "java.runtime.version" : "1.7.0_05-b05",
            "java.specification.name" : "Java Platform API Specification",
            "java.specification.vendor" : "Oracle Corporation",
            "java.specification.version" : "1.7",
            "java.util.logging.manager" : "org.jboss.logmanager.LogManager",
            "java.vendor" : "Oracle Corporation",
            "java.vendor.url" : "http://java.oracle.com/",
            "java.vendor.url.bug" : "http://bugreport.sun.com/bugreport/",
            "java.version" : "1.7.0_05",
            "java.vm.info" : "mixed mode",
            "java.vm.name" : "Java HotSpot(TM) 64-Bit Server VM",
            "java.vm.specification.name" : "Java Virtual Machine Specification",
            "java.vm.specification.vendor" : "Oracle Corporation",
            "java.vm.specification.version" : "1.7",
            "java.vm.vendor" : "Oracle Corporation",
            "java.vm.version" : "23.1-b03",
            "javax.management.builder.initial" : "org.jboss.as.jmx.PluggableMBeanServerBuilder",
            "javax.xml.datatype.DatatypeFactory" : "__redirected.__DatatypeFactory",
            "javax.xml.parsers.DocumentBuilderFactory" : "__redirected.__DocumentBuilderFactory",
            "javax.xml.parsers.SAXParserFactory" : "__redirected.__SAXParserFactory",
            "javax.xml.stream.XMLEventFactory" : "__redirected.__XMLEventFactory",
            "javax.xml.stream.XMLInputFactory" : "__redirected.__XMLInputFactory",
            "javax.xml.stream.XMLOutputFactory" : "__redirected.__XMLOutputFactory",
            "javax.xml.transform.TransformerFactory" : "__redirected.__TransformerFactory",
            "javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema" : "__redirected.__SchemaFactory",
            "javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom" : "__redirected.__XPathFactory",
            "jboss.home.dir" : "/home/userone/jboss-as-7.1.2",
            "jboss.host.name" : "localhost",
            "jboss.modules.dir" : "/home/userone/jboss-as-7.1.2/modules",
            "jboss.modules.system.pkgs" : "org.jboss.byteman",
            "jboss.node.name" : "localhost",
            "jboss.qualified.host.name" : "localhost.localdomain",
            "jboss.server.base.dir" : "/home/userone/jboss-as-7.1.2/standalone",
            "jboss.server.config.dir" : "/home/userone/jboss-as-7.1.2/standalone/configuration",
            "jboss.server.data.dir" : "/home/userone/jboss-as-7.1.2/standalone/data",
            "jboss.server.default.config" : "standalone.xml",
            "jboss.server.deploy.dir" : "/home/userone/jboss-as-7.1.2/standalone/data/content",
            "jboss.server.log.dir" : "/home/userone/jboss-as-7.1.2/standalone/log",
            "jboss.server.name" : "localhost",
            "jboss.server.temp.dir" : "/home/userone/jboss-as-7.1.2/standalone/tmp",
            "line.separator" : "\n",
            "logging.configuration" : "file:/home/userone/jboss-as-7.1.2/standalone/configuration/logging.properties",
            "module.path" : "/home/userone/jboss-as-7.1.2/modules",
            "org.apache.coyote.http11.Http11Protocol.COMPRESSION" : "on",
            "org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES" : "text/javascript,text/css,text/html",
            "org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIN_SIZE" : "5",
            "org.jboss.as.logging.per-deployment" : "false",
            "org.jboss.boot.log.file" : "/home/userone/jboss-as-7.1.2/standalone/log/boot.log",
            "org.jboss.com.sun.CORBA.ORBUseDynamicStub" : "true",
            "org.jboss.resolver.warning" : "true",
            "org.jboss.security.context.ThreadLocal" : "true",
            "org.omg.CORBA.ORBClass" : "org.jacorb.orb.ORB",
            "org.omg.CORBA.ORBSingletonClass" : "org.jacorb.orb.ORBSingleton",
            "org.osgi.vendor.framework" : "org.jboss.osgi.framework",
            "org.xml.sax.driver" : "__redirected.__XMLReaderFactory",
            "os.arch" : "amd64",
            "os.name" : "Linux",
            "os.version" : "3.4.9-2.fc16.x86_64",
            "path.separator" : ":",
            "sun.arch.data.model" : "64",
            "sun.boot.class.path" : "/home/userone/jdk1.7.0_05/jre/lib/resources.jar:/home/userone/jdk1.7.0_05/jre/lib/rt.jar:/home/userone/jdk1.7.0_05/jre/lib/sunrsasign.jar:/home/userone/jdk1.7.0_05/jre/lib/jsse.jar:/home/userone/jdk1.7.0_05/jre/lib/jce.jar:/home/userone/jdk1.7.0_05/jre/lib/charsets.jar:/home/userone/jdk1.7.0_05/jre/lib/jfr.jar:/home/userone/jdk1.7.0_05/jre/classes",
            "sun.boot.library.path" : "/home/userone/jdk1.7.0_05/jre/lib/amd64",
            "sun.cpu.endian" : "little",
            "sun.cpu.isalist" : "",
            "sun.desktop" : "gnome",
            "sun.io.unicode.encoding" : "UnicodeLittle",
            "sun.java.command" : "/home/userone/jboss-as-7.1.2/jboss-modules.jar -mp /home/userone/jboss-as-7.1.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/home/userone/jboss-as-7.1.2 -Djboss.server.base.dir=/home/userone/jboss-as-7.1.2/standalone -c standalone-full.xml -Dorg.jboss.as.logging.per-deployment=false",
            "sun.java.launcher" : "SUN_STANDARD",
            "sun.jnu.encoding" : "UTF-8",
            "sun.management.compiler" : "HotSpot 64-Bit Tiered Compilers",
            "sun.os.patch.level" : "unknown",
            "sun.rmi.dgc.client.gcInterval" : "3600000",
            "sun.rmi.dgc.server.gcInterval" : "3600000",
            "user.country" : "US",
            "user.dir" : "/home/userone/jboss-as-7.1.2/bin",
            "user.home" : "/home/jsenshar",
            "user.language" : "en",
            "user.name" : "jsenshar",
            "user.timezone" : "Asia/Calcutta"
        },
        "uptime" : 14530013,
        "object-name" : "java.lang:type=Runtime"
    },
    "memory-manager" : {"name" : {
        "PS_Scavenge" : {},
        "CodeCacheManager" : {},
        "PS_MarkSweep" : {}
    }},
    "threading" : {
        "all-thread-ids" : [
            150,
            142,
            140,
            139,
            138,
            137,
            136,
            135,
            134,
            132,
            131,
            130,
            129,
            127,
            126,
            125,
            124,
            123,
            122,
            121,
            120,
            117,
            116,
            115,
            114,
            113,
            112,
            111,
            110,
            109,
            108,
            106,
            105,
            103,
            102,
            101,
            100,
            98,
            97,
            96,
            93,
            95,
            94,
            92,
            91,
            90,
            88,
            87,
            86,
            85,
            80,
            79,
            53,
            52,
            51,
            20,
            18,
            17,
            16,
            15,
            14,
            13,
            12,
            11,
            8,
            4,
            3,
            2
        ],
        "thread-contention-monitoring-supported" : true,
        "thread-cpu-time-supported" : true,
        "current-thread-cpu-time-supported" : true,
        "object-monitor-usage-supported" : true,
        "synchronizer-usage-supported" : true,
        "thread-contention-monitoring-enabled" : false,
        "thread-cpu-time-enabled" : true,
        "thread-count" : 68,
        "peak-thread-count" : 118,
        "total-started-thread-count" : 144,
        "daemon-thread-count" : 31,
        "current-thread-cpu-time" : 528324157,
        "current-thread-user-time" : 170000000,
        "object-name" : "java.lang:type=Threading"
    },
    "buffer-pool" : {"name" : {
        "mapped" : {},
        "direct" : {}
    }},
    "memory-pool" : {"name" : {
        "PS_Eden_Space" : {
            "name" : "PS_Eden_Space",
            "type" : "HEAP",
            "valid" : true,
            "memory-manager-names" : [
                "PS_MarkSweep",
                "PS_Scavenge"
            ],
            "usage-threshold-supported" : false,
            "collection-usage-threshold-supported" : true,
            "usage-threshold" : null,
            "collection-usage-threshold" : 0,
            "usage" : {
                "init" : 341639168,
                "used" : 154096440,
                "committed" : 341966848,
                "max" : 341966848
            },
            "peak-usage" : {
                "init" : 341639168,
                "used" : 341639168,
                "committed" : 341966848,
                "max" : 341966848
            },
            "usage-threshold-exceeded" : null,
            "usage-threshold-count" : null,
            "collection-usage-threshold-exceeded" : false,
            "collection-usage-threshold-count" : 0,
            "collection-usage" : {
                "init" : 341639168,
                "used" : 0,
                "committed" : 341966848,
                "max" : 341966848
            },
            "object-name" : "java.lang:type=MemoryPool,name=\"PS Eden Space\""
        },
        "PS_Old_Gen" : {
            "name" : "PS_Old_Gen",
            "type" : "HEAP",
            "valid" : true,
            "memory-manager-names" : ["PS_MarkSweep"],
            "usage-threshold-supported" : true,
            "collection-usage-threshold-supported" : true,
            "usage-threshold" : 0,
            "collection-usage-threshold" : 0,
            "usage" : {
                "init" : 910884864,
                "used" : 81936,
                "committed" : 910884864,
                "max" : 911605760
            },
            "peak-usage" : {
                "init" : 910884864,
                "used" : 81936,
                "committed" : 910884864,
                "max" : 911605760
            },
            "usage-threshold-exceeded" : false,
            "usage-threshold-count" : 0,
            "collection-usage-threshold-exceeded" : false,
            "collection-usage-threshold-count" : 0,
            "collection-usage" : {
                "init" : 910884864,
                "used" : 0,
                "committed" : 0,
                "max" : 911605760
            },
            "object-name" : "java.lang:type=MemoryPool,name=\"PS Old Gen\""
        },
        "PS_Survivor_Space" : {
            "name" : "PS_Survivor_Space",
            "type" : "HEAP",
            "valid" : true,
            "memory-manager-names" : [
                "PS_MarkSweep",
                "PS_Scavenge"
            ],
            "usage-threshold-supported" : false,
            "collection-usage-threshold-supported" : true,
            "usage-threshold" : null,
            "collection-usage-threshold" : 0,
            "usage" : {
                "init" : 56885248,
                "used" : 44903304,
                "committed" : 56885248,
                "max" : 56885248
            },
            "peak-usage" : {
                "init" : 56885248,
                "used" : 44903304,
                "committed" : 56885248,
                "max" : 56885248
            },
            "usage-threshold-exceeded" : null,
            "usage-threshold-count" : null,
            "collection-usage-threshold-exceeded" : false,
            "collection-usage-threshold-count" : 0,
            "collection-usage" : {
                "init" : 56885248,
                "used" : 44903304,
                "committed" : 56885248,
                "max" : 56885248
            },
            "object-name" : "java.lang:type=MemoryPool,name=\"PS Survivor Space\""
        },
        "PS_Perm_Gen" : {
            "name" : "PS_Perm_Gen",
            "type" : "NON_HEAP",
            "valid" : true,
            "memory-manager-names" : ["PS_MarkSweep"],
            "usage-threshold-supported" : true,
            "collection-usage-threshold-supported" : true,
            "usage-threshold" : 0,
            "collection-usage-threshold" : 0,
            "usage" : {
                "init" : 21757952,
                "used" : 53906776,
                "committed" : 54001664,
                "max" : 268435456
            },
            "peak-usage" : {
                "init" : 21757952,
                "used" : 53906776,
                "committed" : 54001664,
                "max" : 268435456
            },
            "usage-threshold-exceeded" : false,
            "usage-threshold-count" : 0,
            "collection-usage-threshold-exceeded" : false,
            "collection-usage-threshold-count" : 0,
            "collection-usage" : {
                "init" : 21757952,
                "used" : 0,
                "committed" : 0,
                "max" : 268435456
            },
            "object-name" : "java.lang:type=MemoryPool,name=\"PS Perm Gen\""
        },
        "Code_Cache" : {
            "name" : "Code_Cache",
            "type" : "NON_HEAP",
            "valid" : true,
            "memory-manager-names" : ["CodeCacheManager"],
            "usage-threshold-supported" : true,
            "collection-usage-threshold-supported" : false,
            "usage-threshold" : 0,
            "collection-usage-threshold" : null,
            "usage" : {
                "init" : 2555904,
                "used" : 1969024,
                "committed" : 2555904,
                "max" : 50331648
            },
            "peak-usage" : {
                "init" : 2555904,
                "used" : 1979776,
                "committed" : 2555904,
                "max" : 50331648
            },
            "usage-threshold-exceeded" : false,
            "usage-threshold-count" : 0,
            "collection-usage-threshold-exceeded" : null,
            "collection-usage-threshold-count" : null,
            "collection-usage" : null,
            "object-name" : "java.lang:type=MemoryPool,name=\"Code Cache\""
        }
    }},
    "compilation" : {
        "name" : "HotSpot 64-Bit Tiered Compilers",
        "compilation-time-monitoring-supported" : true,
        "total-compilation-time" : 7407,
        "object-name" : "java.lang:type=Compilation"
    },
    "memory" : {},
    "class-loading" : {},
    "operating-system" : {
        "name" : "Linux",
        "arch" : "amd64",
        "version" : "3.4.9-2.fc16.x86_64",
        "available-processors" : 4,
        "system-load-average" : 0.13,
        "object-name" : "java.lang:type=OperatingSystem"
    }
}}

Messaging & HornetQ subsystem related Details

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/messaging/hornetq-server/default?operation=resource&recursive&json.pretty"

{
    "acceptor" : null,
    "allow-failback" : true,
    "async-connection-execution-enabled" : true,
    "backup" : false,
    "bridge" : null,
    "broadcast-group" : null,
    "cluster-connection" : null,
    "cluster-password" : "CHANGE ME!!",
    "cluster-user" : "HORNETQ.CLUSTER.ADMIN.USER",
    "clustered" : false,
    "connection-ttl-override" : -1,
    "connector" : null,
    "connector-service" : null,
    "core-address" : null,
    "create-bindings-dir" : true,
    "create-journal-dir" : true,
    "discovery-group" : null,
    "divert" : null,
    "failback-delay" : 5000,
    "failover-on-shutdown" : false,
    "grouping-handler" : null,
    "id-cache-size" : 2000,
    "jms-queue" : null,
    "jms-topic" : null,
    "jmx-domain" : "org.hornetq",
    "jmx-management-enabled" : false,
    "journal-buffer-size" : null,
    "journal-buffer-timeout" : null,
    "journal-compact-min-files" : 10,
    "journal-compact-percentage" : 30,
    "journal-file-size" : 102400,
    "journal-max-io" : null,
    "journal-min-files" : 2,
    "journal-sync-non-transactional" : true,
    "journal-sync-transactional" : true,
    "journal-type" : "ASYNCIO",
    "live-connector-ref" : null,
    "log-journal-write-rate" : false,
    "management-address" : "jms.queue.hornetq.management",
    "management-notification-address" : "hornetq.notifications",
    "memory-measure-interval" : -1,
    "memory-warning-threshold" : 25,
    "message-counter-enabled" : false,
    "message-counter-max-day-history" : 10,
    "message-counter-sample-period" : 10000,
    "message-expiry-scan-period" : 30000,
    "message-expiry-thread-priority" : 3,
    "page-max-concurrent-io" : 5,
    "path" : null,
    "perf-blast-pages" : -1,
    "persist-delivery-count-before-delivery" : false,
    "persist-id-cache" : true,
    "persistence-enabled" : true,
    "queue" : null,
    "remoting-interceptors" : null,
    "run-sync-speed-test" : false,
    "scheduled-thread-pool-max-size" : 5,
    "security-domain" : "other",
    "security-enabled" : true,
    "security-invalidation-interval" : 10000,
    "server-dump-interval" : -1,
    "shared-store" : true,
    "thread-pool-max-size" : 30,
    "transaction-timeout" : 300000,
    "transaction-timeout-scan-period" : 1000,
    "wild-card-routing-enabled" : true,
    "address-setting" : {"#" : {
        "address-full-policy" : "BLOCK",
        "dead-letter-address" : "jms.queue.DLQ",
        "expiry-address" : "jms.queue.ExpiryQueue",
        "last-value-queue" : false,
        "max-delivery-attempts" : 10,
        "max-size-bytes" : 10485760,
        "message-counter-history-day-limit" : 10,
        "page-max-cache-size" : 5,
        "page-size-bytes" : 10485760,
        "redelivery-delay" : 0,
        "redistribution-delay" : -1,
        "send-to-dla-on-no-route" : false
    }},
    "connection-factory" : {
        "InVmConnectionFactory" : {
            "auto-group" : false,
            "block-on-acknowledge" : false,
            "block-on-durable-send" : true,
            "block-on-non-durable-send" : false,
            "cache-large-message-client" : false,
            "call-timeout" : 30000,
            "client-failure-check-period" : 30000,
            "client-id" : null,
            "compress-large-messages" : false,
            "confirmation-window-size" : -1,
            "connection-load-balancing-policy-class-name" : "org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy",
            "connection-ttl" : 60000,
            "connector" : {"in-vm" : null},
            "consumer-max-rate" : -1,
            "consumer-window-size" : 1048576,
            "discovery-group-name" : null,
            "discovery-initial-wait-timeout" : null,
            "dups-ok-batch-size" : 1048576,
            "entries" : ["java:/ConnectionFactory"],
            "factory-type" : null,
            "failover-on-initial-connection" : false,
            "failover-on-server-shutdown" : null,
            "group-id" : null,
            "ha" : false,
            "max-retry-interval" : 2000,
            "min-large-message-size" : 102400,
            "pre-acknowledge" : false,
            "producer-max-rate" : -1,
            "producer-window-size" : 65536,
            "reconnect-attempts" : 0,
            "retry-interval" : 2000,
            "retry-interval-multiplier" : 1.0,
            "scheduled-thread-pool-max-size" : 5,
            "thread-pool-max-size" : 30,
            "transaction-batch-size" : 1048576,
            "use-global-pools" : true
        },
        "RemoteConnectionFactory" : {
            "auto-group" : false,
            "block-on-acknowledge" : false,
            "block-on-durable-send" : true,
            "block-on-non-durable-send" : false,
            "cache-large-message-client" : false,
            "call-timeout" : 30000,
            "client-failure-check-period" : 30000,
            "client-id" : null,
            "compress-large-messages" : false,
            "confirmation-window-size" : -1,
            "connection-load-balancing-policy-class-name" : "org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy",
            "connection-ttl" : 60000,
            "connector" : {"netty" : null},
            "consumer-max-rate" : -1,
            "consumer-window-size" : 1048576,
            "discovery-group-name" : null,
            "discovery-initial-wait-timeout" : null,
            "dups-ok-batch-size" : 1048576,
            "entries" : ["java:jboss/exported/jms/RemoteConnectionFactory"],
            "factory-type" : null,
            "failover-on-initial-connection" : false,
            "failover-on-server-shutdown" : null,
            "group-id" : null,
            "ha" : false,
            "max-retry-interval" : 2000,
            "min-large-message-size" : 102400,
            "pre-acknowledge" : false,
            "producer-max-rate" : -1,
            "producer-window-size" : 65536,
            "reconnect-attempts" : 0,
            "retry-interval" : 2000,
            "retry-interval-multiplier" : 1.0,
            "scheduled-thread-pool-max-size" : 5,
            "thread-pool-max-size" : 30,
            "transaction-batch-size" : 1048576,
            "use-global-pools" : true
        }
    },
    "in-vm-acceptor" : {"in-vm" : {
        "param" : null,
        "server-id" : 0
    }},
    "in-vm-connector" : {"in-vm" : {
        "param" : null,
        "server-id" : 0
    }},
    "pooled-connection-factory" : {"hornetq-ra" : {
        "auto-group" : false,
        "block-on-acknowledge" : false,
        "block-on-durable-send" : true,
        "block-on-non-durable-send" : false,
        "cache-large-message-client" : false,
        "call-timeout" : 30000,
        "client-failure-check-period" : 30000,
        "client-id" : null,
        "confirmation-window-size" : -1,
        "connection-load-balancing-policy-class-name" : "org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy",
        "connection-ttl" : 60000,
        "connector" : {"in-vm" : null},
        "consumer-max-rate" : -1,
        "consumer-window-size" : 1048576,
        "discovery-group-name" : null,
        "discovery-initial-wait-timeout" : null,
        "dups-ok-batch-size" : 1048576,
        "entries" : ["java:/JmsXA"],
        "failover-on-initial-connection" : false,
        "failover-on-server-shutdown" : null,
        "group-id" : null,
        "ha" : false,
        "jndi-params" : null,
        "max-pool-size" : -1,
        "max-retry-interval" : 2000,
        "min-large-message-size" : 102400,
        "min-pool-size" : -1,
        "password" : null,
        "pre-acknowledge" : false,
        "producer-max-rate" : -1,
        "producer-window-size" : 65536,
        "reconnect-attempts" : 0,
        "retry-interval" : 2000,
        "retry-interval-multiplier" : 1.0,
        "scheduled-thread-pool-max-size" : 5,
        "setup-attempts" : null,
        "setup-interval" : null,
        "thread-pool-max-size" : 30,
        "transaction" : "xa",
        "transaction-batch-size" : 1048576,
        "use-global-pools" : true,
        "use-jndi" : null,
        "use-local-tx" : null,
        "user" : null
    }},
    "remote-acceptor" : {
        "netty" : {
            "param" : null,
            "socket-binding" : "messaging"
        },
        "netty-throughput" : {
            "socket-binding" : "messaging-throughput",
            "param" : {
                "batch-delay" : {"value" : "50"},
                "direct-deliver" : {"value" : "false"}
            }
        }
    },
    "remote-connector" : {
        "netty" : {
            "param" : null,
            "socket-binding" : "messaging"
        },
        "netty-throughput" : {
            "socket-binding" : "messaging-throughput",
            "param" : {"batch-delay" : {"value" : "50"}}
        }
    },
    "security-setting" : {"#" : {"role" : {"guest" : {
        "consume" : true,
        "create-durable-queue" : false,
        "create-non-durable-queue" : true,
        "delete-durable-queue" : false,
        "delete-non-durable-queue" : true,
        "manage" : false,
        "send" : true
    }}}}
}

Getting “cluster-user” attribute details of HornetQ server:

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/messaging/hornetq-server/default?operation=attribute&name=cluster-user"

"HORNETQ.CLUSTER.ADMIN.USER"

Loggign Subsystem Related Informations

Getting “console-handler” CONSOLE logger level information

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/console-handler/CONSOLE?operation=attribute&name=level"

"INFO"

Getting “console-handler” CONSOLE logger “autoflush” information

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/console-handler/CONSOLE?operation=attribute&name=autoflush"

true

Getting console-handler’s complete config informations

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/console-handler/CONSOLE?operation=resource&recursive&json.pretty"

{
    "autoflush" : true,
    "encoding" : null,
    "filter" : null,
    "formatter" : "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n",
    "level" : "INFO",
    "target" : "System.out"
}

Getting articular logger’s like”org.apache.tomcat.util.modeler” information:

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/logger/org.apache.tomcat.util.modeler?operation=resource&recursive&json.pretty"

{
    "filter" : null,
    "handlers" : null,
    "level" : "WARN",
    "use-parent-handlers" : true
}

Getting “periodic-rotating-file-handler” formatter information:

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/periodic-rotating-file-handler/FILE?operation=attribute&name=formatter"

"%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"

Getting “” suffix information:

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/periodic-rotating-file-handler/FILE?operation=attribute&name=suffix"

".yyyy-MM-dd"

Getting “” complete config infromations

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/periodic-rotating-file-handler/FILE?operation=resource&recursive&json.pretty"

{
    "append" : true,
    "autoflush" : true,
    "encoding" : null,
    "file" : {
        "relative-to" : "jboss.server.log.dir",
        "path" : "server.log"
    },
    "filter" : null,
    "formatter" : "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n",
    "level" : null,
    "suffix" : ".yyyy-MM-dd"
}

Getting “root-logger” logging level information:

wget -O out.txt "http://admin:admin123@localhost:9990/management/subsystem/logging/root-logger/ROOT?operation=attribute&name=level"

"INFO"

.
.
Thanks :)
MiddlewareMagic Team