tinymonitor¶
Start the monitoring agent.
Usage¶
Flags¶
| Flag | Description |
|---|---|
-c, --config <path> |
Path to configuration file |
-h, --help |
Help for tinymonitor |
Configuration File Search Order¶
If no config file is specified, TinyMonitor searches in this order:
./config.toml(current directory)~/.config/tinymonitor/config.toml(user config)/etc/tinymonitor/config.toml(system config)
Examples¶
# Run with auto-detected config
tinymonitor
# Run with specific config file
tinymonitor -c /path/to/config.toml
# Run with config in current directory
tinymonitor -c ./my-config.toml
Behavior¶
When started, TinyMonitor will:
- Load and validate the configuration
- Initialize all enabled metrics collectors
- Initialize all enabled alert providers
- Start the monitoring loop at the configured refresh interval
- Send alerts when thresholds are exceeded
Graceful Shutdown¶
TinyMonitor handles these signals for graceful shutdown:
SIGINT(Ctrl+C)SIGTERM
When a shutdown signal is received, TinyMonitor will:
- Stop the monitoring loop
- Wait for pending alerts to be sent
- Exit cleanly
Logging¶
By default, logs are written to stdout. You can configure a log file in config.toml: