Hi there

Is it possible to bulk edit the notification settings on a device/sensor itself (so no changes are made to the actual notification template).

Essentially the process I am trying to achieve is;

1. Disable "Inherit All Triggers from parent objects and use the triggers defined above" 2. Enable "Only use the riggers defined above" 3. Create new State Trigger where

  • When sensor state is Down for at least 900 Seconds perform [NOTIFICATION TEMPLATE]
  • When sensor leaves down state after a notification was triggered, perform [NOTIFICATION TEMPLATE]

I would need to be able to "Select" a group of devices with "XXXXX" in the Device name first; which I believe is achieveable via the API.

Is this possible?

Kind regards Andy


Article Comments

Hi Andrewbeds,

You can do this fairly easily via PrtgAPI using PowerShell

You can modify whether Notification Triggers are inherited from the parent object by toggling the value of the InheritTriggers property

Get-Device *xxxxx* | Set-ObjectProperty InheritTriggers $false

To create a new Notification Trigger, use the New-Trigger cmdlet.

C:\> Get-Device *xxxxx* | New-Trigger -Type State -State Down -Latency 900 -OnNotificationAction "Ticket Notification" -OffNotificationAction "*push notification to admin*"

Type      ObjectId SubId Inherited ParentId Latency Condition Threshold Unit       OnNotificationAction
----      -------- ----- --------- -------- ------- --------- --------- ----       --------------------
State     2055     6     False     2055     900     Equals    Down                 Ticket Notification

For more information on using PrtgAPI, please see the wiki

Regards,

lordmilko


May, 2019 - Permalink

Schön wäre aber auch eine Lösung innerhalb PRTGs. Die Frage/der Wunsch kam wohl schon von vielen Usern


Jan, 2021 - Permalink