Need help with manual BBGEN report

Asif Iqbal iqbala-hobbit at qwestip.net
Tue Mar 15 19:37:39 CET 2005


I have this script which is suppose to create a monthly report as a
cronjob, but it never worked with hobbit. It used to work fine with
bb1.9c with bbgen 3.2

Here is the script

#!/bin/sh
#
[ "$#" -gt 0 -a "$#" -lt 3 ] && echo && echo Usage: $0 [31 Jan 2004] &&
exit 1
[ "$#" -gt 3 ] && echo && echo Usage: $0 [31 Jan 2004] && exit 1
DAY=$1
MONTH=$2
YEAR=$3
DATE=/usr/local/bin/date
MKDIR=/usr/local/bin/mkdir
DAY=${DAY:=`$DATE +%d`}
MONTH=${MONTH:=`$DATE +%b`}
YEAR=${YEAR:=`$DATE +%Y`}
START=`$DATE +%s --date="01 $MONTH $YEAR 00:00:00"`
END=`$DATE +%s --date="$DAY $MONTH $YEAR 23:59:59"`
$MKDIR -p /usr/local/apache/htdocs/reports/monthly/$YEAR/$MONTH
BBHOME=/export/home/hobbit/server
. $BBHOME/etc/hobbitserver.cfg
BBWEB=/reports/monthly/$YEAR/$MONTH \
$BBHOME/bin/bbgen --reportopts=$START:$END:1:crit \
        --larrd043 --ignorecolumns=ssh,bbgen,bbtest --subpagecolumns=2 \
        /usr/local/apache/htdocs/reports/monthly/$YEAR/$MONTH

When I run it I get this as output

report.monthly.sh: -l: not found
report.monthly.sh: -Pk: not found
report.monthly.sh: -Pk: not found
report.monthly.sh: ax: not found
report.monthly.sh: -n: not found
report.monthly.sh: /dev: cannot execute
report.monthly.sh: WARNING: not found
2005-03-15 13:38:09 xgetenv: Cannot find value for variable BBREPGREEN
2005-03-15 13:38:09 xgetenv: Cannot find value for variable MACHINE
2005-03-15 13:38:09 Environment variable MACHINE not defined
2005-03-15 13:38:09 Aborting

I am running RC5. The report page is empty.

Thanks for any help

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most intelligent, but
 the one most responsive to change."    - Charles Darwin



More information about the Xymon mailing list