Skip to content

TylerStilwagen/PrometheusDemo

 
 

Repository files navigation

Prometheus Metric Demo

A simple web application written in Go with Prometheus metrics.

There are 4 endpoints that do various functions. Each with metrics to record request latency and a counter.

/health - returns a 200 "OK" message, used for k8s liveness and readiness probe
/base64?data="<something> - returns the base64 encoding of data
/sayhi?name=<name> - returns "Hello <name>!", and increments name in redis
/count?name=<name> - returns the number of times <name> has been called for sayhi

The current deployment works with

Deployment

kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/alertmanager.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheus.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheusrule.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/servicemonitor.crd.yaml

helm install ./helm/prometheus

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 82.4%
  • Smarty 15.8%
  • Dockerfile 1.8%