10 Replies Latest reply on May 14, 2013 11:47 AM by Radoslav Husar

    How to programatically enable/disable contextxts and more ?

    nicolas duminil Master

      Greetings,

       

      We have a production system running a JBoss domain with mod_cluster configured. For monitoring purposes, I need to access to the mod_cluster meta-data. For example, I would need to be able to get the list of contexts, to modify their status, for example to enable/disable them or to drain them, to have access to the active sessions for these contexts, to monitor wheather there are active sessions, how many, etc.

       

      How could I do that ? Shall I use MCMP for that ? If yes, how ? Is there any API or examples ?

       

      Also, looking in the documentation I see that CLI is supposed to be able to get some of the above described functinality. The documentation for the Jboss mod_cluster (https://docs.jboss.org/author/display/AS71/mod_cluster+in+AS7) is stating the following:

       

      The modcluster subsystem supports several operations:

      [standalone@localhost:9999 subsystem=modcluster] :read-operation-names

      {

        "outcome" => "success",

        "result" =>

        [

          "add",

          "add-custom-metric",

          "add-metric",

          "add-proxy",

          "disable",

          "disable-context",

          "enable",

          "enable-context",

          "list-proxies",

          "read-attribute",

          "read-children-names",

          "read-children-resources",

          "read-children-types",

          "read-operation-description",

          "read-operation-names",

          "read-proxies-configuration",

          "read-proxies-info",

          "read-resource",

          "read-resource-description",

          "refresh",

          "remove-custom-metric",

          "remove-metric",

          "remove-proxy",

          "reset",

          "stop",

          "stop-context",

          "validate-address",

          "write-attribute" ]

      }

       

      However, on our system, doing the same the output is:

      [domain@10.20.71.107:9999 /] /profile=customer-full-ha/subsystem=modcluster:read-operation-names

      {

        "outcome" => "success",

        "result" => [ "add",

        "read-attribute",

        "read-children-names",

        "read-children-resources",

        "read-children-types",

        "read-operation-description",

        "read-operation-names",

        "read-resource",

        "read-resource-description",

        "remove",

        "undefine-attribute",

        "whoami",

        "write-attribute" ]

      }

       

      Is that normal ?

       

      Kind regards,

       

      Nicolas