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

EXE/Script Advanced Sensor

Votes:

0

We have a POST request set up which returns data in xml format when using postman. The POST request sends a fake transaction via an API and returns the data below. We would like to monitor the api using this POST request and alert if an unexpected error is returned. I have tried all sorts of native sensors and custom sensors but cannot get the sensor to work as expected. The XML response we get is pasted below. (i have xxxx out some data that is sensitive). When we use this response in PRTG we get an error stating:

"The returned XML does not match the expected schema. (code: PE233)"

Any help would really be appreciated. We are using a powershell script to send the request and when we keep the response in PRTG and take a look at the sensor log the exact data below is in the log.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <InitiateTransactionResponse xmlns="http://XXXXXXXXXXXXXXXXXXXX">
            <InitiateTransactionResult>
                <FXRate>0</FXRate>
                <PassThrough/>
                <Errors>
                    <string>Initiate failed: XXXXXXXXXXXXXXX</string>
                </Errors>
                <Error>Initiate failed: XXXXXXXXXXXXXXXX</Error>
            </InitiateTransactionResult>
        </InitiateTransactionResponse>
    </s:Body>
</s:Envelope>

custom-sensor powershell xml

Created on Jan 25, 2018 1:33:58 PM

Last change on Jan 26, 2018 8:32:39 AM by  Luciano Lingnau [Paessler]



1 Reply

Votes:

0

Dear Aaron,

PRTG expects a particular syntax for the XML results, which is documented on the
Setup > PRTG API > Custom Sensors page. The results need to look like that:

  <prtg>
            <result>
            <channel>First channel</channel>
            <value>10</value>
            </result>
            <result>
            <channel>Second channel</channel>
            <value>20</value>
            </result>
            </prtg>

Best regards, Felix

Created on Jan 26, 2018 2:36:20 PM by  Felix Saure [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.