How do I change the bubble colors in the map since there are bunch sites not online instead red I would to make it yellow.
Thanks,
Ravi
Nagios XI Maps Bubble Color!!!
Nagios XI Maps Bubble Color!!!
You do not have the required permissions to view the files attached to this post.
-
kyang
Re: Nagios XI Maps Bubble Color!!!
That would require editing the google map component which is editing the php code.
Is there a specific reason why you want hosts that are critical to show yellow?
Is there a specific reason why you want hosts that are critical to show yellow?
Re: Nagios XI Maps Bubble Color!!!
There is a reason for the management don't wanted to see the critical since the host wasn't been integrated on the network at the same time they don't want that host been deleted as well. They just wanted all the offline nodes to be yellow.
Re: Nagios XI Maps Bubble Color!!!
You could probably avoid modifying the Google Maps component itself (which is messy and overwritten with updates) by leveraging the Custom Includes component. It would still require a bit of Javascript/CSS know-how though.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios XI Maps Bubble Color!!!
I'm not sure what is considered an offline node, but I can point you to where you would want to make the change to the componentponnpr7 wrote:There is a reason for the management don't wanted to see the critical since the host wasn't been integrated on the network at the same time they don't want that host been deleted as well. They just wanted all the offline nodes to be yellow.
in this file at about line 52 there is a loop that set's the marker color, and that is what would need to be edited
/usr/local/nagiosxi/html/includes/components/googlemap/buildmarkers.inc.php
Code: Select all
// loop for host statuses
foreach ($gethoststatus->children() as $status)
{
if (strlen($status->name) > 2) //this xml array had empty variables that were set, needed a workaround
{
switch ($status->current_state) //grab current host state and assign a balloon icon
{
case 0:
$icon = 'https://www.google.com/mapfiles/marker_green.png'; //host is up
break;
case 1:
$icon = 'https://www.google.com/mapfiles/marker.png'; //host is critical
break;
case 2:
$icon = 'https://www.google.com/mapfiles/marker.png'; //host is something else not good
break;
default:
$icon = 'https://www.google.com/mapfiles/marker_white.png'; //set for any other unknown cases
break;
}
$hostArray["{$status->host_id}"]["icon"] = $icon; //grab status_text field from xml data
$hostArray["{$status->host_id}"]["status_text"] = $status->status_text;
$hostArray["{$status->host_id}"]["current_state"] = $status->current_state;
}
}