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 to monitor a HTTP server while ignoring DNS

Votes:

0

I need to monitor how a webserver responds to a "GET /test" request using a specific host header value.

I'm pretty sure I've already used this before, but now I can't for the life of me find out how to do it with either the HTTP Sensor, HTTP Advanced, or HTTP Full Web Page.

My device is created with a specific IP address 10.230.50.50 which is the IP I want to monitor.

The hostname I need to ask about is foo.bar.com which in DNS points to 10.230.40.40, but I don't want to have anything to do with that IP address.

I've tried all of the sensors and the only way I can get the PRTG probe to connect to 10.230.50.50 instead of 10.230.40.40 is by using "http://10.230.50.50" in the URL field, but of course then I can't monitor the correct site since "10.230.50.50" is used as a host header. The "Custom header" field doesn't accept "host" headers so I can't specify it there either.

I'm tcpdumping the traffic on the PRTG probe to verify if the request is sent to 40.40 or 50.50.

So how are anyone able to monitor HTTP on loadbalancer nodes, reverse proxies etc with PRTG?

header host http sensor

Created on Jun 2, 2015 1:22:29 PM



7 Replies

Accepted Answer

Votes:

5

Have you considered adding an extra entry to the 'hosts' file on your PRTG Server?

Navigate to the c:\windows\system32\drivers\etc folder on your PRTG Server and locate the 'hosts' file.

Open this file in notepad and add an extra line like the one below:

10.230.50.50    foo.bar.com

After saving this file, your PRTG server will use 10.230.50.50 when connecting to foo.bar.com

Created on Jun 3, 2015 7:23:53 AM

Last change on Jun 3, 2015 7:38:12 AM by  Luciano Lingnau [Paessler]



Votes:

0

Thanks. That will work for 1 server, but in compelx web environments you typically have multiple servers with various IPs serving the same web page in different stages.

So how do you monitor the same web page (ie. the same Host header) on 10 different IP addresses?

Installing PRTG probes on 10 different servers is not an option.

Created on Jun 3, 2015 7:48:02 AM



Votes:

5

You might want to have a look at the HTTPFailoverSite Custom Sensor.

This sensor checks a HTTP site on a IP that is not in your DNS. You can run multiple instances of this sensor, each with its own IP setting checking the same domain name.

Parameters:

-i= The IP address and optional protocol of your failover webserver. 
-d= The domain name of your website. 
-t= Optional, the title of the page that is returned (the page's html <title> tag). 
    Using the -t= parameter provides an extra check that your provider is returning the correct page. 

Created on Jun 3, 2015 8:14:14 AM



Votes:

0

Thanks, that sensor seems to work. The downside is that I no longer can use the features of the HTTP Full or HTTP Advanced sensors in the way I'm used to, with regards to SSL settings etc.

I almost can't believe that PRTG has no way of simply changing the host header. Seems to me that there is a bug that causes the hostname in the "URL" field of the sensor to override the Address of the device which it is supposed to monitor.

Since the address of the device turns out to have no consequence for the monitoring done by the HTTP sensor, there is no point to adding a HTTP sensor to a specific device at all except to get inheritance of scanning interval etc, is there?

At least with a TCP Port sensor, it connects to the IP address of the device to which the sensor is added. Why is this functionality removed for HTTP sensors?

Created on Jun 3, 2015 9:13:05 AM



Votes:

0

I have to agree. PRTG should allow adding the host header. It would make monitoring webfarms much easier.

Created on Aug 26, 2016 4:45:39 PM



Votes:

0

I have the same need (put a custom host header to check an HTTP server running in a farm behind a load balancer, so if I want to check each node using its own IP address but an specific FQDN to point to the right virtual host, it's imperative to customize the HTTP host header) Any change on PRTG ablity to do that? (7 years later)

Created on Sep 15, 2023 1:38:48 PM



Votes:

0

This is now solved, probably many years ago. The Advanced HTTP sensor, at least, supports overriding the SNI header from the parent device and this also overrides the "Host: " header.

Created on Sep 19, 2023 9:02:43 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.