Patch to locate hosts on status map in a fast way

Creator creator at mindcreations.com
Thu Sep 18 00:05:48 CEST 2003


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=1" string with "layout=?"
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 <your nagios source dir>/cgi
patch status.c <your patch path>/locate-on-map.diff
make;strip status.cgi;cp status.cgi <your nagios installed dir>/sbin

Now set <your nagios installed dir>/sbin/status.cgi permissions as those of
the other files in that dir and you have finished.

Enjoy!


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

Stefano Coletta
http://www.mindcreations.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: locate-on-map.diff
Type: application/octet-stream
Size: 1141 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030918/1ac249f4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shot3.jpg
Type: image/jpeg
Size: 11005 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030918/1ac249f4/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shot2.jpg
Type: image/jpeg
Size: 10024 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030918/1ac249f4/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shot1.jpg
Type: image/jpeg
Size: 70468 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030918/1ac249f4/attachment-0002.jpg>


More information about the Users mailing list