NAME
sys-monitor-lite - Collect lightweight system metrics as JSON or YAML
SYNOPSIS
sys-monitor-lite --once
sys-monitor-lite --interval 5 --collect cpu,mem --output jsonl
DESCRIPTION
Collects metrics exposed by Sys::Monitor::Lite and prints them as JSON, JSON Lines, or YAML. Use --collect to limit which subsystems are gathered.
OPTIONS
- --interval NUM
-
Collect every NUM seconds. Defaults to 5 seconds when running continuously.
- --once
-
Collect a single sample (default when
--intervalis not provided). - --collect LIST
-
Comma-separated list of metrics to gather (e.g.
cpu,mem,disk). Available metrics: system, cpu, load, mem, disk, disk_io, net. - --output FORMAT
-
Output format:
json(default),jsonlfor JSON Lines, oryaml. - --pretty
-
Pretty-print JSON output (ignored for JSON Lines).
- --check
-
Run a single collection, evaluate thresholds, print a compact status, and exit with a Nagios-compatible exit code (0=OK, 1=WARN, 2=CRIT).
- --warn EXPR
-
Warning threshold expression such as
mem.used_pct80>. Can be repeated. Automatically enables--check. - --crit EXPR
-
Critical threshold expression such as
mem.used_pct90>. Can be repeated. Automatically enables--check. - --help
-
Show this help message.
AUTHOR
Shingo Kawamura <kawamurashingo@cpan.org>
COPYRIGHT AND LICENSE
MIT License. See the LICENSE file bundled with this distribution.