Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

The user can declare multiple metrics per service #3

Closed
mtneug opened this issue Nov 27, 2016 · 0 comments
Closed

The user can declare multiple metrics per service #3

mtneug opened this issue Nov 27, 2016 · 0 comments

Comments

@mtneug
Copy link
Owner

mtneug commented Nov 27, 2016

Description

Autoscaling requires the gathering of application runtime metrics. Per service at least one metric has to be defined. However one metric might not be enough to capture all scaling related aspects of one service. For instance the application could have a low CPU utilization but a too high memory consumption. In this case only observing the CPU leads to the decision to scale down when in reality more replicas are needed. Therefore users are able to specify an arbitrary amount of metrics per service.

Design

For metric definitions users have to specify labels starting with de.mtneug.spate.metrics. and followed by a user defined key. Each unique key declares a new metric. Separate by a dot users can specify options. A dot is therefore a forbidden character in keys.

The only option that is required for each metric is the type. However depending on the type more inputs might be necessary. The type is a well defined set. Currently planed are prometheus (see #9), cpu (see #17), and memory (see #18).

Example

$ docker service create \
   --name service \
   --label de.mtneug.spate.metrics.cpu.type=cpu \
   --label de.mtneug.spate.metrics.mymetric.type=prometheus \
   ...
   my/service
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant