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 to return the result without the prtg version info

Votes:

0

I'm trying to use PRTG map to display a ticket number from our ticketing system. I have configured a custom EXE/script sensor that returns xml for the existence of a high priority ticket and turn to warning when it matches. This work well. What I am trying to do is get the ticket number so I can display it on the map. For this i have been able to get the PRTG url for this as

"https://xxx/api/getobjectstatus.htm?id=51923&name=lastvalue&show=text"

This returns "14.3.10.2422+ 1,512,348 #" But what I am trying to filter is the PRTG version info at the start "14.3.10.2422+" so that all i get is "1,512,348 #"

What can I add to the url code to remove this? or if this isn't possible what would the html code be to remove the version component?

The custom html come I'm using to display this is: <iframe src="https://xxx/api/getobjectstatus.htm?id=51923&amp;name=lastvalue&amp;show=text" name="iframe_a">

api exe-script-sensor prtg

Created on Sep 2, 2014 11:59:04 PM



1 Reply

Accepted Answer

Votes:

0

Dear Martin

Please go to the PRTG installation folder, subfolder webroot\api. Please create a copy of the file "getobjectstatus.htm". For example, name the copy "getobjectstatuscustom.htm".

Please open this file and delete this line:

<version><#system type="version"></version>

The final file content now should look like this:

<?xml version="1.0" encoding="UTF-8" ?>
<prtg>
<result><#objectstatus show="textraw"></result>
</prtg>
<#checkobjecttype objecttype="sensor,group,device,probenode">

Please save this file. As the directory requires administrator credentials, the editor will probably ask you to save the file elsewhere. Please manually copy it back to the webroot\api subfolder.

The API call now is

/api/getobjectstatuscustom.htm?id=51923&name=lastvalue&show=text

Created on Sep 3, 2014 3:13:41 PM by  Arne Seifert [Paessler Support]

Last change on Sep 3, 2014 3:14:32 PM by  Arne Seifert [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.