Sign inSign up

greegorey/bash-exporter

By greegorey

Updated almost 8 years ago

Prometheus bash exporter

Image
0

10K+

greegorey/bash-exporter repository overview

Prometheus bash exporter

Simple & minimalistic Prometheus exporter for bash scripts.

Go Report Card

Installation

Use Docker image or binary file from releases.

Usage

Usage of ./bash-exporter:
  -debug
    	Debug log level
  -interval int
    	Interval for metrics collection in seconds (default 300)
  -path string
    	path to directory with bash scripts (default "/scripts")
  -prefix string
    	Prefix for metrics (default "bash")
  -web.listen-address string
    	Address on which to expose metrics (default ":9300")

Just point -path flag to the directory with your bash scripts. Names of the files ((.*).sh) will be used as the job label. Bash scripts should return valid json (see examples).

Example output:

# HELP bash bash exporter metrics
# TYPE bash gauge
bash{job="job-1",verb="items"} 21
bash{job="job-2",verb="get"} 0.003
bash{job="job-2",verb="put"} 0.13
bash{job="job-2",verb="time"} 0.5
...

TODO

  • Docker image
  • Several scripts

Tag summary

Content type

Image

Digest

Size

5.4 MB

Last updated

about 8 years ago

docker pull greegorey/bash-exporter