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

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

Which sensor can help with HTTP?

Votes:

0

Your Vote:

Up

Down

Hello!

I have task: Login into HTTPS web portal, open selected page on it, found line on those page and find the Value, then i need to set this Value in Sensor status. Which of standard sensor can help me with this?

Thank you!

http prtg sensor

Created on Oct 28, 2018 9:14:01 AM by  Vasiliy (48) 1



8 Replies

Votes:

0

Your Vote:

Up

Down

The following might be helpful:
https://gist.github.com/stephanlinke/a145cae16c147e5cab0bed22e47bbf1b

Please make sure to read our Guide for PowerShell based custom Sensors :)


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

Kind regards,
Stephan Linke, Tech Support Team

Created on Oct 29, 2018 8:41:41 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello!

When i import this script in PRTG into "Custom EXE/Script Sensor" i had following error:

Response not well-formed: "(Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configura tion is not complete. Specify the UseBasicParsing parameter and try again. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1: 30 char:15 + $loginPage = (Invoke-WebRequest -Uri "$url" -SessionVariable PRTG) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupp ortedException + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.Po werShell.Commands.InvokeWebRequestCommand Cannot index into a null array. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1: 34 char:1 + $LoginForm = $loginPage.Forms[$formId]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1: 35 char:1 + $LoginForm.Fields[$usernameId] = $username; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1: 36 char:1 + $LoginForm.Fields[$passwordId] = $password; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1: 37 char:1 + $LoginForm.Fields['body_0_content_0_sectioned_0_SignInButton'] = "Sig ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configura tion is not complete. Specify the UseBasicParsing parameter and try again. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1: 39 char:12 + $result = (Invoke-WebRequest -Uri ($url) -WebSession $PRTG -Method PO ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupp ortedException + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.Po werShell.Commands.InvokeWebRequestCommand You cannot call a method on a null-valued expression. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1: 41 char:4 + if($result.Content.Contains($checkString)) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull )" (code: PE132)

What's wrong?

Created on Nov 27, 2018 12:49:35 PM by  Vasiliy (48) 1

Last change on Nov 27, 2018 1:02:04 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Please go through the following:
https://mkcheah88.blogspot.com/2014/06/microsoft-how-to-disable-internet.html

Invoke-WebRequest is using the IE DCOM object, which is blocked when the user hasn't started IE at least once, completing the wizard.


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

Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 27, 2018 1:05:33 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Yep, this done, but stays the following error:

Response not well-formed: "(0:Login successful - 'Overview' found. Invoke-WebRequest : Invalid URI: The hostname could not be parsed. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\WebLogin.ps1:45 char:5 + Invoke-WebRequest -Uri $logout -SessionVariable PRTG | Out-Null; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], UriFormatException + FullyQualifiedErrorId : System.UriFormatException,Microsoft.PowerShell.Commands.InvokeWebRe questCommand )" (code: PE132)

Created on Nov 27, 2018 1:17:34 PM by  Vasiliy (48) 1



Votes:

0

Your Vote:

Up

Down

Hi Vasiliy,

Any chance you can post your current script? I am confused by the error you post - there seems to be a command LOGOUT URI / URL that is having an issue.. but I would like to see what you have so far first... not sure if I can help you with it - but it sounds interesting enough to try.

Regards

Florian Rossmark

www.it-admins.com

Created on Nov 27, 2018 3:00:25 PM by  Florian Rossmark (4,369) 4 2



Votes:

0

Your Vote:

Up

Down

Perhaps the logout URL is wrongly configured/formatted - let's see what Vasiliy says :)


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

Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 27, 2018 7:18:51 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Yep, it's empty now, but actually i tried any url with no success and have no idea what must be there, no any description i found. :-(

Created on Nov 27, 2018 7:59:00 PM by  Vasiliy (48) 1



Votes:

0

Your Vote:

Up

Down

The logout URL must be something like http://my-site/logout - i.e. the URL that is called when you click the logout button on the page. Otherwise, the session might persist throughout the calls and you're just checking the string, not the login functionality.


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

Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 27, 2018 8:38:25 PM by  Stephan Linke [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.