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

XML schema error

Votes:

0

I'm trying to get XML Custom EXE sensor to work in PRTG.

I want a sensor to grab data from a webpage and display the results in PRTG. We have created an EXE in c# that authenticates the webpage and grabs the data and returns it in XML, memory only, no file written. However I keep getting the error:

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

Our output:

<prtg>
  <result>
   <channel>Type</channel>
    <value>Service</value>
  </result>
  <result>
    <channel>Unit</channel>
    <value>PH</value>
  </result>
  <result>
    <channel>Label</channel>
    <value></value>
  </result>
  <result>
    <channel>Slot</channel>
    <value>A</value>
  </result>
  <result>
    <channel>HW Version</channel>
    <value>3.62</value>
  </result>
  <result>
    <channel>Serial Number</channel>
    <value>030362002110</value>
  </result>
  <result>
    <channel>Downlink RF Power (dBm)</channel>
    <value>-37.1</value>
  </result>
  <result>
    <channel>Alarm Count</channel>
    <value>0</value>
  </result>
  <result>
    <channel>Alarms</channel>
    <value>None</value>
  </result>
  <result>
    <channel>Max input power (dBm)</channel>
    <value>4</value>
  </result>
  <result>
    <channel>Module State</channel>
    <value>Open</value>
  </result>
  <result>
    <channel>Uplink Gain (dB)</channel>
    <value>1</value>
  </result>
  <result>
    <channel>Downlink Gain (dB)</channel>
    <value>-5</value>
  </result>
</prtg>

Any ideas what we are missing in this output?

Thanks for the assistance.

custom-xml-sensor sensor xml

Created on Nov 10, 2015 5:25:13 PM

Last change on Sep 22, 2021 9:31:02 AM by  Luciano Lingnau [Paessler]



6 Replies

Votes:

0

Hi,
in the sensor Settings please activate the option "Write Result to Disk". What results do you get there?

Created on Nov 11, 2015 9:04:40 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Channels can only hold an integer or float value. Text values like below are not allowed!

  <result>
   <channel>Type</channel>
    <value>Service</value>
  </result>

Created on Nov 11, 2015 6:31:49 PM



Votes:

0

Ok, here is our updated output and now we are getting a Response not well formed

<?xml version="1.0" encoding="UTF-8" ?>
<prtg>
  <result>
   <channel>1</channel>
   <text>Type</text>
   <text>Service</text>
  </result>
  <result>
   <channel>2</channel>
   <text>Unit</text>
   <text>PH</text>
  </result>
  <result>
   <channel>3</channel>
   <text>Label</text>
  </result>
  <result>
   <channel>4</channel>
   <text>Slot</text>
   <text>A</text>
  </result>
  <result>
   <channel>5</channel>
   <text>HW Version</text>
   <value>3.62</value>
  </result>
  <result>
   <channel>6</channel>
   <text>Serial Number</text>
   <value>030362002110</value>
  </result>
  <result>
   <channel>7</channel>
   <text>Downlink RF Power (dBm)</text>
   <value>-37.1</value>
  </result>
  <result>
   <channel>8</channel>
   <text>Alarm Count</text>
   <value>0</value>
  </result>
  <result>
   <channel>9</channel>
   <text>Alarms</text>
   <text>None</text>
  </result>
  <result>
   <channel>10</channel>
   <text>Max input power (dBm)</text>
   <value>4</value>
  </result>
  <result>
   <channel>11</channel>
   <text>Module State</text>
   <text>Open</text>
  </result>
  <result>
   <channel>12</channel>
   <text>Uplink Gain (dB)</text>
   <value>1</value>
  </result>
  <result>
   <channel>13</channel>
   <text>Downlink Gain (dB)</text>
   <value>-5</value>
  </result>
</prtg>

Created on Nov 13, 2015 3:44:20 PM

Last change on Nov 16, 2015 7:14:44 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Hi,
please make sure in your xml the following tags are present only once per <result>:

<result>
   <channel>CHANNEL NAME</channel>
   <value>NUMERICAL VALUE</value>
  </result>

the <text> tag has to be outside of any result tab but within the <prtg> tag.

Created on Nov 16, 2015 2:57:30 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

Hi,

Ok we got it working. Now an issue is that some information we are displaying has a negative value (-37.5) this displays as zero (0). Where as another value -5 displays correctly.

Suggestions?

Created on Nov 16, 2015 8:33:22 PM



Votes:

0

Hi,
in the <result> tag you are returning the -37,5 please add <float>1</float>. Then it should show correctly.

Created on Nov 17, 2015 7:22:48 AM by  Konstantin Wolff [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.