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

Is there a DTD XML schema definition for the <prtg> XML used in advanced custom sensors?

Votes:

0

I wish to add schema validation to the automated tests for my advanced (XML-returning) custom sensors, so I can check it returns valid XML before deploying it live. Do you maintain a DTD for the XML described here: https://rahqb-prtg.re-assured.net/help/custom_sensors.htm#advanced_elements, so I can use a validator to check it?

Ideally I should be able to fetch the current DTD for a specified version of PRTG, so I can check it against the version we are using and against new version of PRTG before we upgrade. However, just a link to the latest DTD would be OK.

custom-sensor dtd xml

Created on Aug 3, 2019 4:16:30 PM

Last change on Aug 6, 2019 11:50:23 AM by  Enrico



4 Replies

Votes:

0

Hi there,

The Link appears to be not valid. Can you please re-add a proper one for further analysis.

Best regards,
Sebastian

Created on Aug 6, 2019 4:44:40 AM by  Sebastian Kniege [Paessler Support]



Votes:

0

I can't edit the question - it give Internal Server Error. The URL in the manual is: https://www.paessler.com/manuals/prtg/custom_sensors#advanced_sensors

Created on Aug 6, 2019 10:54:17 AM



Votes:

0

Ok, thank you very much for the clarification. No, we don't maintain DTD but a regular XML validation checker that you can find online, like the one from w3schools will be sufficient.

Best regards,
Sebastian

Created on Aug 6, 2019 11:44:44 AM by  Sebastian Kniege [Paessler Support]



Votes:

0

I have the same question/problem: The description for "advanced custom sensors" leaves very much unclear. To me it seems having a DTD shows that there was some design behind the structure.

See also http://usingxml.com/Basics/XmlValidation

With "just XML" you can build arbitrary trees of data, but that does not help much. I used XSLT to transform my intermediate XML to that probably needed or "digestable" by PRTG, but I have no idea whether it is correct or not. Of course I have a DTD for my own data, and I can verify the XML conforms to the DTD.

Even more: the docs on advanced sensors suggest both: There is one result element with multiple channels, or there are multiple result elements with one channel each. With a DTD it would be clear whether one, the other, or both are correct.

With a background from Nagios monitoring plugins I must say that the documentation available for those is not only much better, but it's also much easier to implement.

Let me also make a comparison: Back in the early 80-ies (when SGML already existed) the syntax of BASIC (that was nor very regular, BTW) was described with text and examples. In contrast Pascal has "syntax diagrams" (somehow equivalent to a DTD); it was much easier to decide, what is invalid and what is allowed than with the description for basic.

You can put punch card data in an XML envelope, but it's still old punch card data. To me it seems the power of XML is not being used at all; XML at that level is just equivalent to using nested balanced parentheses.

so instead of `<a>x<b>y</b></a>` you could write `(a "x" (b` "y"))` without loosing any information. "Welcome back to LIPS!" I'm tempted to say.

Long story short: Try to be professional: Provide a DTD for your expected XML input, or if it turns out to be impossible with the current structure, fix the XML structure!

Created on Feb 17, 2023 8:24:40 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.