Page 1 of 1

[Nagios-devel] Patch to locate hosts on status map in a fast way

Posted: Wed Sep 17, 2003 2:09 pm
by Guest
This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C37D78.9D941120
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi there,

here is the patch as promised to locate any host in the status map by =
single
clicking the detailed host page.

Look at the attached screenshots to see a little demo:

shot1: The red circle shows the new command (Host information page)
shot2: After clicking the icon you'll be forwarded on the statusmap =
using
"Depth Layers" method.
shot3: Another point (Status Overview for example) from where you can =
use
this function.

Before applying to Nagios v1.1 code you may want to change a variable to
reflect your preferred Status Map default display mode.

Here it is the list as defined in cgi/statusmap.c:

#define LAYOUT_USER_SUPPLIED 0
#define LAYOUT_SUBLAYERS 1
#define LAYOUT_COLLAPSED_TREE 2
#define LAYOUT_BALANCED_TREE 3
#define LAYOUT_CIRCULAR 4
#define LAYOUT_CIRCULAR_MARKUP 5
#define LAYOUT_CIRCULAR_BALLOON 6

Look at the diff file and substitute the "layout=3D1" string with =
"layout=3D?"
where ? is a number from 0 to 6 to be chosen from the above list or just
skip this step if you are comfortable with the default setting.

Apply the patch by typing:

cd /cgi
patch status.c /locate-on-map.diff
make;strip status.cgi;cp status.cgi /sbin

Now set /sbin/status.cgi permissions as those =
of
the other files in that dir and you have finished.

Enjoy!


------------

Stefano Coletta
http://www.mindcreations.com=20

------=_NextPart_000_0009_01C37D78.9D941120
Content-Type: application/octet-stream;
name="locate-on-map.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="locate-on-map.diff"

1818a1819,1825=0A=
> =0A=
> /* Added by Stefano Coletta (aka Creator) =
http://www.mindcreations.com on 26/08/2003 */=0A=
> #ifdef USE_STATUSMAP=0A=
> printf("",STATUSMAP_CGI,url_encode(temp_status->host_name),url_imag=
es_path,STATUSMAP_ICON,STATUS_ICON_WIDTH,STATUS_ICON_HEIGHT);=0A=
> #endif=0A=
> /* End */=0A=
> =0A=
1824d1830=0A=
=0A=
> /* Added by Stefano Coletta (aka Creator) =
http://www.mindcreations.com on 26/08/2003 */=0A=
> #ifdef USE_STATUSMAP =0A=
> printf("\n",STATUSMAP_CGI,url_encode(hststatus->host_name),url_images_pa=
th,STATUSMAP_ICON);=0A=
> #endif=0A=
> /* End */=0A=
2726a2739=0A=
> =0A=
2727a2741,2747=0A=
> =0A=
> /* Added by Stefano Coletta (aka Creator) =
http://www.mindcreations.com on 26/08/2003 */=0A=
> #ifdef USE_STATUSMAP =0A=
> printf("\n",STATUSMAP_CGI,url_encode(temp_host->name),url_images_path,ST=
ATUSMAP_ICON);=0A=
> #endif=0A=
> /* End */=0A=
> =0A=

------=_NextPart_000_0009_01C37D78.9D941120
Content-Type: image/jpeg;
name="shot3.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="shot3.jpg"

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEP
ERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4e
Hh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCABeATUDASIA
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm
p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA
AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx
BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkN

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]