This article applies to PRTG Network Monitor 14.1.8 or later


Can I utilize libraries in PRTG Maps to display a 'Sizeable Icon on Status Related Background' for specific sensors on devices?


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 Library
Sunburst View of a Library


Steps to Go


1. Preparing Library and Custom Map Object

  1. 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.
  2. Create a new library: Select Libraries | Add Library from PRTG’s main menu bar and give it an expressive name.
  3. Add a new group to the library and name it, e.g., “Server Components”.
  4. Add a new library nodeto this group and name it, e.g., “VMs”.
    1. Select a linked object, e.g., Root.
    2. Choose Show a collection of (filtered) sensors in the library.
    3. Choose Show objects with specific tags only.
    4. Select the desired tag, i.e., the one which you have used for the desired sensors (e.g., "vms").
  5. Add a new library nodeto the ("Server Components") group and name it, e.g., “Hosts”.
    1. Select a linked object, e.g., Root.
    2. Choose Show a collection of (filtered) sensors in the library.
    3. Choose Show objects with specific tags only.
    4. Select the desired tag, i.e., the one which you have used for the desired sensors (e.g., "hosts").
  6. 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

  1. Create a new map or use an existing one and open the Map Designer.
  2. Add the newly created custom map objectLibrary 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.
  3. Select this object, the sunburst, in the main window of the Map Designer.
  4. Under Properties on the right side, click on HTML.
  5. 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.
  6. 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.


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.