< Back

Get-NotificationTrigger

Sun Jan 19, 2020 5:41 pm

NAME Get-NotificationTrigger



SYNOPSIS

Retrieves notification triggers from a PRTG Server.





SYNTAX

Get-NotificationTrigger -Object <SensorOrDeviceOrGroupOrProbe> -Types <SwitchParameter> [<CommonParameters>]



Get-NotificationTrigger [[-OnNotificationAction] <NameOrObject`1[]>] -Object <SensorOrDeviceOrGroupOrProbe>

[-Channel <object[]>] [-Condition {Above | Below | Equals | NotEquals | Change}] [-EscalationLatency <int[]>]

[-EscalationNotificationAction <NameOrObject`1[]>] [-Inherited <bool>] [-Latency <int[]>] [-OffNotificationAction

<NameOrObject`1[]>] [-ParentId <int[]>] [-Period {Hour | Day | Week | Month}] [-RepeatInterval <int[]>] [-State

{Down | Warning | Unusual | DownPartial | Up | Unknown}] [-SubId <int[]>] [-Threshold <double[]>] [-Type {State |

Speed | Volume | Threshold | Change}] [-UnitSize {Bit | Kbit | Mbit | Gbit | Tbit | Byte | KByte | MByte | GByte |

TByte}] [-UnitTime {Second | Minute | Hour | Day}] [<CommonParameters>]



Get-NotificationTrigger -ObjectId <int> -Types <SwitchParameter> [<CommonParameters>]



Get-NotificationTrigger [[-OnNotificationAction] <NameOrObject`1[]>] -ObjectId <int> [-Channel <object[]>]

[-Condition {Above | Below | Equals | NotEquals | Change}] [-EscalationLatency <int[]>]

[-EscalationNotificationAction <NameOrObject`1[]>] [-Inherited <bool>] [-Latency <int[]>] [-OffNotificationAction

<NameOrObject`1[]>] [-ParentId <int[]>] [-Period {Hour | Day | Week | Month}] [-RepeatInterval <int[]>] [-State

{Down | Warning | Unusual | DownPartial | Up | Unknown}] [-SubId <int[]>] [-Threshold <double[]>] [-Type {State |

Speed | Volume | Threshold | Change}] [-UnitSize {Bit | Kbit | Mbit | Gbit | Tbit | Byte | KByte | MByte | GByte |

TByte}] [-UnitTime {Second | Minute | Hour | Day}] [<CommonParameters>]





DESCRIPTION

The Get-NotificationTrigger cmdlet retrieves notification triggers that are defined on a PRTG Object as well as

the types of triggers an object supports. Notification triggers define conditions that when met by a sensor or one

of its channels, should result in the firing of a notification action. When notification triggers are defined on a

device, group, or probe, the triggers are inherited by all nodes under the object. Individual objects can choose

to block inheritance of notification triggers, preventing those triggers from trickling down.



When looking at notification triggers defined on a single object, Get-NotificationTrigger can be invoked with no

arguments. When looking at notification triggers across multiple objects, it is often useful to filter out

notification triggers inherited from a parent object via the -Inherited parameter.



NotificationTrigger objects returned from Get-NotificationTrigger can be passed to Set-TriggerProperty or

New-TriggerParameters, to allow cloning or editing the trigger's properties.



Notification trigger types that are supported by a specified object can be determined using the -Types parameter.

While there is no restriction on the types of triggers assignable to container-like objects (including devices,

groups and probes) each sensor can only be assigned specific types based on the types of channels it contains.

When adding a new trigger, Add-NotificationTrigger will automatically validate whether the specified

TriggerParameters are assignable to the target object. If the new trigger's type is incompatible with the target

object, PrtgAPI will throw an exception alerting you to this error.





PARAMETERS

-Object <SensorOrDeviceOrGroupOrProbe>

The object to retrieve notification triggers for.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-ObjectId <int>

The ID of the object to retrieve notification triggers for.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-OnNotificationAction <NameOrObject`1[]>

Filter the response to objects with a certain OnNotificationAction. Can include wildcards.



Required? false

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OffNotificationAction <NameOrObject`1[]>

Filter the response to objects with a certain OffNotificationAction. Can include wildcards.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EscalationNotificationAction <NameOrObject`1[]>

Filter the response to objects with a certain EscalationNotificationAction. Can include wildcards.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Type <TriggerType[]>

Filter the response to objects of a certain type.



Possible values: State, Speed, Volume, Threshold, Change



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SubId <int[]>

Filter the reponse to objects with a specified SubId.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Id <int[]>

Filter the reponse to objects with a specified SubId.



This is an alias of the SubId parameter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ParentId <int[]>

Filter the reponse to objects with a specified ParentId.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Channel <object[]>

Filter the reponse to objects with a specified Channel. Can refer to an object capable of being used as the

source of a TriggerChannel or a wildcard indicating the name of the channel.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Types <SwitchParameter>

List all notification trigger types compatible with the specified object.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Inherited <bool>

Indicates whether to include inherited triggers in the response.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-State <TriggerSensorState[]>

Possible values: Down, Warning, Unusual, DownPartial, Up, Unknown



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Latency <int[]>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EscalationLatency <int[]>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RepeatInterval <int[]>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Period <TriggerPeriod[]>

Possible values: Hour, Day, Week, Month



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UnitSize <DataUnit[]>

Possible values: Bit, Kbit, Mbit, Gbit, Tbit, Byte, KByte, MByte, GByte, TByte



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Condition <TriggerCondition[]>

Possible values: Above, Below, Equals, NotEquals, Change



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Threshold <double[]>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UnitTime <TimeUnit[]>

Possible values: Second, Minute, Hour, Day



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

PrtgAPI.SensorOrDeviceOrGroupOrProbe

The object to retrieve notification triggers for.





OUTPUTS

PrtgAPI.NotificationTrigger





---------- EXAMPLE 1 ----------



C:\\> Get-Probe | Get-NotificationTrigger



Get all notification triggers defined on all probes



---------- EXAMPLE 2 ----------



C:\\> Get-Device | Get-NotificationTrigger *pager* -Inherited $false



Get all notification triggers from all devices whose OnNotificationAction action name contains "pager" in the name

and are not inherited from any parent objects.



---------- EXAMPLE 3 ----------



C:\\> Get-Probe -Id 2001 | Get-NotificationTrigger -Type State



Get all State notification triggers from the sensor with ID 2001



---------- EXAMPLE 4 ----------



C:\\> Get-Sensor -Id 1001 | Get-NotificationTrigger -Types



Get all notification trigger types supported by the object with ID 1001.



RELATED LINKS

Online version: https://github.com/lordmilko/PrtgAPI/wi ... gers#get-1

Get-Sensor

Get-Device

Get-Group

Get-Probe

Add-NotificationTrigger

New-NotificationTriggerParameters

Set-NotificationTrigger

Set-NotificationTriggerProperty





Name : Get-TriggerTypes

Category : Alias

Synopsis : Get-NotificationTriggerTypes

Component :

Role :

Functionality :