New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


How to get property value for custom map object

Votes:

0

Your Vote:

Up

Down

Hello!

I'm trying to create new custom map object for PRTG map in folder C:\Program Files (x86)\PRTG Network Monitor\webroot\mapobjects.

Now I have object like this:

<!--New Gauges: Radial gauge-->

<div class="map_object map_table <#sensor type="colorclassofstate" prefix="map_objectstate_" id="<@objectid>">" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="overflow:hidden;<#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>">">
<#mapobject type="objectgrip" mode="<@editmode>">
<#mapobject type="htmlbefore" subid="<@subid>">
<#checkobjecttype objecttype="sensor" nicemessage="true" id="<@objectid>">
<script src="http:////cdn.rawgit.com/Mikhus/canvas-gauges/gh-pages/download/latest/all/gauge.min.js"></script> 
<span>

<canvas data-type="radial-gauge"
    data-width="300"
    data-height="300"
	 data-title="<#objectproperty name="Name" id="<@objectid>">"
    data-units="<#objectproperty name="value" id="<@objectid>">"
    data-min-value="0"
    data-max-value="350"
	data-value='<#objectproperty name="primarychannel" show="number" id="<@objectid>">'
    data-highlights="[{&quot;from&quot;: 300, &quot;to&quot;: 350, &quot;color&quot;: &quot;rgba(200, 50, 50, .75)&quot;}]"
    data-color-plate="#fff"
    data-border-shadow-width="0"
    data-borders="false"
    data-needle-type="arrow"
    data-needle-width="2"
    data-needle-circle-size="7"
    data-needle-circle-outer="true"
    data-needle-circle-inner="false"
    data-animation-duration="1500"
    data-animation-rule="linear"
></canvas>
</span>
<#mapobject type="htmlafter" subid="<@subid>">		                       
</div>

But I don't understand where I can get objectproperty names? I can't find It in PRTG API docs. Now I can get only sensor Name value, I get It via this code:

<#objectproperty name="Name" id="<@objectid>">

How I can get this properties (for sersor) ?

  • Maximum error limit
  • Minimum error limit
  • Current sensor value
  • Unit

Thanks in advance!

api custom-object maps

Created on Sep 30, 2016 2:35:18 PM by  mercury131 (0) 1



5 Replies

Votes:

0

Your Vote:

Up

Down

I want to get values from primary channel sensor. Where primary channel values is :

  • Maximum error limit
  • Minimum error limit
  • Current sensor value
  • Unit

Now I found how to get last channel value - <#objectstatus name="lastvalue" id="<@objectid>">

But I don't understand how to get other values.

Created on Oct 3, 2016 9:44:40 AM by  mercury131 (0) 1



Votes:

0

Your Vote:

Up

Down

Hello,

Unfornutnalty auch a api call to receive the minimum and maximum erroor limit does not exist, sorry. The unit you are receiving with the lastvalue parameter aswell.

Created on Oct 3, 2016 12:20:36 PM by  Jochen Greger [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I can get maximum value via json API , like this:

<#table id="<@objectid>" output='json' noraw='1' infoheader="false" count='1' filter_channels='@ntxt('maximum')' subcheck="1" content='channels' columns='maximum'>

But I don't understand how to get only value, without other data

for example json data in my example will be {"prtg-version":"16.3.24.5302","treesize":0,"channels":[{"maximum":"260963 Mhz"}]}

I want to get only this value - 260963 but I dont understanl how to do it via PRTG

Created on Oct 3, 2016 12:27:12 PM by  mercury131 (0) 1



Votes:

0

Your Vote:

Up

Down

Can I use this json example in custom PRTG map element?

Created on Oct 3, 2016 3:18:36 PM by  mercury131 (0) 1



Votes:

0

Your Vote:

Up

Down

Hi mercury131,

You can use an XML/REST Value Sensor to retrieve this specific value and then put the sensor on the map. See the linked description for the sensor on how to configure the sensor so that it pulls the required value.

Kind regards,

Erhard

Created on Oct 3, 2016 6:33:41 PM by  Erhard Mikulik [Paessler Support]



Please log in or register to enter your reply.


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.