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
- Open a new text editor.
- 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>
- Save the text file under the name XMLValue.exe.config.
- Save this file to the Sensor System subfolder of the PRTG program directory.
PRTG is now able to grab the correct value.
Add comment