orlandohohmeier / monitor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

👀 Monitor

This tool can be used to wrap commands and report their outputs as Success or Error metrics (Counter); this is useful when running health checks or probes as one can use Prometheus to monitor the results. It will transparently forward outputs but will exit till Prometheus fetched the metrics.

Usage

./monitor <flags> <command> <arguments>

Examples

./monitor curl http://google.com

This configuration will run curl report success unless http://google.com is unreachable and curl returns a non zero exit code.

./monitor --success-pattern=E --error-pattern=E pytest

This configuration will run pytest, scan stdout for E and P and reports successes and errors accordingly.

About


Languages

Language:Go 100.0%