Skip to content

v1.2.0

Latest

Choose a tag to compare

@LarsLaskowski LarsLaskowski released this 14 Nov 15:46
· 2 commits to main since this release
e18de99

What's Changed

This release makes PiMonitor more honest about missing readings: a failed or not-yet-available CPU or memory reading no longer shows up as a 0, in the history, the alerts or Prometheus. It also adds Pi-hole v6 support, shows the host name in the dashboard and tightens configuration validation, webhook logging and the content security policy.

Features

  • Detect Pi-hole v6 and report available Pi-hole updates (#185)
  • Show the host name in the dashboard header, the tab title and the System card (#227); switch it off with the new option hostname_enabled (default true)

Bug fixes

  • Skip /proc/stat CPU lines with fewer than eight counters (#234)
  • Fail CPU collection when /proc/stat has no aggregate cpu line (#242)
  • Count the first CPU sample after start as no reading: no history point, no alert evaluation, no warning (#245, #209)
  • Treat an incomplete /proc/meminfo as a failed reading (#253)
  • Fail the memory read on out-of-range /proc/meminfo content instead of reporting a negative used percentage (#254)
  • Leave CPU, memory and swap out of the Prometheus endpoint while there is no reading (#247, #250)
  • Record no history point for a failed reading and flush the history on shutdown (#210)
  • Do not let a delivered "cleared" event count against the webhook rate limit (#212)
  • Return empty arrays instead of null from GET /api/v1/alerts when alerts are off (#240)
  • Log missing optional sources once and query GPU and PMIC temperature independently (#206)
  • Bound the vcgencmd output carried into parse-failure errors (#207)

Security fixes

  • Restrict base-uri, form-action and object-src in the content security policy (#186)
  • Redact webhook URLs in notifier log records (#230)

Other changes

  • Reject non-finite numbers and fractional values for integer config options (#237)
  • Name the real YAML keys in threshold validation errors (#239)
  • Fsync the history directory after the atomic rename (#187)
  • Prune expired rate-limit entries in the webhook notifier (#188)
  • Document the ignored unparsable proxy value in webhook delivery (#232)
  • Lint cognitive complexity in test files too (#214)
  • Pin the GoReleaser version in the release workflow (#190)

Upgrading

Re-run install.sh from this release: it replaces the binary and the systemd units and keeps your /etc/pimonitor/config.yaml. The units changed only in comments, so replacing just the binary also works this time. New option: hostname_enabled (see packaging/pimonitor.example.yaml).

  • A configuration that used a fractional value for an integer option, or a non-finite number (.inf, .nan), is now rejected at start. Fix the value before upgrading.
  • GET /metrics now omits the CPU, memory and swap families while there is no reading, instead of exporting 0. Dashboards and alert rules on Prometheus should treat the series as absent for a short time after start.
  • The v1 JSON of /api/v1/metrics is unchanged; it still reports 0 for a missing CPU reading.
  • GET /api/v1/alerts returns [] instead of null when alerts are off.