Nagios XI Maps Bubble Color!!!
Posted: Tue Oct 03, 2017 11:43 am
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
Thanks,
Ravi
Support for Nagios products and services
https://support.nagios.com/forum/
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.
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;
}
}