github lordmilko/PrtgAPI v0.9.1
PrtgAPI 0.9.1

latest releases: v0.9.19, v0.9.18, v0.9.17...
6 years ago

New Features

  • All asynchronous PrtgClient methods now support specifying a CancellationToken. Methods that contain optional parameters now contain a CancellationToken as their final optional parameter. Asynchronous methods that do not take optional parameters now have an overload that takes a CancellationToken
  • Implemented support for specifying a CancellationToken on synchronous PrtgClient methods accepting an IParameters 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 device
  • PrtgClient.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 on CancellationToken wait handles
  • Added new TotalTriggers property on NotificationTypes. Unlike other NotificationTypes 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 generic PrtgObject
  • New-SensorFactoryDefinition -Name parameter now allows specifying a string or script block
  • New-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 and NotificationTrigger objects deserializing empty string values to string.Empty instead of null
  • 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 type PSObject (#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 type ServiceControllerStatus to new type WmiServiceStatus

Don't miss a new PrtgAPI release

NewReleases is sending notifications on new releases.