Status map
dave-nagios at homer.cymry.org
dave-nagios at homer.cymry.org
Mon May 3 12:09:53 CEST 2004
On Mon, May 03, 2004 at 09:41:58AM +0300, MiikaT wrote:
> I have approx. 100 hosts defined in nagios, and when I look status map with
> circular (marked up) layoyut, the hosts are layered on top of each other. This
> is basically an annoying issue as when I have a core switch as parent host,
> there is a lot of child hosts connecting to this device and one can't really
> make difference between the child hosts if you try to move mouse over the host
> icons to see the specific host status. If I change the scaling factor, if will
> only make graphics bigger, instead I would like to have more "space" for each
> host, even though it will require greater resolution to view the whole status.
> Is there any cure for this?
>
> -MiikaT
The answer you will most likely get on this list is that you can do one of the
following things
a. define parent relationships to spread things out a bit
b. Define your own corrdinants
I had your problem a while back and ended up kludging the statusmap.c file to stagger
the hosts on certain rings (mostly the innermost ring). It's a really ugly kludge, and
doesn't look right unless you turn off the green slots by using the non marked-up
version of circular. But it solved my problem and staggered the hosts so that they
were readable. Here's a diff
42
> #include <string.h>
72,73c73,74
< #define DEFAULT_NODE_VSPACING 15
< #define DEFAULT_NODE_HSPACING 45
---
> #define DEFAULT_NODE_VSPACING 80
> #define DEFAULT_NODE_HSPACING 80
75,76c76,77
< #define DEFAULT_PROXIMITY_WIDTH 1000
< #define DEFAULT_PROXIMITY_HEIGHT 800
---
> #define DEFAULT_PROXIMITY_WIDTH 10
> #define DEFAULT_PROXIMITY_HEIGHT 8
81,82c82,83
< #define COORDS_WARNING_WIDTH 650
< #define COORDS_WARNING_HEIGHT 60
---
> #define COORDS_WARNING_WIDTH 10
> #define COORDS_WARNING_HEIGHT 6
84c85
< #define CIRCULAR_DRAWING_RADIUS 100
---
> #define CIRCULAR_DRAWING_RADIUS 250
2684a2686
> int even_y=0;
2690a2693
> double last_x=0.0;
2691a2695,2697
> double last_y=0.0;
> double even_counter=0.0;
> double even_x=0.0;
2694c2700,2703
<
---
> char vmserver_a[10];
> char vmserver_b[10];
> strcpy(vmserver_a,"wvha2p15");
> strcpy(vmserver_b,"xvhalp02");
2746a2756,2770
> /*stagger if even kludge*/
> even_x=(even_counter/2);
> even_y=(even_counter/2);
> if(layer<=3){
> if(number_of_immediate_child_hosts(temp_host)==0){
> if(even_x!=even_y){
> x_coord=-(sin(-this_drawing_angle*(M_PI/180.0))*(2.2*radius));
> y_coord=-(sin((90+this_drawing_angle)*(M_PI/180.0))*(2.2*radius));
> }else{
> x_coord=-(sin(-this_drawing_angle*(M_PI/180.0))*(1.8*radius));
> y_coord=-(sin((90+this_drawing_angle)*(M_PI/180.0))*(1.8*radius));
> }
> }
> }
>
2756a2781,2783
> ++even_counter;
> last_x=x_coord;
> last_y=y_coord;
2785,2795d2811
< double y_coord[4]={0.0,0.0,0.0,0.0};
< host *temp_host;
< hoststatus *temp_hoststatus;
< hostextinfo *temp_hostextinfo;
< int x_offset=0;
< int y_offset=0;
< int center_x=0;
< int center_y=0;
< int bgcolor=0;
< double arc_start_angle=0.0;
< double arc_end_angle=0.0;
2882a2899,2909
> gdImageArc(map_image,x_offset,y_offset,(radius+(CIRCULAR_DRAWING_RADIUS/2))*
2,(radius+(CIRCULAR_DRAWING_RADIUS/2))*2,floor(arc_start_angle),ceil(arc_end_angle),color_lightgrey)
;
>
>
> /* determine center of "slice" and fill with appropriate color
> */
> center_x=-(sin(-(current_drawing_angle+(available_angle/2.0))*(M_PI/180.0))*
(radius));
> center_y=-(sin((90+current_drawing_angle+(available_angle/2.0))*(M_PI/180.0)
)*(radius));
> translated_x=center_x+x_offset;
> translated_y=center_y+y_offset;
>
> /* determine background color */
> temp_hoststatus=find_hoststatus(temp_host->name);
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list