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 do I list OID Names along with their associated OnNotificationAction Triggers

Votes:

0

So I'm trying to pull a list of Group Names with their corresponding notification triggers using PRTGAPI, Get-Sensor | Get-Trigger gives me ObjectId & OnNotificationAction but I am struggling to find a way to list the object name instead of the OID. This is probably an easy fix but I have to admit I'm a dunce when it comes to scripting and the closest I've gotten is something like this

Get-Sensor | Get-Trigger | select * | Format-Table -AutoSize -Wrap | Export-Csv -Path 'C:\Users\austin\Desktop\prtg.csv'

Any help you can give would be greatly appreciated!

prtgapi scripting trigger

Created on Apr 11, 2022 5:29:08 PM



1 Reply

Votes:

0

Hello Austin,

According to the documentation, the Get-Sensor Object holds the property name. This property is getting lost while piping two "Get-X" in a row here.

So it will be cumbersome to put this in a PS one liner. So you need to get the names from the first get command and the triggers from the second one and then aggregate them for the table output.

Hope this helps you to continue the task. Please bear with us that we cannot provide a final version of such specific queries regarding customizations in our Tech Support.

Best regards,
Felix

Created on Apr 13, 2022 6:52:28 AM by  Felix Saure [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.