Xymon Mailing List Archive search

using bbgen

4 messages in this thread

list Daniel J McDonald · Mon, 31 Jan 2005 10:51:21 -0600 ·
I'm trying to port bbmap to hobbit - there have been a lot of hard-coded
little things that needed cleaning, but I'm about 65% of the way
there...

The most recent is the ability to pop up a page created by bbgen.  My
script currently reads:
#!/bin/sh
# @version $Id: statusbbgen.sh,v 2.5 2003/12/12 22:39:05 fredo Exp $
# @copyright 2003
# call bbgen >= 2.5 to create bb4 web page when click on host/group
TEMPBBHOST=$1
BBHOME=/var/hobbit/server/
export BBHOME
#. ${BBHOME}/etc/bbdef.sh
BBHOSTS=${TEMPBBHOST}
export BBHOSTS
BBSKIN="/hobbit/gifs"
export BBSKIN
TEMPLATE="bb"
${BBHOME}/bin/bbgen --hobbitd --template=${TEMPLATE} --embedded
#2> /dev/null

I get an error that it can't figure out the variable MACHINE, but there
is no more bbdef file, so.... how do you set the environment in the new
hobbit world?

I don't know what --embedded was supposed to do either...
-- 
Daniel J McDonald, CCIE # 2495, CNX
Austin Energy

user-290ce4e24e19@xymon.invalid
list Henrik Størner · Mon, 31 Jan 2005 17:57:54 +0100 ·
quoted from Daniel J McDonald
On Mon, Jan 31, 2005 at 10:51:21AM -0600, Daniel J McDonald wrote:
I'm trying to port bbmap to hobbit - there have been a lot of hard-coded
little things that needed cleaning, but I'm about 65% of the way
there...

The most recent is the ability to pop up a page created by bbgen.  My
script currently reads:
#!/bin/sh
[snip]
${BBHOME}/bin/bbgen --hobbitd --template=${TEMPLATE} --embedded 2>/dev/null
The easiest way of getting the standard environment passed to bbgen
is probably to add the option "--env=${BBHOME}/etc/hobbitserver.cfg"
quoted from Daniel J McDonald
I get an error that it can't figure out the variable MACHINE, but there
is no more bbdef file, so.... how do you set the environment in the new
hobbit world?
The "--env" option will make sure MACHINE is set.
I don't know what --embedded was supposed to do either...
It's an option that tells bbgen to only generate a single webpage,
and output it to stdout instead of saving it to a file. It was
written for bbmap, actually, since it uses bbgen as a CGI script.

Hmm - it isn't in the man-page, it should be. Will fix.


Henrik
list Daniel J McDonald · Mon, 31 Jan 2005 11:51:00 -0600 ·
quoted from Henrik Størner
On Mon, 2005-01-31 at 17:57 +0100, Henrik Stoerner wrote:
On Mon, Jan 31, 2005 at 10:51:21AM -0600, Daniel J McDonald wrote:
I'm trying to port bbmap to hobbit - there have been a lot of hard-coded
little things that needed cleaning, but I'm about 65% of the way
there...
The "--env" option will make sure MACHINE is set.
Unfortunately, it also masks my BBHOSTS variable, so I can't specify the
host to display....
quoted from Henrik Størner

I don't know what --embedded was supposed to do either...
It's an option that tells bbgen to only generate a single webpage,
and output it to stdout instead of saving it to a file. It was
written for bbmap, actually, since it uses bbgen as a CGI script.

Hmm - it isn't in the man-page, it should be. Will fix.
Ah, that explains much.


-- 
Daniel J McDonald, CCIE # 2495, CNX
Austin Energy

user-290ce4e24e19@xymon.invalid
list Henrik Størner · Mon, 31 Jan 2005 20:46:27 +0000 (UTC) ·
quoted from Daniel J McDonald
In <user-9c9c0de073dd@xymon.invalid> Daniel J McDonald <user-290ce4e24e19@xymon.invalid> writes:
On Mon, 2005-01-31 at 17:57 +0100, Henrik Stoerner wrote:
On Mon, Jan 31, 2005 at 10:51:21AM -0600, Daniel J McDonald wrote:
I'm trying to port bbmap to hobbit - there have been a lot of hard-coded
little things that needed cleaning, but I'm about 65% of the way
there...
The "--env" option will make sure MACHINE is set.
Unfortunately, it also masks my BBHOSTS variable, so I can't specify the
host to display....
Ah - I see. The quickn'dirty solution then is probably just to 
source in the hobbitserver.cfg file. It's not guaranteed to work,
but I try to keep it working (the report CGI script do this).


Henrik