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

Why does my HTTP XML/REST Value sensor return a 404 error?

Votes:

1

I set up an HTTP XML/REST Value sensor to monitor a REST/JSON value. When the sensor runs, it returns the following error: Protocol Error: The remote server returned an error. (404) Not Found. The error code is code: PE023.

I tested the URL of the probe system in a browser and it works fine. It requires authentication, but I have set this up as well. The URL has the following format: http://www.example.com:55672/api/queues/%2F/mydata_plus This works fine on the system that the probe is running on, but it does not work through PRTG. Is there something in the URL that causes this issue?

404 dotnet error-messages http-sensor http-xml pe023 prtg special-characters url

Created on Jan 22, 2013 4:04:53 PM by  Gerald Schoch [Paessler Support]

Last change on Jan 4, 2023 10:03:01 AM by  Brandy Greger [Paessler Support]



2 Replies

Accepted Answer

Votes:

1

This article applies as of PRTG 22

Fixing 404 errors of the HTTP XML/REST Value sensor

The HTTP XML/REST Value sensor returns an error when the URL contains specific URL encoded characters. In the case of the question above, the character sequence %2F is the reason for this issue. Sometimes, the HTTP XML/REST Value sensor (based on .NET) encodes such a sequence again, which results in a broken URL.

Solution

The solution for this issue is to create a new configuration file. This file will force the PRTG .NET XMLValue.exe file to interpret special characters correctly. As a result, the URL is kept encoded.

PRTG runs the XMLValue.exe file with every scan. If a corresponding configuration file is available, the instructions in this file will be considered while running XMLValue.exe. Therefore, we can use a configuration file to fix this problem.

Steps to go

  1. Open a new text editor.
  2. Copy the following text into the editor:

    <?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> <uri> <schemeSettings> <clear/> <add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/> </schemeSettings> </uri> </configuration>
  3. Save the text file under the name XMLValue.exe.config.
  4. Save this file to the Sensor System subfolder of the PRTG program directory. PRTG is now able to grab the correct value.

Created on Jan 22, 2013 4:11:23 PM by  Gerald Schoch [Paessler Support]

Last change on Jan 3, 2023 8:18:44 AM by  Brandy Greger [Paessler Support]



Votes:

0

It worked for me. Many thanks, Phuc

Created on Jun 16, 2020 6:57:50 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.