Hi, I'm building some maps, and I'm trying to put a simple text with a status related color, so, if the sensor is UP, it will be green and the text will be UP, etc.

I've only implemented a single color text, using the custom HTML object and style on it.

There is a way to do that?


Article Comments

Hey Eduardo,
You should find all needed information within this link. Please note that don't offer support for customizing objects.


Jan, 2023 - Permalink

Hi!

Sorry, I'm looking for a map object that it is a status related text.

Something like: the sensor is down, so it will be written DOWN with respective color;


Jan, 2023 - Permalink

Hey,
We currently don't offer a native map object which can give you desired output. Therefore, you need to create the object yourself. You should find all needed information within this link


Jan, 2023 - Permalink

So, for further development, I've achieved what I wanted.

CSS: I've created an archive on C:\Program Files (x86)\PRTG Network Monitor\webroot\css with the name styles_custom_v2. Here is the content:

.map_iconcolornew_hasblack,
.map_iconcolornew_sensx {
color: #878787;
font-size: 20px;
text-align: center;
}

.map_iconcolornew_hasgreen,
.map_iconcolornew_sensg {
color: #b8c419;
font-size: 50px;
text-align: center;
}

.map_iconcolornew_hasblue,
.map_iconcolornew_sensb {
color: #477ec0;
font-size: 20px;
text-align: center;
}

.map_iconcolornew_hasorange,
.map_iconcolornew_sensp {
color: orange;
font-size: 20px;
text-align: center;
}

.map_iconcolornew_hasyellow,
.map_iconcolornew_sensy {
color: #f5c500;
font-size: 20px;
text-align: center;
}

.map_iconcolornew_hasack,
.map_iconcolornew_senso {
color: #e30613;
font-size: 20px;
text-align: center;
}

.map_iconcolornew_hasred,
.map_iconcolornew_haspartialred,
.map_iconcolornew_sensr {
color: #e30613;
font-size: 20px;
text-align: center;
}

And I've created a new map object in C:\Program Files (x86)\PRTG Network Monitor\webroot\mapobjects with the following text:

<!--Custom: Status Text with related Color-->
<div class="map_object map_icon2 map_icon_large <#sensor type="colorclassofstate" prefix="map_iconcolornew_" id="<@objectid>">" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="<#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>">">
  <#mapobject type="objectgrip" mode="<@editmode>">
  <#mapobject type="htmlbefore" subid="<@subid>">

  <#objectstatus name="status" id="<@objectid>" var="objectstatus">
  <#objectstatus name="message" show="textraw" id="<@objectid>" var="message">

  <span class="status-text" style="font-size: 50px;">
    <#objectstatus name="status" id="<@objectid>">
  </span>
  <#mapobject type="htmlafter" subid="<@subid>">
</div>

Jan, 2023 - Permalink