• Stars
    star
    117
  • Rank 300,121 (Top 6 %)
  • Language
    Go
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Periodically run a command and exports its return code as a prometheus metric.

Prometheus Shell Command Runner

Periodically run a command and exports its return code as a prometheus metric.

$ docker run -ti tomwilkie/prom-run -h
Usage: ./prom-run (options) command...
  -listen-addr string
    	Address to listen on (default ":9152")
  -period duration
    	Period with which to run the command. (default 10s)
  -timeout duration
    	Amount of time to give the command to run. (default 10m0s)

The output of the command is also made availible via HTTP at /.

To run this, try:

$ docker run -p 9152:9152 -ti tomwilkie/prom-run echo foo
INFO[0000] Listening on address :9152                   
INFO[0010] Running 'echo' with argments [foo]           
INFO[0010] Command exited successfully