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

Re: [hobbit] Hobbit in Debian



Re: Henrik Stoerner 2007-09-12 <20070912194736.GE22137 (at) hswn.dk>
> thank You very much! I had been hoping someone would volunteer to be
> the Debian package maintainer, so this is very much appreciated.

Hi Henrik,

sorry for the late answer, I should move this mailbox to a more
prominent place in mutt.

> > There's also a hobbit-plugins package, but so far it only contains 2
> > plugins (an "apt" check, and a related check for upgraded libs still
> > linked to running processes).
> > 
> > http://packages.qa.debian.org/h/hobbit-plugins.html
> 
> Good idea to put this in a separate package.

The main "feature" I introduced here is a /etc/hobbit/clientlaunch.d/
directory where hobbit-plugins puts *.cfg files. It would be nice if
"include" directories supported wildcards, at the moment the init
script does something like "ls -1 /etc/hobbit/clientlaunch.d/*.cfg >
/var/run/hobbit/clientlaunch-include.cfg" which is then included.

> Excellent! I haven't looked at it yet, but it is certainly nice to have
> a truly open implementation for this.

Here's what I did:

* add a new menu.css file
* add a menu.cfg that contains the actual menu as a HOBBITMENU
  variable
* add "include /etc/hobbit/web/menu.cfg" to hobbitserver.cfg (just
  before BBMENUSKIN)
* tweak web/* to use &HOBBITMENU:
  sed -i -e's/ Transitional//' -e'/"Topline"/i&HOBBITMENU' $S/etc/hobbit/web/*_header
  (the Transitional removal is to fix the Doctype, iirc the CSS didn't
  work otherwise)
* do not install wwwfiles/menu/menu_items.js.DIST in hobbitd/Makefile
* remove <script> from hobbitd/webfiles/bb_footer and
  hobbitd/webfiles/hobbitnk_footer

(These changes are applied on the fly at package build time, having
them included probably makes things easier.)

Christoph
-- 
cb (at) df7cb.de | http://www.df7cb.de/
#menue {
position:absolute;
top: 0px;
left: 0;
padding-bottom: 2px;
z-index: 200;
}

.outer {
float: left;
display: block;
overflow: hidden;
width: 10em;
height: 1.3em;
text-align: left;
border: 1px solid #123456;
font: 12px Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif;
background: #123456;
color: #FFFFFF;
}
.outer:hover {
height: auto;
border: 1px solid #FFFFFF;
background: #5AA7E5;
color: #FFFFFF;
}

a.inner-1 {
margin-top: 2px;
}
a.inner,
a.inner-1 {
display: block;
width: 9.9em;
padding: 2px 0;
text-decoration: none;
font-weight: normal;
border: 0px;
color: #000000;
background: #46B446;
}
a:visited.inner,
a:visited.inner-1 {
color: #202020;
background: #46B446;
}
a:hover.inner,
a:hover.inner-1 {
background-color: #f7eedb;
background: #5AE55A;
}

span.menutag {
display: block;
cursor: default;
}

span.invis {
display: none;
}
HOBBITMENU=" <div id=\"menue\"> \
    <div class=\"outer\"> \
      <span class=\"menutag\">Views<span class=\"invis\">: </span></span> \
	<a class=\"inner-1\" href=\"$BBSERVERWWWURL/bb.html\">Main view</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/bb2.html\">All non-green view</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERCGIURL/hobbit-nkview.sh\">Critical systems</a> \
    </div> \
    <div class=\"outer\"> \
      <span class=\"menutag\">Reports<span class=\"invis\">: </span></span> \
	<a class=\"inner-1\" href=\"$BBSERVERCGIURL/bb-eventlog.sh\">Event log Report</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERCGIURL/bb-rep.sh\">Availability Report</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERCGIURL/bb-snapshot.sh\">Snapshot Report</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERCGIURL/hobbit-confreport.sh\">Config Report</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERCGIURL/hobbit-hostgraphs.sh\">Metrics Report</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERCGIURL/hobbit-ghosts.sh\">Ghost Clients</a> \
    </div> \
    <div class=\"outer\"> \
      <span class=\"menutag\">Administration<span class=\"invis\">: </span></span> \
	<a class=\"inner-1\" href=\"$BBSERVERCGIURL/bb-findhost.sh\">Find host</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERSECURECGIURL/bb-ack.sh\">Acknowledge alert</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERSECURECGIURL/hobbit-enadis.sh\">Enable/disable</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERSECURECGIURL/hobbit-nkedit.sh\">Edit critical systems</a> \
    </div> \
    <div class=\"outer\"> \
      <span class=\"menutag\">Help<span class=\"invis\">: </span></span> \
	<a class=\"inner-1\" href=\"$BBSERVERWWWURL/help/about.html\">About Hobbit</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/install.html\">Installing Hobbit</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/hobbit-config.html\">Configuring Monitoring</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/hobbit-alerts.html\">Configuring Alerts</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/criticalsystems.html\">Critical systems</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/known-issues.html\">Known problems</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/hobbit-tips.html\">Tips and Tricks</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/howtograph.html\">Custom graphs</a><span class=\"invis\"> | </span> \
	<a class=\"inner\" href=\"$BBSERVERWWWURL/help/manpages/\">Hobbit man-pages</a> \
    </div> \
</div><!-- menuebox -->"