[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] xmon 4.3beta2 - Bug with --tooltips=never



Alan Sparks wrote:
Alan Sparks wrote:
Dominique Frise wrote:
Alan Sparks wrote:
I have added the documented option "--tooltips=never" to my BBGENOPTS
setting.  Documented behavior is to show the COMMENT next to the host
name (same as with Hobbit 4.2).  However, in 4.3 this also is showing
the value of any DESCR tag on the host, which is not compatible
behavior, and is ugly (the DESCR value used to be only included on the
INFO page).
-Alan


The man page for 4.3beta2 ( 4.2.3) states:

     --tooltips=[always,never,main]
          Determines  which  pages  use  tooltips  to  show   the
          description  of the host (from the COMMENT entry in the
          bb-hosts(5) file). If set to always, tooltips are  used
          on all pages. If set to never, tooltips are never used.
          If set to main, tooltips are used on  the  main  pages,
          but not on the BB2 (all non-green) or NK (critical sys-
          tems) pages.

Missing in this text is the default setting which corresponds to
--tooltips=main. This is the setting we use.

Ie tried --tooltips=never and now see the COMMENT value after the
hostname which is the correct behaviour (see bb-hosts(5)). The DESCR
values only show up in the info column.


Dominique

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk



Definitely does not work that way here.  I have several host entries
that have tags like:
 DESCR:vip:"Anycast DNS address"

With --tooltips=never in my BBGENOPTS, this is part of the info page. But it is also rendered on the groups page:

dns-anycast (vip:Anycast DNS address) conn:green:6d04h08m dns:green:6d04h45m info:green:10.254.254.1 trends:green:

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk



This block of code t=from lib/htmllog.c is questionable to me.  If does
not implement the documented behavior - if the comment is not there, it
uses the description.  And if tooltips are disabled, the description is
rendered in parentheses.  This is definitely different behavior from
4.2, and different from the documention.


        cmt = bbh_item(host, BBH_COMMENT); if (!cmt) cmt =
bbh_item(host, BBH_DESCRIPTION);
        if (!cmt && usetooltip) cmt = bbh_item(host, BBH_IP);

        if (disp == NULL) disp = hname;

        if (cmt) {
                if (usetooltip) {
                        /* Thanks to Marco Schoemaker for suggesting the
use of <span title...> */
                        result = (char *)malloc(strlen(disp) +
strlen(cmt) + 30);
                        sprintf(result, "<span title=\"%s\">%s</span>",
cmt, disp);
                }
                else {
                result = (char *)malloc(strlen(disp) + strlen(cmt) + 4);
                sprintf(result, "%s (%s)", disp, cmt);
                }


To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk


Alan, you are right.

We were seing the documented behaviour because COMMENT is defined for
all our hosts with additional DESCR for a few boxes. I now tried with DESCR only and saw the issue that you described.

The instruction "if (!cmt) cmt = bbh_item(host, BBH_DESCRIPTION);" should be removed from lib/htmllog.c.

Also the man page for bbgen(1) should reflect the fact that if tooltips is enabled (always or main) the IP will be displayed if no COMMENT is defined.

Dominique