Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Web app monitoring with Prometheus

This repository is an example set up of a web application written in Go that exposes its metrics for Prometheus monitoring toolkit. The application and Prometheus run on Kubernetes cluster.

Hello app

There are three versions of the hello app which can be pulled from Docker Hub.

$ sudo docker run --rm -p 8000:8000 marselester/prom-on-k8s:v3
$ curl localhost:8000/hello
Hello, World!
$ curl localhost:8000/metrics
# HELP hello_request_duration_seconds Histogram of the /hello request duration.
# TYPE hello_request_duration_seconds histogram
hello_request_duration_seconds_bucket{le="0.01"} 0
hello_request_duration_seconds_bucket{le="0.025"} 0
hello_request_duration_seconds_bucket{le="0.05"} 0
hello_request_duration_seconds_bucket{le="0.1"} 1
hello_request_duration_seconds_bucket{le="0.25"} 1
hello_request_duration_seconds_bucket{le="0.5"} 1
hello_request_duration_seconds_bucket{le="1"} 1
hello_request_duration_seconds_bucket{le="2.5"} 1
hello_request_duration_seconds_bucket{le="5"} 1
hello_request_duration_seconds_bucket{le="10"} 1
hello_request_duration_seconds_bucket{le="+Inf"} 1
hello_request_duration_seconds_sum 0.083953974
hello_request_duration_seconds_count 1
# HELP hello_requests_total Total number of /hello requests.
# TYPE hello_requests_total counter
hello_requests_total{status="500"} 1

If you want to build the hello app from source code, you should clone the repository into your GOPATH, otherwise vendoring won't work (we use Glide).

$ git clone \
$ cd $GOPATH/src/
$ glide install
$ make build

Kubernetes manifests

Kubernetes manifests have excessive names, e.g., name: prometheus-deployment instead of just name: prometheus. That is done for demonstration purpose.


Web app monitoring with Prometheus toolkit running on Kubernetes



No releases published
You can’t perform that action at this time.