This article applies to PRTG Network Monitor 14.1.8 or later
Sizeable Device Icon Using Specific Sensors Only for Background Status in PRTG Maps
If you use a Sizeable Icon on Status Related Background in a Map for a device or group, then the status of this object will show a cumulated status of all sensors underneath, e.g., of all sensors on this device. It is not possible to filter the status of this map object only for specific sensors by default.
Known Issues and Limitations
- This custom map-object is incompatible with public maps
- This guide consists of customizing PRTG via custom HTML code and is not not officially supported
Use Libraries in Maps
In order to show a map icon of a device (or group) which only considers specific sensors underneath, you can add a custom map object to your PRTG installation. This map object makes use of a PRTG Library with the Sunburst view and shows the status background of a device or group related to defined sensors.
Following the guide in this article, you will get a map (object) like this:
Sunburst View of a Library
Steps to Go
1. Preparing Library and Custom Map Object
- Tag all sensors which you want to keep together for a device/group icon status, e.g., use the tags “vms” for one and "hosts" for another bulk of sensors.
- Create a new library: Select Libraries | Add Library from PRTG’s main menu bar and give it an expressive name.
- Add a new group to the library and name it, e.g., “Server Components”.
- Add a new library node to this group and name it, e.g., “VMs”.
- Select a linked object, e.g., Root.
- Choose Show a collection of (filtered) sensors in the library.
- Choose Show objects with specific tags only.
- Select the desired tag, i.e., the one which you have used for the desired sensors (e.g., "vms").
- Add a new library node to the ("Server Components") group and name it, e.g., “Hosts”.
- Select a linked object, e.g., Root.
- Choose Show a collection of (filtered) sensors in the library.
- Choose Show objects with specific tags only.
- Select the desired tag, i.e., the one which you have used for the desired sensors (e.g., "hosts").
- Create a custom map object with the following code:
For Version 17.4.35 and newer
<!--Custom Map Objects: Library Sunburst ID in HTMLbefore-->
<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>" var="libid">
<style>#<@itemid> .libTree{height: 100%!important;}</style>
<div id="showalibrary" style="width:100%;height:100%;">
<div id="libTree" class="libTree prtg-plugin"
data-plugin="libtree"
data-objectid=" <#mapobject type="htmlbefore" subid="<@subid>">"
data-lib-name='Library'
data-view-type="sunburst">
<!--
{"objects":<#table
id="@libid"
varexpand="id"
output="json"
count="*"
subcheck="1"
noraw="1"
content="library"
sortby="probegroupdevice"
filter_basetype="@ntxt('sensor')"
columns="objid,name,access=treejson,probegroupdevice=treejson,basetype,icon,favorite,fold,devicenum=textraw,groupnum=textraw,totalsens=textraw,upsens=textraw,downsens=textraw,partialdownsens=textraw,warnsens=textraw,pausedsens=textraw,unusualsens=textraw,undefinedsens=textraw,downacksens=textraw,condition,status=textraw,message=textraw,info,priority,libkind,liblinkedid">
}
-->
<div id="viewport"></div>
</div>
</div>
<#mapobject type="htmlafter" subid="<@subid>">
</div>
For older versions, please use:
<!--Custom Map Objects: Library Sunburst add ID in HTMLbefore-->
<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>" var="libid">
<div id="showalibrary" style="width:100%;height:100%;">
<style>#<@itemid> .libTree{height: auto !important}</style>
<div id="libTree" class="libTree prtg-plugin"
data-plugin="libtree"
data-objectid=" <#mapobject type="htmlbefore" subid="<@subid>">"
data-lib-name='Library'
data-view-type="sunburst">
<!--
{"objects":<#table
id="@libid"
varexpand="id"
output="json"
count="*"
subcheck="1"
noraw="1"
content="library"
sortby="probegroupdevice"
filter_basetype="@ntxt('sensor')"
columns="objid,name,access=treejson,probegroupdevice=treejson,basetype,icon,favorite,fold,devicenum=textraw,groupnum=textraw,totalsens=textraw,upsens=textraw,downsens=textraw,partialdownsens=textraw,warnsens=textraw,pausedsens=textraw,unusualsens=textraw,undefinedsens=textraw,downacksens=textraw,condition,status=textraw,message=textraw,info,priority,libkind,liblinkedid">
}
-->
<div id="viewport"></div>
</div>
</div>
<#mapobject type="htmlafter" subid="<@subid>">
</div>
2. Creating the Map
- Create a new map or use an existing one and open the Map Designer.
- Add the newly created custom map object Library Sunburst add ID in HTMLbefore to your map: On the right side under Properties, select the entry Custom Map Objects and choose your new object.
- Select this object, the sunburst, in the main window of the Map Designer.
- Under Properties on the right side, click on HTML.
- Add the ID of your library to the HTML Before field (single integer without ”#”, e.g. 3456). You can find the ID in the library's page header bar.
- Click on Save.
Finished! Now you will see immediately on your map which component exactly causes an error status of an overall group and consider only the desired sensors for this.
Add comment