PrtgAPI 0.8.0

C#/PowerShell interface for PRTG Network Monitor

There is a newer version of this package available.
See the version list below for details.
Install-Package PrtgAPI -Version 0.8.0
dotnet add package PrtgAPI --version 0.8.0
<PackageReference Include="PrtgAPI" Version="0.8.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PrtgAPI --version 0.8.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

New Features

General

  • Sensor Targets used for creating new sensors including EXE/Advanced Script files, WMI Services and Microsoft SQLv2 database queries can now be resolved from PRTG. Sensor Targets resolved from one object can then be passed assigned to sensor parameter objects and assigned to any device within PRTG.
  • Implemented support for retrieving all raw properties (settings) of an object. In C#, these are returned as a dictionary, whereas in PowerShell these are returned as a PSObject

New Methods

  • PrtgClient.AddDevice: create a new device from a set of device parameters
  • PrtgClient.AddGroup:: create a new group from a set of group parameters
  • PrtgClient.Targets.GetExeXmlFiles: list all files under the Custom Sensors\EXEXML folder of a device's PRTG Probe
  • PrtgClient.GetObjectPropertiesRaw: Retrieves all raw properties defined on an object
  • PrtgClient.GetObjectProperty: Retrieves a property from a PRTG object as an object of its true type
  • PrtgClient.GetObjectProperty{T}: Retrieves a property from a PRTG object cast to its true type
  • PrtgClient.Targets.GetWmiServices: list all WMI Services installed on the target device
  • PrtgClient.Targets.GetSqlServerQueries: list all files under the Custom Sensors\sql\mssql folder of a device's PRTG Probe

Improvements

General

  • Improved deserialization performance by 100%
  • PrtgAPI will now throw much more informative exception messages when failing to deserialize enum members
  • RestartCore / RestartProbe (C#) and RestartPrtgCore / RestartProbe (PowerShell) now support waiting for the specified targets to restart before completing. C# methods provide a progress callback to allow monitoring or aborting the wait request
  • Implemented support for creating WMI Service sensors
  • PrtgAPI will now automatically resolve any DescriptionAttribute defined on an enum used in a set of custom request parameters
  • If an IEnumerable is assigned to a SearchFilter, PrtgAPI will now iterate over the collection constructing a filter for each item
  • Increased default maximum number of items returned by ContentParameters from 50,000 to unlimited
  • ContainerSettings and SensorSettings ToString now returns the object's Name

Object Properties

  • Implemented support for retrieving and modifying Hostv4, Hostv6, ServiceUrl, AutoDiscoveryMode, AutoDiscoverySchedule and Comments
  • Implemented Host property alias for Hostv4
  • Implemented support for modifying and retrieving Microsoft SQL v2 sensor properties
  • Implemented support for retrieving a device's IPVersion. IPVersion is automatically updated upon setting Hostv4 or Hostv6
  • Implemented support for modifying all password related fields. Settings objects now contain Has- properties (HasWindowsPassword, HasLinuxPassword, etc) to indicate whether these values have explicitly been set on the target object
  • Implemented support for specifying a SortDirection on TableParameters
  • Methods that support streaming (and do not do any filtering) now take an optional argument specifying whether the request should be executed serially

Bugfixes

General

  • PrtgAPI will now validate the response returned from PRTG when attempting to resolve an address for use with ObjectProperty.Location
  • Fixed a bug wherein RenameObject did not rename probes properly
  • Fixed Parameter.SortBy not working due to a missing ParameterTypeAttribute

Breaking Changes

  • Renamed ExeName object property to ExeFile on both enum ObjectProperty and ExeXmlSensorParameters
  • Split settings property SSHElevationUser into SSHElevationSuUser and SSHElevationSudoUser properties
  • Changed SensorSettings.DependentObjectId from string to int?
  • Moved Priority property to base NewSensorParameters class. NewSensorParameters constructor now requires a Priority be specified, with RawSensorParameters including Priority as an optional argument. If Priority is not specified to RawSensorParameters, a default priority of Three will be used

New Features

General

  • Sensor Targets used for creating new sensors including EXE/Advanced Script files, WMI Services and Microsoft SQLv2 database queries can now be resolved from PRTG. Sensor Targets resolved from one object can then be passed assigned to sensor parameter objects and assigned to any device within PRTG.
  • Implemented support for retrieving all raw properties (settings) of an object. In C#, these are returned as a dictionary, whereas in PowerShell these are returned as a PSObject

New Methods

  • PrtgClient.AddDevice: create a new device from a set of device parameters
  • PrtgClient.AddGroup:: create a new group from a set of group parameters
  • PrtgClient.Targets.GetExeXmlFiles: list all files under the Custom Sensors\EXEXML folder of a device's PRTG Probe
  • PrtgClient.GetObjectPropertiesRaw: Retrieves all raw properties defined on an object
  • PrtgClient.GetObjectProperty: Retrieves a property from a PRTG object as an object of its true type
  • PrtgClient.GetObjectProperty{T}: Retrieves a property from a PRTG object cast to its true type
  • PrtgClient.Targets.GetWmiServices: list all WMI Services installed on the target device
  • PrtgClient.Targets.GetSqlServerQueries: list all files under the Custom Sensors\sql\mssql folder of a device's PRTG Probe

Improvements

General

  • Improved deserialization performance by 100%
  • PrtgAPI will now throw much more informative exception messages when failing to deserialize enum members
  • RestartCore / RestartProbe (C#) and RestartPrtgCore / RestartProbe (PowerShell) now support waiting for the specified targets to restart before completing. C# methods provide a progress callback to allow monitoring or aborting the wait request
  • Implemented support for creating WMI Service sensors
  • PrtgAPI will now automatically resolve any DescriptionAttribute defined on an enum used in a set of custom request parameters
  • If an IEnumerable is assigned to a SearchFilter, PrtgAPI will now iterate over the collection constructing a filter for each item
  • Increased default maximum number of items returned by ContentParameters from 50,000 to unlimited
  • ContainerSettings and SensorSettings ToString now returns the object's Name

Object Properties

  • Implemented support for retrieving and modifying Hostv4, Hostv6, ServiceUrl, AutoDiscoveryMode, AutoDiscoverySchedule and Comments
  • Implemented Host property alias for Hostv4
  • Implemented support for modifying and retrieving Microsoft SQL v2 sensor properties
  • Implemented support for retrieving a device's IPVersion. IPVersion is automatically updated upon setting Hostv4 or Hostv6
  • Implemented support for modifying all password related fields. Settings objects now contain Has- properties (HasWindowsPassword, HasLinuxPassword, etc) to indicate whether these values have explicitly been set on the target object
  • Implemented support for specifying a SortDirection on TableParameters
  • Methods that support streaming (and do not do any filtering) now take an optional argument specifying whether the request should be executed serially

Bugfixes

General

  • PrtgAPI will now validate the response returned from PRTG when attempting to resolve an address for use with ObjectProperty.Location
  • Fixed a bug wherein RenameObject did not rename probes properly
  • Fixed Parameter.SortBy not working due to a missing ParameterTypeAttribute

Breaking Changes

  • Renamed ExeName object property to ExeFile on both enum ObjectProperty and ExeXmlSensorParameters
  • Split settings property SSHElevationUser into SSHElevationSuUser and SSHElevationSudoUser properties
  • Changed SensorSettings.DependentObjectId from string to int?
  • Moved Priority property to base NewSensorParameters class. NewSensorParameters constructor now requires a Priority be specified, with RawSensorParameters including Priority as an optional argument. If Priority is not specified to RawSensorParameters, a default priority of Three will be used

Release Notes

-PrtgAPI 0.8.0

---

PrtgAPI is a C#/PowerShell library that abstracts away the complexity of interfacing with the PRTG HTTP API.

PrtgAPI implements a collection of methods and enumerations that help create and execute the varying HTTP GET requests required to interface with PRTG. All responses from PRTG are automatically deserialized by PrtgAPI.

Operations supported by PrtgAPI include enumerating channels, sensors, devices, groups and probes, modifying channel and sensor properties, creating and editing notification triggers, pausing, unpausing and acknowledging objects, renaming and removing items, and more.

PrtgAPI includes full XML Documentation and supports synchronous, asynchronous and "streaming" request modes.

This module can be installed in both Visual Studio and PowerShell via the Install-Package cmdlet. For PowerShell users, this module is also available on the PowerShell Gallery.

For more information and usage examples, please see the Project Site.

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.9.12 221 2/13/2020
0.9.11 166 12/9/2019
0.9.10 79 12/5/2019
0.9.9 193 9/26/2019
0.9.8 235 8/19/2019
0.9.7 520 5/8/2019
0.9.6 176 4/3/2019
0.9.5 364 1/13/2019
0.9.4 316 1/3/2019
0.9.3 187 11/20/2018
0.9.2 172 11/1/2018
0.9.1 224 10/3/2018
0.9.0 215 8/27/2018
0.8.6 377 5/4/2018
0.8.5 362 4/23/2018
0.8.4 240 4/23/2018
0.8.3 339 4/2/2018
0.8.2 300 3/30/2018
0.8.1 345 3/11/2018
0.8.0 439 2/23/2018
0.7.3 495 11/20/2017
0.7.2 767 11/13/2017
0.7.1 646 10/15/2017
0.7.0 607 10/6/2017
0.6.10 369 8/2/2017
0.6.9 320 4/24/2017
0.6.8 314 4/19/2017
0.6.7 342 4/11/2017
0.6.6 305 4/10/2017
0.6.5 298 4/10/2017
0.6.4 291 3/25/2017
0.6.3 355 3/22/2017
0.6.2 305 3/19/2017
0.6.1 604 3/8/2017
Show less