High Contrast Status Map option

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
discarn8
Posts: 11
Joined: Mon Jul 24, 2017 11:47 pm

Re: High Contrast Status Map option

Post by discarn8 »

Hello... My sincere apologies - I apparently misunderstood the purpose of posting to this forum. I've not found the answer to one of my existing questions (concerning how to change the node colors on the map) but if you need to close the topic, please feel free to and thank you for asking and again for your assistance.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: High Contrast Status Map option

Post by lmiltchev »

Try adding the desired color to "/usr/local/nagios/share/stylesheets/map-directive.css":

Example:
.node {
font-family: sans-serif;
color: green;
stroke: green;
fill: green;

}
Did this help?
Be sure to check out our Knowledgebase for helpful articles and solutions!
discarn8
Posts: 11
Joined: Mon Jul 24, 2017 11:47 pm

Re: High Contrast Status Map option

Post by discarn8 »

Hello lmiltchev - you're amazing - thank you.

Please close this topic.
discarn8
Posts: 11
Joined: Mon Jul 24, 2017 11:47 pm

Re: High Contrast Status Map option

Post by discarn8 »

Note:

To add a bit of "visual flair" to your "down nodes"
nodered.png
...you can make them stand out a bit more by making their red a "little louder" by making the following change to your /usr/local/nagios/share/map-directive.html :

Change your [filter id="icon-glow-down"] to

<filter id="icon-glow-down" x="-50%" y="-50%"
width="200%" height="200%">
<feComponentTransfer in="SourceAlpha" result="solid">
<feFuncR type="table" tableValues="1 0 0 0"/>
<feFuncG type="table" tableValues="0 0 0 0"/>
<feFuncB type="table" tableValues="0 0 0 0"/>
</feComponentTransfer>
<feGaussianBlur in="solid" stdDeviation="6" result="blur"/>
<feBlend in="SourceGraphic" in2="solid" mode="screen"/>
</filter>
discarn8
Posts: 11
Joined: Mon Jul 24, 2017 11:47 pm

Re: High Contrast Status Map option

Post by discarn8 »

If you wish to use the black background on your map, as shown previously, but notice that your "status ok" node labels disappear (because they are also black), edit your: /usr/local/nagios/share/js/map-directive.js

Change the var state = "ok" section's "attrs["fill"]=" to your color of choice:


// Placeholder for attributes
var attrs = new Object;
var state = "ok";
var stateCounts = {};

// Variables used for all layouts
var serviceCount = getObjAttr(d, ["serviceCount"], 0);
var iconTextPadding = getIconTextPadding(d);
var fontSize = $scope.fontSize + "px";

if (d.hostInfo.name == $scope.$parent.search.host)
fontSize = ($scope.fontSize * 2) + "px";
attrs["font-size"] = fontSize;
attrs["font-weight"] = "normal";
attrs["text-decoration"] = "none";
attrs["fill"] = "#00ff00";
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: High Contrast Status Map option

Post by dwhitfield »

discarn8 wrote: Please close this topic.
I see this, and then two additional posts. Do you still want us to close? I didn't see a new question, just more info, but maybe I am missing something. Thanks for the additional info!
discarn8
Posts: 11
Joined: Mon Jul 24, 2017 11:47 pm

Re: High Contrast Status Map option

Post by discarn8 »

Please close it. I posted the last couple of replies, just in case anyone else comes looking for the same information that I originally was seeking. Thanks again for the assistance.
Locked