# sampler

> Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file

- Type: agent or tool
- Field: DevOps & Cloud
- Repository: https://github.com/sqshq/sampler
- GitHub stars: 14810
- Licence: GPL-3.0
- Language: Go
- Last push: 2024-02-22
- Page: https://imutechz.in/agents/sampler

## What it is
Sampler is a terminal tool that runs shell commands at a set rate and visualizes their output, configured through a simple YAML file. It is aimed at developers who want lightweight, local monitoring without standing up a full monitoring stack. You define commands in YAML, run sampler with the config, and arrange components on the UI. It is described as a development tool, not a replacement for full-scale monitoring systems.

## Features
- Runchart, sparkline, barchart, gauge, textbox and asciibox components
- Sampling rate and decimal scale configurable per component
- Triggers for conditional actions, including a sound tone
- Interactive shell support for database and remote server access
- Variables and color themes
- Gather telemetry from remote machines via ssh in init commands

## Best for
- Watching database or queue metrics from the terminal
- Triggering a deployment script and getting notified when it finishes
- Quick local visualization of any metric obtainable via a shell command
- Lightweight monitoring when Prometheus and Grafana are overkill

## Pros
- No servers, databases or deploy needed; you specify shell commands and it works
- Any metric obtainable through a shell command can be visualized
- Can run locally while gathering telemetry from remote machines over ssh

## Cons
- Not an alternative to full-scale monitoring systems
- libasound2-dev is required to play trigger sound tones on Linux
- Windows support is experimental

## Install
```
brew install sampler
```

## Usage
```
sampler -c config.yml
```

Tags: monitoring, terminal, shell-commands, visualization, yaml, devops, alerting, metrics
