What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Ignore Paused and Acknowledged sensors

Votes:

0

I am creating a Map and have created new Mapicons under the iconset8 folder with a template that creates a box with the sensor status colour and then the icon and sensor

This is the template.htm file

<div class="map_object map_graph <#sensor type="colorclassofstate" prefix="map_iconcolor_" id="<@objectid>">" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="min-width:20px;min-height:20px;text-align: center;<#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>">">
<#mapobject type="objectgrip" mode="<@editmode>">
<#mapobject type="htmlbefore" subid="<@subid>">

<div style="display:block;width:<@width>px;height:<@height>px; border:4px solid black;">

	
		<img src="<@iconpath>" style="max-width:64%;max-height:64%">
		<div style="width: 100%" class="graphicalmapicon" <#sensor type="colorclassofstate" prefix="map_iconcolor_">
			<span class="label <#sensor type="colorclassofstate" prefix="map_iconcolor_" id="<@objectid>" filter_status="5">">
				<b><#objectproperty name="Name" id="<@objectid>" show="link"></b><br>
				<#objectstatus skiptagfortype="sensor" name="downsens" id="<@objectid>">
				<#objectstatus skiptagfortype="sensor" name="partialdownsens" id="<@objectid>">
				<#objectstatus skiptagfortype="sensor" name="warnsens" id="<@objectid>">
				<#objectstatus skiptagfortype="sensor" name="upsens" id="<@objectid>">
				<#objectstatus skiptagfortype="sensor" name="unusualsens" id="<@objectid>">
				<#objectstatus skiptagfortype="sensor" name="undefinedsens" id="<@objectid>">
				<#objectstatus skiptagfortype="sensor" name="pausedsens" id="<@objectid>">
				<#objectstatus skiptagfortype="group,device,probenode" name="minigraph" id="<@objectid>">
			</span>
		</div>
		</img>
	
	</div>

</div>

I would like to get it so that the box colour does not change if the sensor is paused or in a down acknowledge state.

I can see that in other mapobjects there are ways to filter but cannot seem to do this for a mapicon template.

I have also tried to create my own mapobject based on the object_box1.htm file and can again get the box to change colour but not ignore paused or acknowledge states.

Is this possible via custom css or filter property?

custom iconcolor maps

Created on Jan 31, 2023 12:17:10 PM

Last change on Feb 1, 2023 1:59:04 PM by  Jeremiah Katatumba



1 Reply

Votes:

0

I solved this by adding the Style text to the top of the template. For some reason it didnt respond to being put in the custom css file

<style>
.map_object.map_iconcolor_senso,.map_object.map_iconcolor_senso label,.map_object.map_iconcolor_senso span,
.map_object.map_iconcolor_sensr,.map_object.map_iconcolor_sensr label,.map_object.map_iconcolor_sensr span,
.map_object.map_iconcolor_sensq,.map_object.map_iconcolor_sensq label,.map_object.map_iconcolor_sensq span {
background-color: <#colorcode color="statusdown">;
color: #fff;
}
.map_object.map_icon2.map_iconcolor_sensg,.map_object.map_icon2.map_iconcolor_sensg label,.map_object.map_icon2.map_iconcolor_sensg span {
background-color: <#colorcode color="statusup">;
}
.map_object.map_iconcolor_sensy,.map_object.map_iconcolor_sensy label,.map_object.map_iconcolor_sensy span {
background-color: <#colorcode color="statuswarning">;
}
.map_object.map_iconcolor_sensb,.map_object.map_iconcolor_sensb label,.map_object.map_iconcolor_sensb span {
background-color: <#colorcode color="statuspaused">;
}
.map_object.map_iconcolor_sensp,.map_object.map_iconcolor_sensp label,.map_object.map_iconcolor_sensp span {
background-color: <#colorcode color="statusunusual">;
}
.map_object.map_iconcolor_sensx,.map_object.map_iconcolor_sensx label,.map_object.map_iconcolor_sensx span {
background-color: <#colorcode color="statusunknown">;
color: #fff;
}
.map_object.map_iconcolor_hasblack {
background-color: #ddd;
}
.map_object.map_iconcolor_hasgreen, map_iconcolor_hasack {
background-color: #b8c419;
}
.map_object.map_iconcolor_hasblue {
background-color: #b8c419;
}
.map_object.map_iconcolor_hasorange {
background-color: #f59c00;
}
.map_object.map_iconcolor_hasyellow {
background-color: #f5c500;
}
.map_iconcolor_hasred,.map_iconcolor_haspartialred,.map_iconcolor_hasredok{
background-color: #e30613 !important;
}


</style>

Created on Feb 1, 2023 2:39:32 PM

Last change on Feb 1, 2023 3:04:13 PM by  Felix Wiesneth [Paessler Support]




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.