Repository navigation
v1.4.2
Changed
Internal
Nothing here is observable from a sensor script: no cmdlet, parameter, default, output or
message text changed. The diff is large because files moved and one function became thirteen.
Scripts written for 1.0.0 and 1.1.0 keep running unchanged; there is nothing to migrate.
-
The private source is grouped by what each file serves: State, Storage, Secrets, Channel,
Output and Doctor, instead of one flat folder. The file holding the output document is now
named after it rather than after sensor state, which is a different concept in this module. -
Every Doctor script check is its own function, file and test. The thirteen checks lived
in one 281-line function. Each is now a private function named after its check code, the
runner is a plain list of calls, and a new test file pins the check code, severity and full
message text of every outcome. The messages are unchanged character for character, and a test
fails if a check is written but never registered. -
Six functions that were hiding inside files named after other functions have their own
files, among them the resolver that decides where each on-disk store lives. -
The Doctor's shared analysis is a parse context read through named private functions.
Five helpers that were script-block locals inside one function are now ordinary functions, so
a single check can be reached and stepped through on its own.
Fixed
-
A null output document now fails with a message that names the cause and the cmdlet.
AfterSet-PrtgOutput $null,Add-PrtgChannelfailed with "You cannot call a method on a
null-valued expression" andSet-PrtgMessagewith "The property 'text' cannot be found on
this object", neither naming the document or the cmdlet. Both now say which cmdlet failed,
that the output document is null, and how to recover. They fail at exactly the point they did
before:Set-PrtgOutputstill accepts$null,Get-PrtgMessagestill returns$null
silently andWrite-PrtgOutputstill emits without error, because failing earlier could turn a
green sensor red on upgrade. -
Clear-PrtgSensorState -ClearLock -Forcenow always warns when it cannot remove the lock
sidecar, not only inside anInvoke-PrtgSensorblock.Remove-Itemreports a failed delete
as a non-terminating error, so the warning fired only under theStoppreference that
Invoke-PrtgSensorsets; from a console or a maintenance script a raw
RemoveFileSystemItemIOErrorsurfaced instead, and setting$ErrorActionPreferencein the
calling script did not help because the cmdlet runs in the module's own session state. The
removal now requests a terminating error explicitly, so every call path reports the same
warning, which is the operator's only signal that the file is still held by a live run.