Skip to content

josefkarasek/instrumented_app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an example of application instrumented for Prometheus. By default it listens on port 8080 and exposes metrics on the /metrics endpoint.

Set the CPU temperature metric:

curl http://localhost:8080/cpu -d 42.0

Increment the number of errors for the sda device:

curl http://localhost:8080/hd -d sda

Usage

$ ./instrumented_app --help
usage: instrumented_app [<flags>]

Flags:
  --help                     Show context-sensitive help (also try --help-long and --help-man).
  --listen="127.0.0.1:8080"  Listen address
  --listen-metrics=""        Listen address for exposing metrics (default to 'listen' if blank)
  --basic-auth=""            Basic authentication (eg <user>:<password>)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 91.0%
  • Makefile 9.0%