Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncabatoff/script-exporter
Prometheus exporter to invoke scripts and parse their output as metrics.
https://github.com/ncabatoff/script-exporter
prometheus-exporter
Last synced: 10 days ago
JSON representation
Prometheus exporter to invoke scripts and parse their output as metrics.
- Host: GitHub
- URL: https://github.com/ncabatoff/script-exporter
- Owner: ncabatoff
- License: mit
- Created: 2017-05-19T02:05:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-27T16:22:21.000Z (over 5 years ago)
- Last Synced: 2024-10-15T13:30:00.563Z (23 days ago)
- Topics: prometheus-exporter
- Language: Go
- Size: 404 KB
- Stars: 37
- Watchers: 4
- Forks: 20
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# script-exporter
Prometheus exporter to invoke scripts and parse their output as metrics.[![Release](https://img.shields.io/github/release/ncabatoff/script-exporter.svg?style=flat-square")](https://github.com/ncabatoff/script-exporter/releases/latest)
[![Build Status](https://travis-ci.org/ncabatoff/script-exporter.svg?branch=master)](https://travis-ci.org/ncabatoff/script-exporter)
[![Powered By: GoReleaser](https://img.shields.io/badge/powered%20by-goreleaser-green.svg?branch=master)](https://github.com/goreleaser)## Usage
```
script-exporter -script.path /path/to/my/scripts -web.listen-address :9661
```Create e.g. `/path/to/my/scripts/script1`, an executable which emits on stdout metrics in the [Prometheus text exposision format](https://prometheus.io/docs/instrumenting/exposition_formats/).
Then configure your prometheus.yml to add a target like
```
- job_name: 'script1'
metrics_path: /metrics/script1
static_configs:
- targets: ['localhost:9661']
```If you add another script, you'll need another job, because the metrics path will be different.
You also want to add a job for the script_exporter internal metrics (errors, process stats, etc) as the above job will only yield metrics emitted by script1 itself:
```
- job_name: 'script-exporter'
metrics_path: /metrics
static_configs:
- targets: ['localhost:9661']
```## Docker
Build the image running: `docker build .` Or just run```
docker pull ncabatoff/script-exporter
```