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

Which HTTP status code leads to which HTTP sensor status?

Votes:

0

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 Mar 14, 2024 1:50:33 PM by  Yasodhara Das [Paessler Support]



8 Replies

Accepted Answer

Votes:

1

This article applies as of PRTG 22

How an HTTP sensor reacts to HTTP status codes

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

By default, the sensor status 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 the 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 Mar 14, 2024 1:50:16 PM by  Yasodhara Das [Paessler Support]



Votes:

0

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



Votes:

0

@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

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



Votes:

0

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

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



Votes:

0

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



Votes:

0

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]




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.