New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.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


How to monitor a HTTP server while ignoring DNS

Votes:

0

Your Vote:

Up

Down

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 by  Dag A. Ruud (0) 1 1



5 Replies

Accepted Answer

Votes:

5

Your Vote:

Up

Down

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 by  PRTG Tools Family [prtgtoolsfamily.com] (12,885) 3 4

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



Votes:

0

Your Vote:

Up

Down

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 by  Dag A. Ruud (0) 1 1



Votes:

5

Your Vote:

Up

Down

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 by  PRTG Tools Family [prtgtoolsfamily.com] (12,885) 3 4



Votes:

0

Your Vote:

Up

Down

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 by  Dag A. Ruud (0) 1 1



Votes:

0

Your Vote:

Up

Down

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 by  TimWeber501 (0)



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.