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

PRTG API returns HTML instead of plain text in XML output

Votes:

0

I try this:

lynx -source "http://myprtgserver/api/getobjectstatus.htm?id=2779&name=totalsens&show=text&username=myuser&password=mypassword" 

and the result is:

<?xml version="1.0" encoding="UTF-8" ?>
<prtg>
<version>8.1.1.1695</version>
<result>13</result>
</prtg>

but if I use upsens instead of totalsens the answer is:

<?xml version="1.0" encoding="UTF-8" ?>
<prtg>
<version>8.1.1.1695</version>
<result><a  title="SQL Nodo A: 12x Up"  href="sensors.htm?id=2779&filter_status=2&filter_status=3"><div class="sensg">12</div></a></result>
</prtg>

and I cannot parse the output of the "result" tag, because it's HTML and not an integer value.

api bug prtg

Created on Nov 3, 2010 4:05:05 PM

Last change on Nov 4, 2010 10:24:56 AM by  Daniel Zobel [Product Manager]



2 Replies

Accepted Answer

Votes:

0

Hello,

the problem is most likely the 'show=text' in the URL. For one reason, that doesn't exist, and also it over-writes the 'show=textraw' from the template (which is actually what you want to get). So please try the URL without 'show=text' and then it should work.

Best Regards.

Created on Nov 4, 2010 1:26:35 PM by  Torsten Lindner [Paessler Support]



Votes:

0

The solution provided by Torsten Lindner works.

Thank you.

Created on Nov 4, 2010 2:01:05 PM




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.