First let me begin by applauding PRTGs graph objects. The fact that I can remove all the text and resize them makes it possible to have total flexibility in where and how I embed them into dashboards and nobody else I've worked with offers such an adaptable graph style. A multi-graph that, for instance, pulled multiple interfaces into one graph would be a huge help as well, but I digress.

In keeping with that "clean and flexible" graph style, is there anyway to create a simple resizable circle that turns green/yellow/red?

Having an object like that would allow me to completely transform my dashboards and move beyond the subjective style of the current icon set by creating a map image and using the dynamic "dots" to represent status.

The closest things I can find is the "Status Only" status icons, but the little check mark isn't visable from a distance and isn't resizable. Also it has text that is confusing or irrelevant in some instances.

Thanks for reading.


Article Comments

Something like this?

<!--Custom Map Objects: StateCircle-->

<div class="map_object map_table map_icon_large" 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>">

  <#sensor type="colorclassofstate" id="<@objectid>" var="status">
  <#objectproperty type="nodename" id="<@objectid>" var="nodename">
  <#if value="@nodename" is="sensor" then="sensr" else="hasred" varexpand="value" var="containsred">
  <#if value="@nodename" is="sensor" then="sensy" else="hasyellow hasnored" varexpand="value" var="containsyellow">
  <#if value="@nodename" is="sensor" then="sensg" else="hasgreen hasnoyellow hasnored" varexpand="value" var="containsgreen">
  <svg xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="1.0"
  width="100%"
  height="100%"
  viewBox="0 0 100 280">
    <use xlink:href="#a" />
    <g class="trafficlight" transform="translate(0,0)">
      <use xlink:href="#a" />
      <circle style="<#if value="@status" contains="@containsred" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#E6005F" cx="50" cy="50" />
      <circle style="<#if value="@status" contains="@containsyellow" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#F59C00" cx="50" cy="50" />
      <circle style="<#if value="@status" contains="@containsgreen" then="" else="opacity:0" varexpand="value,contains">" r="40" fill="#C0CC19" cx="50" cy="50" />
    </g>
  </svg>
  <div style="position:relative;margin-top:-20px">
    <#mapobject type="htmlafter" subid="<@subid>">
  </div>
</div>

Simply save it in your

C:\Program Files (x86)\PRTG Network Monitor\webroot\mapobjects

...directory, restart your core server and it will show up under Custom Map Objects. Unfortunately, it doesn't work with paused and acknowledged states and I don't know why :) Gotta ask the web developer about it. Bear with me, I'll update this tomorrow :)


May, 2015 - Permalink

This is fantastic! Thanks!

I copied to the directory and re-started core. The object shows up and I can drag and assign, but no image actually appears yet.

Hopefully I'll have a few minutes later today to dig a little deeper and find out what's up.

This will be huge!!! Thanks again!


May, 2015 - Permalink

I couldn't wait and played with it a bit more...

It works! For sensor level it seems to work perfectly. However when I drag it over a device or group, that it when it doesn't appear.

If it can be made to work with device level and/or groups that would be icing on the cake!

It looks like a fairly simple construct. Perhaps by adding some more #if statements I can get it working with devices/groups.

This is a huge help, thank you so much!

If this gets developed/debugged a bit, it should be included with the release... it will be very useful!


May, 2015 - Permalink

Glad you like it :) On my installation, it works for all objects - groups, devices and sensors. Can you try again with the updated code from my post?


May, 2015 - Permalink