https://github.com/cetanu/cmdprobe
Portable, configurable health check utility
https://github.com/cetanu/cmdprobe
Last synced: over 1 year ago
JSON representation
Portable, configurable health check utility
- Host: GitHub
- URL: https://github.com/cetanu/cmdprobe
- Owner: cetanu
- License: mit
- Created: 2023-08-22T14:51:51.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-29T15:17:03.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T06:55:25.011Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmdprobe
A utility for running arbitrary commands and checking their output
## Install
```shell
cargo install cmdprobe
```
## Usage
### Basic execution
See the example `cmdprobe.yaml` file for what configuration is available.
Construct your own configuration file, and then run cmdprobe against it to execute
all the checks that you need to do.
```shell
cmdprobe --config-file /etc/cmdprobe.yml
```
### Emitting statsd metrics
You can supply a statsd host and `cmdprobe` will emit metrics for each test & stage.
```shell
cmdprobe --config-file /etc/cmdprobe.yml --statsd-address 127.0.0.1:8125
```
The following metrics will be emitted:
```
# Did the entire probe run fail/succeed
cmdprobe.probe.failed
cmdprobe.probe.passed
# Did one check (a collection of stages) fail/succeed
cmdprobe.check.failed
cmdprobe.check.passed
# Did an indidivual stage within a check fail/succeed
cmdprobe.stage.failed
cmdprobe.stage.passed
```
## Running locally
Ensure you have a `cmdprobe.yaml` file in the current directory
```shell
# Start the httpbin for testing
docker-compose up -d
# Run cmdprobe with the local config file
RUST_LOG=cmdprobe=INFO cargo run
```
## Inspiration
I modelled this tool after [Tavern](https://taverntesting.github.io/) so that my
team would have an easy time understanding how to use it and migrate existing tests across.