Skip to content

Hello world -style HTTP application with Prometheus metrics

License

Notifications You must be signed in to change notification settings

joonas-fi/hellohttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

A hello world HTTP server with Prometheus metrics.

When deploying, specify (service-level) ENV variable METRICS_ENDPOINT=/metrics to optionally expose metrics automatically with promswarmconnect.

Example

$ docker service create \
  --name hellohttp \
  --env "METRICS_ENDPOINT=/metrics" \
  --network yourNetwork \
  --publish 8012:80 \
  "ghcr.io/joonas-fi/hellohttp:VERSION"

Replace VERSION with a tag from Docker Hub link from top of this document.

You can now access http://localhost:8012/

Metrics are at http://localhost:8012/metrics (look for requests_served).

If you're using promswarmconnect, requests_served should now be queryable from Prometheus.

About

Hello world -style HTTP application with Prometheus metrics

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages