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

help with parameters for powershell script

Votes:

0

Hi,

i'm trying to create a custom powershell scripts to integrate with MS teams, and i am running into a problem where in i want to find out the following details

 [string]$sensor= 'Windows CPU Load',
    [int]$sensorid= '5518',
    [string]$status='prtg_status',
    [string]$message='prtg_message',
    [string]$device='test',
    [string]$since='prtg_since',
    [string]$lastup='prtg_lastup',
    [string]$sensorURL='prtg_sensorurl',
    [string]$deviceURL='prtg_deviceurl',
    [string]$serviceURL='service_url'

i want to monitor for example any service , in this case, the windows cpu load on the server "test".

i am not sure what to enter in the $message, $since and rest of the above code. where can i find the details?

microsoft-teams parameters powershell

Created on Jul 24, 2018 8:14:49 PM

Last change on Jul 25, 2018 11:25:36 AM by  Birk Guttmann [Paessler Support]



14 Replies

Votes:

0

Hello there,

Thanks for your inquiry, we appreciate your contact regarding this matter!

Since a few versions MS Teams is integrated in our notifications. Please open the settings of a notification and scroll down to "Send Microsoft Teams Message". You can configure the notification there.

Please do not hesitate to ask further questions.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Jul 25, 2018 11:31:46 AM by  Birk Guttmann [Paessler Support]



Votes:

0

Hi, i have added the notification and it is sending data to a teams channel but it is not displaying any parameters, just the name of the sensor and the device is correctly displayed, and rest like sensor status, since, device/service url do not show any data.

how do i correctly feed the data for those parameters?

Created on Jul 25, 2018 2:52:39 PM



Votes:

0

Hi,

Please let us know which placeholders you are using here.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Jul 26, 2018 2:14:20 PM by  Birk Guttmann [Paessler Support]



Votes:

0

Hi,

can you give me any examples of the placeholders that i should be using?

Created on Jul 31, 2018 5:51:16 PM



Votes:

0

Please see What placeholders can I use with PRTG? :)


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 1, 2018 7:55:45 AM by  Stephan Linke [Paessler Support]



Votes:

0

well i used the following placeholders but i am not getting a correct notification on MS teams.

Windows CPU Load on DC01 is in a %status state! Details Current State %status Message %message Since %since Last up %lastup Sensor prtg_sensorurl Device prtg_deviceurl Management URL %serviceurl

Created on Aug 2, 2018 9:37:22 PM



Votes:

0

That's strange, are you using that with a live notification or the notification test?


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 3, 2018 7:34:09 AM by  Stephan Linke [Paessler Support]



Votes:

0

yes, i'm using that with a live notification, basically want to integrate it with Microsoft Teams.

all the prerequesites were done properly and i can see the notification in the teams channel but there is no valid data like if the device is up or down, etc is displayed.

Created on Aug 3, 2018 1:41:13 PM



Votes:

0

I'll put this to the test and let you know if it worked properly. Please pear with us.


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 6, 2018 8:33:53 PM by  Stephan Linke [Paessler Support]



Votes:

0

This works actually with %sensor on %device is in a %status state! Details Current State %status Message %message Since %since Last up %lastup Sensor prtg_sensorurl Device prtg_deviceurl Management URL %serviceurl

Did you already try the custom content option? Latest version installed?


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 7, 2018 3:03:39 PM by  Stephan Linke [Paessler Support]



Votes:

0

Hi Stephan,

This is what results with that line you wrote last:

I tested simply with the initial parameters provided in the guide:

-sensor '%sensor' -sensorID '%sensorid' -status '%status' -message '%message' -since '%since' -lastup '%lastup' -device '%device' -sensorURL '%linksensor' -deviceURL '%linkdevice' -serviceURL '%serviceurl'

and I get the following result:

Created on Oct 10, 2018 11:51:51 AM



Votes:

0

Why not use the native MS Teams notifications? :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Oct 10, 2018 12:10:50 PM by  Stephan Linke [Paessler Support]



Votes:

0

Hi,

I am unsure where to locate this tbh. When accessing the Notifications, this is what I see https://i.imgur.com/ax7ZrwG.jpg

Created on Oct 10, 2018 12:45:29 PM



Votes:

0

You'll need to create a new notification via Setup | Account Settings | Notification Templates. The option is named Send Microsoft Teams Message. It will then be available as a notification trigger.


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Oct 10, 2018 12:48:28 PM by  Stephan Linke [Paessler Support]

Last change on Oct 10, 2018 12:48:48 PM by  Stephan Linke [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.