Skip to content

brybacki/prometheus-example-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# prometheus-example-go - Example go app with prometheus metrics

App starts http server with a few urls:

  • http://localhost:8123 - root url, shows Hell, means app is working.

  • http://localhost:8123/update/${value} - a way to set example_gauge value. Last part of path the value.

  • http://localhost:8123/metrics - prometheus metrics, shows one gauge, and requests counter with labels per url/path.

Building and running

cd src

GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -o=./bin/main .

./bin/main

Docker build

DOCKER_REPOSITORY=quay.io/brybacki/

docker tag prometheus_example_go:latest quay.io/brybacki/prometheus_example_go:latest
docker push quay.io/brybacki/prometheus_example_go:latest

About

Playing with prometheus metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors