Repository navigation
Releases
Releases · diemsouza/sosmonitor
v0.4.0
Added
- Reboot alert. The first check after the server restarts sends an alert (
"metric": "reboot", threshold 0) saying it started and how long it has been up. It reuses the normal delivery path and retries on the next check if every channel fails. The first run after installing or updating only records the boot, so it never alerts falsely. Linux compares the kernelboot_id; macOS and Windows comparepsutil.boot_time()with a 120 s tolerance, so NTP or sleep adjustments don't trigger it. Withoutpsutilthere it does nothing. - Uptime metric on every check (
metrics.uptime:seconds,boot_time,boot_id), in the webhook payload, the log, the email and the console (UPTIME 3d 4h 12m). It has no threshold, like the load average.
Changed
- Breaking: the webhook's
top_processesis now a flat array with ametricon each item, instead of an object with acpuand amemorylist. Same rules: only when that metric alerts, never for disk. The email and console text is unchanged. - The README is shorter: the situational details moved to a FAQ at the end.
sosmonitor_state.jsongains abootkey. Older state files load as before.
Fixed
- Nothing.
Config changes: new key reboot_message (default "{server} restarted (up for {value})"); missing from your config, the default is used. Webhook contract change: if your workflow reads top_processes.cpu or top_processes.memory, change it to filter the top_processes array by metric == "cpu" (or "memory").
v0.3.2
Changed
- The install docs now lead with the package install (
pipx), with the single-filecurlas the option for hosts where nothing can be installed. - Documented
pipx ensurepath: without it thesosmonitorcommand is installed but the shell can't find it. - Documented that
pip install sosmonitoris refused by the system Python on Debian, Ubuntu, Fedora and most current server images (PEP 668), and what to use instead.
Fixed
installnow recognizes a package install (pip, pipx, uv) even before its folder is on yourPATH, so it no longer tries to create its own link on top of the command that install provides. It marks the stepalreadyand tells you how to make the command reachable.- Commands printed under "Next:" are now always runnable as shown: the short
sosmonitorname only when the shell can already find it, a full path otherwise.
Config changes: none.
v0.3.1
Added
installanduninstallend with a summary of each step (Config,Command,Schedule;Cron entry,Command,PATH block) and its status:created,ok,already,manualorfailed. It is followed by the next actions that apply.- On macOS, when
crontabis blocked ("Operation not permitted"), the summary explains how to give your terminal Full Disk Access and to runinstallagain.
Changed
installruns every step even if one fails, so a crontab error no longer hides the config and the command that were set up. Exit code: 0 when everything is done, already done, or needs a manual action (a host withoutcrontabnow exits 0 after printing the line for your panel); non-zero only when a step failed.installrun again does not touch what already exists: no duplicate cron line, no new link, no rewritten config.uninstallreports each step the same way.
Fixed
installcrashed with a traceback whencrontabrefused to write (for example macOS without Full Disk Access), after having printed "Config created".- "No crontab yet" and "permission denied" were treated as the same thing when reading the crontab.
Config changes: none.
v0.2.0
Added
sustain_checks(default1): a metric must stay at or above a level for N consecutive checks before the alert is sent. Recovery is never delayed.top_processes(default on,count3): when CPU or memory alerts, the email and message list the top consumers (command names only, never arguments). Also sent astop_processesin the webhook payload. Disk is not supported.
Changed
- CPU is now the average over the whole time since the previous check (from cumulative counters saved in the state file), not a 1-second sample taken right when cron fires. It now matches what your host panel shows. Without a previous sample (first run, reboot) it falls back to a 1-second sample once.
- Runs are faster: the 1-second wait is gone from the normal path.
- The alert title names only the most severe alert (highest level, then highest value) plus
(+N more). The body lists every alert, then the top processes, then the current metrics on one line. The email andmessage_title/message_bodyuse the same text. - The state file now keeps
levels,pendingandcpu_sample. Old state files are read as-is and migrated silently. The CPU sample is saved on every run, even when delivery fails; alert levels still only advance after a successful delivery, so a failed alert is retried.
Fixed
- False CPU alerts: the 1-second sample landed on the minutes when other scheduled jobs start (every 5 minutes), reading far above the real load.
Config changes: new optional keys sustain_checks and top_processes, both defaulted. Nothing to edit in an existing config. Cron and the sosmonitor command are unchanged, so there is no need to run install again.
v0.1.0
Added
- CPU, memory, disk and load average checks, with
psutilwhen installed and/procotherwise. - Threshold alerts by webhook and/or SMTP email, one alert per level change, with a 5-point margin before a level drops.
- Commands:
run,test,install,uninstalland--version. installschedules the check in crontab and creates thesosmonitorcommand on Linux/macOS.
Changed
- None.
Fixed
- None.
Config changes: none (first version).