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


Which HTTP status code leads to which HTTP sensor status?

Votes:

0

Your Vote:

Up

Down

I use some of the Web Server (HTTP) sensors of PRTG. I am not sure if I have to configure the sensors to show a certain sensor status when receiving a certain HTTP status code. Is there a rule for that?

http http-sensor prtg sensor-status status

Created on Aug 11, 2015 8:23:04 AM by  Martina Wittmann [Paessler Support]

Last change on Jul 15, 2019 12:45:29 PM by  Maike Behnsen [Paessler Support]



8 Replies

Accepted Answer

Votes:

1

Your Vote:

Up

Down

This article applies to PRTG Network Monitor 19 and later

How a PRTG HTTP Sensor Reacts to HTTP Status Codes

HTTP sensors show their status depending on the HTTP status codes that they receive.

By default, the sensor states are the following:

HTTP status codeHTTP sensor status
2xx SuccessUp (green)
Note: Except for status code 200, the REST Custom sensor defines all other 2xx states as a Down status.
3xx RedirectionWarning (yellow); Down (red) for too many redirects
4xx Client ErrorDown (red)
5xx Server ErrorDown (red)

You need to manually configure your HTTP sensors only if you want to change these default reactions. In this case, you can change the sensor status based on limits and/or keyword checks.

If you are looking for an alternative where you can adjust the behavior to "accept" a specific HTTP code (for example, green sensor on HTTP 403), you will need to use a Custom sensor.

More

Created on Aug 11, 2015 8:26:13 AM by  Martina Wittmann [Paessler Support]

Last change on Jul 15, 2019 12:51:04 PM by  Maike Behnsen [Paessler Support]



Votes:

0

Your Vote:

Up

Down

For several checks, I don't want to a 3xx redirect to mean Warning or Down. How do you override these sensor-state/status-code relationships?

Created on Jun 29, 2016 4:26:31 PM by  dcsgpvan (0) 1



Votes:

0

Your Vote:

Up

Down

@dcsgpvan: Overriding these value/state pairing is not possible currently. However, you might have a look at this script which could probably be extended.
Best regards

Created on Jun 30, 2016 12:31:14 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi. We are evaluating PRTG and came across the same issue. This being an old thread - is it still valid?

We have a web service that will reply 403 to PRTG, as the request is not fully qualified with the right data for that service (changing that behaviour is not trivial as we will need to add special support to that code to use a specific header or something). I tried to use the "HTTP advanced" (and all other HTTP), hoping that if I use "dont alarm if text exists in reply" - it wont alarm. Yet it does, as it's 403.

All I wan't to know is that some service is listening/answering on "http://IP:port/". Is there another way?

Created on Aug 2, 2018 9:55:58 PM by  uris_adxg (10)



Votes:

0

Your Vote:

Up

Down

Hi there,

Unfortunately, a HTTP error will also always show an alert within PRTG. This is how the sensor is designed and intended for.

You can try adding a "Port Sensor" with the Port "443" and activated "Use Transport-Level Security (default)"-option.

Best regards.

Created on Aug 3, 2018 6:33:44 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

That worked (tho with the "Do not use Transport-Level Security (default)" - as this is HTTP on port 80 and not HTTPS on 443).

Thanks!

Created on Aug 3, 2018 2:16:50 PM by  uris_adxg (10)



Votes:

0

Your Vote:

Up

Down

I have a similar issue and am looking for a solution or consideration for sensor changes. I need a 401 to NOT return an error, I would rather have an http sensor that just monitors the returned status codes and only shows down if no status code was returned (server not there). for example in my situation a 401 is good, thats what i'm looking for a 5XX would be bad, or no response code would be bad.

Created on Apr 14, 2019 7:07:12 PM by  pir8radio (170) 2 1



Votes:

0

Your Vote:

Up

Down

Hi there,

There is a script which can check if a desired response code is returned and which shows Ok in case it is and an error in case it isn't.

  • 1. Save the following Script as "response_code.ps1" on the PRTG Core Server or Remote Probe under "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE": http://pastebin.com/X7VM23aH [pastebin.com]
  • 2. Create a new "EXE/Script" Sensor and choose "response_code.ps1" as the script.
  • 3. Use the following parameter and change them accordingly: -url "your-domain.com" -ResponseCode "403" -protocol "https"

For more information related to EXE/Script Sensors, visit the following website: https://www.paessler.com/manuals/prtg/exe_script_sensor [paessler.com]

Best regards.

Created on Apr 15, 2019 6:19:20 AM by  Dariusz Gorka [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.