## Attributes (5)

- capacity - Maximum capacity of the metric used to normalize the load values from a metric which require explicit capacity.

  Type | DOUBLE
  Default Value | 1.0
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "DOUBLE"
          },
          "description" : "Maximum capacity of the metric used to normalize the load values from a metric which require explicit capacity.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 1.0,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- class - Class name to use to construct a load metric from.

  Type | STRING
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Class name to use to construct a load metric from.",
          "expressions-allowed" : true,
          "required" : true,
          "nillable" : false,
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- module - Module name from which to load the load metric class.

  Type | STRING
  Default Value | org.wildfly.extension.mod_cluster
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Module name from which to load the load metric class.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : "org.wildfly.extension.mod_cluster",
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- property - Properties to apply on a loaded metric instance.

  Type | OBJECT
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "OBJECT"
          },
          "description" : "Properties to apply on a loaded metric instance.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "stability" : "default",
          "value-type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

- weight - Number indicating the significance of a metric with respect to the other metrics. For example, a metric of weight 2 will have twice the impact on the overall load factor than a metric of weight 1.

  Type | INT
  Default Value | 1
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | all-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "Number indicating the significance of a metric with respect to the other metrics. For example, a metric of weight 2 will have twice the impact on the overall load factor than a metric of weight 1.",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 1,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "all-services",
          "capability-reference" : null
      }

## Operations (2)

- add - Add a load metric to the set of load metrics to calculate the load factor from.

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  capacity | DOUBLE | false | true | 1.0 | Maximum capacity of the metric used to normalize the load values from a metric which require explicit capacity.
  class | STRING | true | true |  | Class name to use to construct a load metric from.
  module | STRING | false | true | org.wildfly.extension.mod_cluster | Module name from which to load the load metric class.
  property | OBJECT | false | true |  | Properties to apply on a loaded metric instance.
  weight | INT | false | true | 1 | Number indicating the significance of a metric with respect to the other metrics. For example, a metric of weight 2 will have twice the impact on the overall load factor than a metric of weight 1.

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "Add a load metric to the set of load metrics to calculate the load factor from.",
          "request-properties" : {
              "capacity" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "DOUBLE"
                  },
                  "description" : "Maximum capacity of the metric used to normalize the load values from a metric which require explicit capacity.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 1.0,
                  "stability" : "default"
              },
              "class" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "Class name to use to construct a load metric from.",
                  "expressions-allowed" : true,
                  "required" : true,
                  "nillable" : false,
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "module" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "Module name from which to load the load metric class.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : "org.wildfly.extension.mod_cluster",
                  "stability" : "default"
              },
              "property" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "OBJECT"
                  },
                  "description" : "Properties to apply on a loaded metric instance.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "stability" : "default",
                  "value-type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  }
              },
              "weight" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "Number indicating the significance of a metric with respect to the other metrics. For example, a metric of weight 2 will have twice the impact on the overall load factor than a metric of weight 1.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 1,
                  "stability" : "default"
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Remove a load metric from the set of load metrics to calculate the load factor from.

  Raw DMR model |
      {
          "operation-name" : "remove",
          "description" : "Remove a load metric from the set of load metrics to calculate the load factor from.",
          "request-properties" : {},
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "restart-required" : "all-services",
          "runtime-only" : false
      }

## Galleon Features

Galleon features are to be used when creating Galleon feature-packs.

- subsystem.modcluster.proxy.load-provider.dynamic.custom-load-metric

      <feature spec="subsystem.modcluster.proxy.load-provider.dynamic.custom-load-metric">
        <param name="custom-load-metric" value="{resource name}"/>
        <param name="proxy" value="{resource name}"/>
        <param name="capacity" value="{value}"/>
        <param name="class" value="{value}"/>
        <param name="module" value="{value}"/>
        <param name="property" value="{value}"/>
        <param name="weight" value="{value}"/>
      <feature/>