A method for collecting, aggregating, and composing metrics and a computer
system comprises a producer application adapted to periodically generate
metrics comprising state information of the producer application; a
metric engine adapted to aggregate the metrics; and a consumer
application adapted to receive the aggregated metrics, wherein the metric
engine is further adapted to produce new metrics in accordance with
desired requirements of the consumer application. The computer system
further comprises a metric service policy adapted to provide definitions
of the metrics generated from the producer application and desired
requirements of the consumer application, wherein the metric service
policy is adapted to establish an executable set of actions for producing
the new metrics from the generated metrics, wherein the metric service
policy is adapted to be executable by the metric engine, and wherein
multiple metric service policies are simultaneously executable by the
metric engine.