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

HTTP sensor base on device IP



Need to monitor a pool of server using an unique URL like below but with different IP :

http://app.test.local/login.html []
http://app.test.local/login.html []
http://app.test.local/login.html []

the apache server need the host : app.test.local

A feature need to be added on the http sensor to say : based the IP connection on the device and not based on a lookup of the host in the URL

http https httpsensor

Created on Mar 1, 2019 7:50:26 AM

Last change on Mar 5, 2019 11:57:20 AM by  Torsten Lindner [Paessler Support]

2 Replies



Not sure if the Paessler support will transition this request to a proper Feature request - but in any case - I like the idea you have there and since I am not aware of a solution for it that might already exist, I did a quick research.

What would work is a PowerShell script - I see if I might have time to work on it.. or you can do it on your own..

What you need is this:


You will fire this command against the IP address, now, since the URL is part of the header of the web-request - specifically the HOST value in the HEADER.

You might run in to some resistance there - but I think there seems to be an interesting approach to bypass this here:


There rest is just developing it out..

I doubt a DNS request wold give you all possible IPs from this round-robin configuration, especially not external DNS servers. Therefor you would need to inject all the IPs and the single target URL to the script, but that can be done via parameters...

Let me know if you need help - I generally suggest to try it on your own to learn at the same time..

PS: the Paessler Support Team might have better ideas and know about existing solutions.


Florian Rossmark


Created on Mar 4, 2019 4:22:58 PM



The following is not yet the perfect script - but it might just work for you.

    [string] $DomainName = "",
    [string] $IP = "",
    [string] $KeyWord = " ",
    [int] $MinimumResponseSizeInByte = 1,
    [bool] $useHTTPS = $true
add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
        public bool CheckValidationResult(
            ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request, int certificateProblem) {
            return true;
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy

If ($useHTTPS -eq $true) { 
    $Prefix = "https://" 
} Else { 
    $Prefix = "http://" 

$IWRResponse = "";
$IWRError = 0;
$IWRErrorMessage = "";

$IWRResponse = Try {
    Invoke-WebRequest -Uri "$Prefix$IP" -Headers @{Host="$DomainName"} -ErrorAction Stop
} Catch {
    $IWRError = $_.Exception.GetHashCode()        
    If ($IWRError -eq 0) {
        $IWRError = 1 
    $IWRErrorMessage = $_.Exception.Message
Try {
    $IWRResponse = $IWRResponse.ToString()
} Catch {}

$KeyWordFound = 0
Try {
    If ($IWRResponse.Contains($KeyWord)) { 
        $KeyWordFound = 1 
} Catch {}

$ResponseSufficient = 0 
Try {
    If ($IWRResponse -gt $MinimumResponseSizeInByte) { 
        $ResponseSufficient = 1 
} Catch {}

$XML = "<prtg>
        <channel>Check result</channel>
        <channel>Keyword found</channel>
        <LimitErrorMsg>Keyword was not found in response</LimitErrorMsg>
        <channel>Response Length</channel>
        <value>" + $IWRResponse.Length + "</value>
        <channel>Reponse Length sufficient</channel>
        <LimitErrorMsg>Response size not sufficient</LimitErrorMsg>

Function WriteXmlToScreen ([xml]$xml) #just to make it clean XML code...
    $StringWriter = New-Object System.IO.StringWriter;
    $XmlWriter = New-Object System.Xml.XmlTextWriter $StringWriter;
    $XmlWriter.Formatting = "indented";
    Write-Output $StringWriter.ToString();

WriteXmlToScreen "$XML"

In you case the following parameters would possibly work

-DomainName "app.test.local" -IP "" -useHTTPs 0

If you add -Keyword "abcd" you can search for a keyword in the raw HTML response.

You could also engage the -MinimumResponseSizeInByt 999 parameter - while 999 bytes is just a guess of how much you should get back...

Let me know if it worked... of course you would need a sensor per target IP in this case - I did not develop it out to the extreme and the code could easily be optimized, just thought the idea of it is nice and it might be a start.


Florian Rossmark


Created on Mar 6, 2019 3:41:40 AM

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.