Xymon Mailing List Archive search

Host Notes

list Henrik Størner
Fri, 28 Jul 2006 09:19:32 +0200
Message-Id: <user-fd333cf4b917@xymon.invalid>

On Thu, Jul 27, 2006 at 07:05:04PM -0700, Charles Jones wrote:
Do you plan on adding a cgi to enable live editing of "notes" (www/notes/hostname) files? I saw in the manpage for bb-gen mention of a script on dead-cat that gives that functionality, but I would like to eventually see something that builds a "nice looking" notes page that has the same background and font color etc as the rest of the Hobbit pages. Currently if you just put something in a notes file you get a big ugly white screen with the raw text.

Maybe a header/footer for the notes page would solve that?
Here's a simple solution for viewing the host notes, using mostly the tools you already have:

* a notes_header and notes_footer file, mostly cloned from the existing
  bb_header and bb_footer files. These go in your ~hobbit/server/web/
  directory.
* a simple CGI using the bb_webpage utility. This goes in your
  ~hobbit/cgi-bin/ directory.

Testing this revealed a bug in bb_webpage, so there's a patch for it as
well.

To use this, add "--docurl=$CGIBINURL/hostnotes.sh?HOST=%s" to BBGENOPTS in hobbitserver.c and restart Hobbit.

The CGI shell-script currently looks only for files named
.../notes/HOSTNAME - you can probably figure out how to change this if
you want to look for HOSTNAME.html, HOSTNAME.txt or whatever you like.


Regards,
Henrik
Attachments (1)