Patches to add display_name support to statusmap.cgi

Dan Stromberg dstromberglists at gmail.com
Fri Jan 15 19:26:03 CET 2010


Please find attached a gzip'd tar archive containing two small patches
to add display_name support to statusmap.cgi (statusmap.c) - so when
you get a 2d statusmap via the CGI, you can add in more descriptive
host "names".

It is my hope that these patches could be added to a future release of Nagios.

Thanks for the nifty software.

PS: Here they are again as text, but I've attached them too anyway -
one's easier for browsing, one's less likely to get messed up by MUA's
and MTA's:

--- cgi/statusmap.c.t   2010-01-15 10:04:33.000000000 -0800
+++ cgi/statusmap.c     2010-01-15 10:04:48.000000000 -0800
@@ -1791,7 +1791,7 @@


                        /* draw host name, status, etc. */
-
draw_host_text(temp_host->name,x1+(DEFAULT_NODE_WIDTH/2),y1+DEFAULT_NODE_HEIGHT);
+
draw_host_text(temp_host->display_name,x1+(DEFAULT_NODE_WIDTH/2),y1+DEFAULT_NODE_HEIGHT);
                        }

                /* we're creating HTML image map... */


--- html/docs/objectdefinitions.html.t  2010-01-15 10:14:16.000000000 -0800
+++ html/docs/objectdefinitions.html    2010-01-15 10:14:25.000000000 -0800
@@ -206,7 +206,7 @@
 <tr>
 <td valign="top"><strong>display_name</strong>:</td>
 <td>
-This directive is used to define an alternate name that should be
displayed in the web interface for this host.  If not specified, this
defaults to the value you specify for the <i>host_name</i> directive.
Note:  The current CGIs do not use this option, although future
versions of the web interface will.
+This directive is used to define an alternate name that should be
displayed in the web interface for this host.  If not specified, this
defaults to the value you specify for the <i>host_name</i> directive.
Note:  The current CGIs do not use this option, although future
versions of the web interface will.  At this time, only statusmap.cgi
has been updated to use display_name.
 </td>
 </tr>
 <tr>
@@ -650,7 +650,7 @@
 <tr>
 <td valign="top"><strong>display_name</strong>:</td>
 <td>
-This directive is used to define an alternate name that should be
displayed in the web interface for this service.  If not specified,
this defaults to the value you specify for the
<i>service_description</i> directive.  Note:  The current CGIs do not
use this option, although future versions of the web interface will.
+This directive is used to define an alternate name that should be
displayed in the web interface for this service.  If not specified,
this defaults to the value you specify for the
<i>service_description</i> directive.  Note:  The current CGIs do not
use this option, although future versions of the web interface will.
At this time, only statusmap.cgi has been updated to use display_name.
 </td>
 </tr>
 <tr>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statusmap-displayname.tar.gz
Type: application/x-gzip
Size: 734 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100115/e798240d/attachment.bin>
-------------- next part --------------
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list