Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Grigory Ignatyev committed Jul 9, 2018
1 parent d391d17 commit b221177
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bash-exporter .
FROM alpine:3.7
WORKDIR /root/
COPY --from=0 /go/src/github.com/gree-gorey/bash-exporter/cmd/bash-exporter/bash-exporter .
COPY ./example/* /scripts/
COPY ./examples/* /scripts/
CMD ["./bash-exporter"]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Prometheus exporter for bash scripts

## Installation

## Usage

```console
Usage of ./bash-exporter:
-debug
Expand All @@ -15,6 +19,18 @@ Usage of ./bash-exporter:
-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](https://github.com/gree-gorey/bash-exporter/tree/master/examples)).

Example output:
```console
# 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
- [x] Docker image
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit b221177

Please sign in to comment.