New Features
- Sensors can now be created from scratch. For sensor types supported by PrtgAPI, a sensor parameters type can be used to specify all the settings that will be used for the sensor, with PrtgAPI validating that all required fields have values. For sensor types currently unsupported by PrtgAPI, facilities are provided for constructing a set of custom parameters, optionally including full levels of type safety
- PRTG event logs can now be retrieved from any object. If no object is specified, PrtgAPI automatically retrieves logs for today from the root node. Logs can be retrieved from a specific time frame, with a specific status, and can also be limited so that only a certain number of logs are retrieved
New Methods
- C#:
AddSensor
: Create a new sensor from a set of sensor parameters - C#:
GetLogs
: Retrieve event logs for a PRTG object - C#:
GetSensorTypes
: List all sensor types supported by PRTG - C#:
GetStatus
: retrieve the status, configuration and version info of a PRTG Server
New Cmdlets
Add-Sensor
: create a new sensor from a set of sensor parametersNew-SensorParameters
: create a new set of sensor parameters of a specified typeGet-SensorFactorySource
: retrieve the source sensors or channels of a Sensor Factory sensorGet-ObjectLog
: retrieve event logs for a PRTG object (or if no object is specified, for the whole server)Get-PrtgStatus
: retrieve the status, configuration and version info of a PRTG Server
Improvements
- PS:
Move-Object
,Set-ObjectPosition
,Simulate-ErrorStatus
,Sort-PrtgObject
andStart-AutoDiscovery
now support-WhatIf
- PS:
Clone-Sensor
,Clone-Group
andClone-Device
now only make 4 retries when the new object can't be resolved instead of 5 - PS: Implemented
Get-ObjectSetting
alias forGet-ObjectProperty
- PS: Cmdlets that perform streaming now only calculate the total number of objects needed to retrieve once instead of twice
ExeName
of EXE/XML sensors can now be retrieved and modifiedInheritTriggers
property of objects can now be modified- If PrtgAPI detects more than 20,000 objects will need to be streamed, PrtgAPI will instead stream objects "serially" (500 items at a time)
- If PrtgAPI fails to deserialize an enum value due to it posessessing a value unknown to PrtgAPI, an exception will now be thrown describing the value that was missing
Bugfixes
- C#: Fixed a bug in
GetObjectTotals
wherein totals for probe objects would not be properly calculated - C#: Fixed a bug wherein
AddNotificationTriggersAsync
andSetNotificationTriggersAsync
were validating arguments with a synchronous method instead of an async one - PS:
Edit-NotificationTriggerProperty
now throws an an exception when the specified property does not exist on the target trigger parameter type - PS: Fixed an issue wherein
New-SearchFilter
would not work when specifying enum properties whose values require serialization SetObjectProperty
now properly validates values for numeric types- Fixed a bug wherein
PrtgUrl
construction would crash when an array of zeroSearchFilter
objects is specified - Fixed a bug wherein
NotificationTypes
property of sensors, devices, groups and probes did not properly report when sensors aren't inherited - Fixed a bug wherein PrtgAPI would crash attempting to parse a webpage containing an empty dropdown list
- Fixed an issue wherein progress would fail when performing variable progress on a chain containing Action -> Action or Action -> Object -> Action
- Fixed incorrect
XmlEnum
values forAccess.None
andAccess.Inherited
types
Breaking Changes
- C#: Renamed
SensorParameters.StatusFilter
toSensorParameters.Status
- PS: Renamed
New-NotificationTriggerParameter
toNew-NotificationTriggerParameters
- Renamed
NotificationTypes.TriggerInheritance
toNotificationTypes.InheritTriggers
SearchFilter
objects now prevent specifyingnull
as a value. If you wish to specify no value, specify an empty string- Moved
Comments
property from base typeObjectTable
to more derived typeSensorOrDeviceOrGroupOrProbe
- Moved property
Status
fromSensorOrDeviceOrGroupOrProbeOrMessageOrTicket
to more derived typeSensorOrDeviceOrGroupOrProbe