New Features
- All asynchronous
PrtgClient
methods now support specifying aCancellationToken
. Methods that contain optional parameters now contain aCancellationToken
as their final optional parameter. Asynchronous methods that do not take optional parameters now have an overload that takes aCancellationToken
- Implemented support for specifying a
CancellationToken
on synchronousPrtgClient
methods accepting anIParameters
object as well as methods that can take a long time to complete (such as adding+resolving objects, querying sensor targets, etc) - Logs can now be continuously streamed from a PRTG Server. PrtgAPI will poll according to a specified interval and will continue to do so as long as is requested
- Implemented support for retrieving device system information, including hardware, software, process, service and user info. Not all devices may support providing system information. For more information, see the wiki
New Methods
PrtgClient.GetSystemInfo
: Retrieve system information for a specified devicePrtgClient.WatchLogs
: Continuously retrieves new object logs
New Cmdlets
Get-SystemInfo
: Retrieve system information from a specified device. If no-Type
is specified, all information types will be retrieved
Improvements
General
- Replaced all instances of
Thread.Sleep
/Task.Delay
with waits onCancellationToken
wait handles - Added new
TotalTriggers
property onNotificationTypes
. Unlike otherNotificationTypes
properties, works irrespective of PRTG server language
C#
- Removed dependency on
Microsoft.PowerShell.Commands.Utility
- Removed dependency on
System.ServiceProcess
- Removed dependency on
System.Web
- Fixed several inconsistencies in
PrtgClient
XmlDocs
PowerShell
- All cmdlets now specify a
CancellationToken
as part of all API requests and now always cancel immediately upon pressing Ctrl+C Get-ObjectLog
now supports continuously retrieving new logs for a specified object via new-Wait
parameter. Polls according to a specified-Interval
Remove-Object
/Rename-Object
now support operating on a genericPrtgObject
New-SensorFactoryDefinition
-Name
parameter now allows specifying a string or script blockNew-SensorFactoryDefinition
now supports specifying a-Value
. Allows manually creating channel definitions, including generating horizontal lines- Improved GoPrtg error handling when header and footer are missing while function the GoPrtg function is still present
Bugfixes
General
- Fixed an issue wherein PrtgAPI would fail to retrieve WMI Service sensor targets when any service was in a pending state
- Fixed
RestartCore
/RestartProbe
methods/cmdlets not waiting properly when PRTG server is in a different timezone to system running PrtgAPI - Fixed
NotificationTriggers.VolumeTriggers
property not working properly - Fixed
NotificationTriggers
not showing correct number of triggers when more than 9 triggers of a specified type exist on a given object - Fixed
ServerStatus
andNotificationTrigger
objects deserializing empty string values tostring.Empty
instead ofnull
- Fixed notification types not retrieving properly under some circumstances on non-English PRTG Servers
- Documented
GetObjectPropertyRaw
/Get-ObjectProperty
error handling behavior on non-English PRTG Servers - Fixed sensor history not throwing an appropriate exception on non-English PRTG Servers when no data can be returned
PowerShell
- Fixed an issue wherein
RawSensorParameters
/DynamicSensorParameters
did not properly unwrap arrays of typePSObject
(#35) - Fixed several cmdlets not showing proper type descriptions in progress messages when operating on objects of type
PrtgObject
Breaking Changes
General
- Changed
WmiServiceTarget.Status
from typeServiceControllerStatus
to new typeWmiServiceStatus