Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.12 KB

File metadata and controls

33 lines (26 loc) · 1.12 KB

Deploy Custom Metric Producer

This application exists to expose a metrics endpoint that proffers custom metrics used for scaling a second application.

This metric may be tangentially related to the load of the scaled app. For instance it may gather and report on a queue depth or work backlog. However, the current app referenced here does not.

oc apply -k custom-metric-app
  namespace/keda-test created
  service/prometheus-example-app created
  deployment.apps/prometheus-example-app created
  servicemonitor.monitoring.coreos.com/prometheus-example-monitor created
  route.route.openshift.io/prometheus-example-app created

View Example metrics

ROUTE=$(oc get route prometheus-example-app -o jsonpath='{.spec.host}')
curl $ROUTE/metrics
# HELP version Version information about this binary
# TYPE version gauge
version{version="v0.4.1"} 1
# create some traffic stats then retry above
curl $ROUTE

TODO

Tip
Create a new app with more pertinent metric example. Like returning the number of Todos from a work queue.