New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Custom advanced sensor for Exchange Powershell

Votes:

0

Your Vote:

Up

Down

I am trying to make a custom advanced sensor to monitor MS Exchange status, however, the xml seems cannot be regonized by PRTG server.

I created 2 testing scripts, both of them got valid output on Windows Powershell. But PRTG server could not regonize the script 1 with error messgae

"Error reading response: Invalid XML (XML Parser mismatch: Wanted </<<<>, got </prtg>)"

Here is my testing ps scripts

1) With Exchange powershell imported

$session = new-pssession -ConfigurationName "Microsoft.Exchange" -ConnectionUri "http://TESTEXCH01/Powershell" -Authentication Kerberos
import-pssession -Session $session -AllowClobber -DisableNameChecking | out-null

Write-Host "<prtg>"
Write-Host "<result>"
Write-Host "<channel>Test Channel</channel>"
Write-Host "<value>0</value>"
Write-Host "</result>"
Write-Host "</prtg>"

remove-pssession -Session $session

2) Without Exchange powershell imported

Write-Host "<prtg>"
Write-Host "<result>"
Write-Host "<channel>Test Channel</channel>"
Write-Host "<value>0</value>"
Write-Host "</result>"
Write-Host "</prtg>"

Can anymore help please?

custom-sensor exchange-powershell prtg

Created on Oct 22, 2013 6:59:03 AM by  raysonwong (0) 1

Last change on Oct 22, 2013 2:04:28 PM by  Greg Campion [Paessler Support]



3 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Have you checked that the Powershell (x86) is allowed to run Remote Signed scripts?

Also please check that the sensor type you are using is EXE/Script Advanced and that the files are in the Custom Sensors\EXEXML folder.

Lastly, with this script you will need to run the sensor with the credentials of the parent device and use Domain Admin credentials for this.

Created on Oct 22, 2013 2:10:29 PM by  Greg Campion [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks Greg, you are right, it works either I add -Credentials $credentials in the session or changing to "Use Windows credentials of parent device". Thank you so much!!!!

Created on Oct 23, 2013 2:10:27 AM by  raysonwong (0) 1



Votes:

0

Your Vote:

Up

Down

Glad to help :)

Created on Oct 23, 2013 10:34:03 AM by  Greg Campion [Paessler Support]



Please log in or register to enter your reply.


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.