What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

how to get (and then modify) all notification Threshold > 90 %

Votes:

0

Hi,

I am looking for a way to programmaticaly retrieve all Threshold notification that are set with a threshold of 90% to change the action from an email to SMS. Unfortunately we are using the same template for all our notification, making it impossible to edit it.

I found PRTGApi and started to play with it, but I cannot manage to retrieve notificationTrigger based on the threshold value. Does anybody know if it is possible to achieve ?

For instance, this is working :

PS C:\WINDOWS\system32>  Get-Sensor -Id 13307 | Get-NotificationTrigger

Type      ObjectId SubId Inherited ParentId Latency Condition Threshold Unit       OnNotificationAction
----      -------- ----- --------- -------- ------- --------- --------- ----       --------------------
Threshold 13307    3     False     13307    600     Above     90                   Email to all members of group ITS-PRTG-Admins
Threshold 13307    4     False     13307    600     Above     90                   Email to all members of group ITS-PRTG-Admins
Threshold 13307    1     False     13307    14400   Above     70                   Email to all members of group ITS-PRTG-Admins
Threshold 13307    2     False     13307    14400   Above     70                   Email to all members of group ITS-PRTG-Admins

But from there, I am stuck...
Thank you very much for your help,
Schlum

notification prtgapi threshold

Created on Oct 9, 2018 12:35:50 PM

Last change on Oct 10, 2018 1:27:26 PM by  Dariusz Gorka [Paessler Support]



1 Reply

Votes:

0

Hi there,

The following should work:

Get-Sensor -Id 13307 | Get-NotificationTrigger | Where-Object {$_.Type -like "Threshold" -and $_.Threshold -ge 90}

We tested this real quick for you. :)

Best regards.

Created on Oct 10, 2018 1:36:51 PM by  Dariusz Gorka [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.