[hobbit] Availability Reports in RC4

Asif Iqbal iqbala-hobbit at qwestip.net
Tue Mar 1 18:09:17 CET 2005


On Tue, Mar 01, 2005 at 05:32:37PM, Henrik Storner wrote:
> On Mon, Feb 28, 2005 at 05:44:09PM -0600, John A. Milburn wrote:
> > I upgraded to RC4 and noticed that the reports module does not seem to
> > handle includes in the bb-hosts file.
> > The only host in my bb-hosts file is the hobbit server. The others are all
> > in other files with include lines in bb-hosts.
> > I used bbhostshow and directed the output to a file. I replaced bb-hosts
> > with that file and the system works fine.
> 
> How do you generate reports ? Via the "Reports -> Availability
> reports" menu ? If yes, could you check your webserver error-log for
> error-messages ? And how does your bb-rep.sh CGI script look ?
> 
> I just tried it here and include works fine. So something odd is going
> on at your site.

I ran this

#!/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

and I get the following error on RC2. Should I need to migrate to RC4
for success?

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-01 12:08:21 xgetenv: Cannot find value for variable BBREPGREEN
2005-03-01 12:08:21 xgetenv: Cannot find value for variable MACHINE
2005-03-01 12:08:21 Environment variable MACHINE not defined
2005-03-01 12:08:21 Aborting

I attached the hobbitserver.cfg file for details

> 
> 
> Regards,
> Henrik
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 
> 

-- 
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
-------------- next part --------------
# NB : Even though it might look like a shell-script, it is NOT.
#
BBSERVERROOT="/export/home/hobbit"		# Where Hobbit is installed - holds the server and bbvar sub-dirs.
BBSERVERLOGS="/var/log/hobbit"		# Directory for server logs. The hobbit user must have write-access here.

BBSERVERHOSTNAME="hobbit.domain.net"		# The hostname of your server
BBSERVERIP="1.2.0.53"			# The IP-address of your server. Use the real one, not 127.0.0.1 .
BBSERVEROS="sunos"			# The operating system of your server. linux,freebsd,solaris,hpux,aix,osf

BBSERVERWWWNAME="hobbit.domain.net"		# The name used for this hosts' webserver
BBSERVERWWWURL="/hobbit"		# The top URL for the Hobbit webpages
BBSERVERCGIURL="/hobbit-cgi"		# The URL for the Hobbit CGI scripts.

# BBLOCATION="foo"			# The network location, makes bbtest-net test only hosts with NET:foo
					# You only need to set this if you have multiple network test servers with
					# a shared bb-hosts file.

# Make sure the path includes the directories where you have fping, mail and (optionally) ntpdate installed,
# as well as the BBHOME/bin directory where all of the Hobbit programs reside.
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/export/home/hobbit/server/bin"

# Some systems need extra settings e.g. to locate run-time libraries.
# You can add these extra settings here:



##### Normally you do not need to modify anything below this point #####

# General settings
BBPORT="1984"			# Portnumber where hobbitd/bbd listens
BBDISP="$BBSERVERIP"		# IP of a single hobbit/bbd server
BBDISPLAYS=""			# IP of multiple hobbit/bbd servers. If used, BBDISP must be 0.0.0.0
BBPAGE="$BBSERVERIP"		# IP of a single bbd BBPAGE server. Not used by Hobbit.
BBPAGERS=""			# IP of multiple bbd BBPAGE servers. If used, BBPAGE must be 0.0.0.0
FQDN="TRUE"			# Use fully-qualified hostnames internally. Keep it TRUE unless you know better.
USEHOBBITD="TRUE"		# Set this TRUE if you are using a Hobbit server, FALSE if standard bbd.
BBGHOSTS="1"                    # How to handle status messages from unknown hosts.
                                # 0=accept message, 1=discard message, 2=discard message and log the event
PAGELEVELS="red yellow purple"	# Status colors that trigger an alert. Used by 'bb' talking to bbd, not Hobbit.
PURPLEDELAY="30"		# Lifetime of info- and larrd-pages. Used only when generating for bbd, not Hobbit.

BBLOGSTATUS="DYNAMIC"		# Are HTML status logs statically or dynamically generated?
				# Use DYNAMIC with Hobbit, unless you run hobbitd_filestore --status --html

PINGCOLUMN="conn"		# Column where the ping-test reports results.

DOCOMBO="TRUE"			# Ignored by everyone except maint.pl...
BBMAXMSGSPERCOMBO="0"           # How many individual messages to combine in a combo-message. 0=unlimited.
BBSLEEPBETWEENMSGS="0"          # Delay between sending each combo message, in milliseconds.


# Specific to this host
BBOSTYPE="$BBSERVEROS"		# Hosttype (operating system). Not used by server-side, but clients use this.
MACHINEDOTS="$BBSERVERHOSTNAME"	# This systems hostname
MACHINEADDR="$BBSERVERIP"	# This systems IP-address

# URL's generated/used by bbgen
BBWEBHOST="https://$BBSERVERWWWNAME"		# Just the host part of the URL - http://www.foo.com
BBWEBHOSTURL="$BBWEBHOST$BBSERVERWWWURL"	# Prefix for all static Hobbit pages - http://www.foo.com/bb
BBWEBHTMLLOGS="$BBWEBHOSTURL/html"		# Prefix for the Hobbit HTML logs (only if BBLOGSTATUS=STATIC)
BBWEB="$BBSERVERWWWURL"				# Hobbit URL prefix without the host part
BBSKIN="$BBSERVERWWWURL/gifs"			# Hobbit URL prefix for the GIF files
BBHELPSKIN="$BBSERVERWWWURL/help"               # Hobbit URL prefix for the online help files.
BBNOTESSKIN="$BBSERVERWWWURL/notes"             # Hobbit URL prefix for the online notes-files.
BBMENUSKIN="$BBSERVERWWWURL/menu"               # Hobbit URL prefix for the webpage menu files.
BBREPURL="$BBSERVERWWWURL/rep"			# Hobbit URL prefix for the Hobbit availability reports
BBSNAPURL="$BBSERVERWWWURL/snap"		# Hobbit URL prefix for the Hobbit snapshots
BBWAP="$BBSERVERWWWURL/wml"			# Hobbit URL prefix for the WAP/WML files.
CGIBINURL="$BBSERVERCGIURL"			# URL prefix for the Hobbit CGI-scripts - /cgi-bin

# Locations of system-wide files and directories
BBHOME="/export/home/hobbit/server"				# The Hobbit server directory, where programs and configurations go. 
BBTMP="$BBHOME/tmp"				# Directory used for temporary files.
BBHOSTS="$BBHOME/etc/bb-hosts"			# The bb-hosts file
BB="$BBHOME/bin/bb"				# The 'bb' client program
BBGEN="$BBHOME/bin/bbgen"			# The bbgen program

# Server specific directories
BBVAR="/export/home/hobbit/data"					# The bbvar directory holds all monitoring data
BBACKS="$BBVAR/acks"				# Acknowledge event info stored here (hobbitd_alert)
BBDATA="$BBVAR/data"				# Data files go here (hobbitd_filestore --data)
BBDISABLED="$BBVAR/disabled"			# Enabled/disabled flags are stored here (hobbitd_filestore --enadis)
BBHIST="$BBVAR/hist"				# History logs are stored here (hobbitd_history)
BBHISTLOGS="$BBVAR/histlogs"			# Historical detail status-loge are stored here (hobbitd_history)
BBLOGS="$BBVAR/logs"				# Status logs go here (hobbitd_filestore --status). Not needed by Hobbit.
BBWWW="$BBHOME/www"				# The directory for Hobbit webpage files.
BBHTML="$BBWWW/html"				# HTML status logs go here (hobbitd_filestore --status --html)
BBNOTES="$BBWWW/notes"				# For notes-files (hobbitd_filestore --notes)
BBREP="$BBWWW/rep"				# Top-level directory for Hobbit reports.
BBSNAP="$BBWWW/snap"				# Top-level directory for Hobbit snapshots.


# For the hobbitd_history module
BBALLHISTLOG="TRUE"				# Save a common log of all events (used for the bb2 webpage)
BBHOSTHISTLOG="TRUE"				# Save a log of all events for a host (not used by any tool currently)
SAVESTATUSLOG="TRUE"				# Save the detailed status log each time the status changes.

# For the hobbitd_alert module
MAILC="mail"					# Command used to send an e-mail with no subject
MAIL="mailx -r $ADDR -s"
SVCCODES="disk:100,cpu:200,procs:300,svcs:350,msgs:400,conn:500,http:600,dns:800,smtp:725,telnet:723,ftp:721,pop:810,pop3:810,pop-3:810,ssh:722,imap:843,ssh1:722,ssh2:722,imap2:843,imap3:843,imap4:843,pop2:809,pop-2:809,nntp:819,test:901"

# For bbtest-net
CONNTEST="TRUE"					# Should we 'ping' hosts ?
IPTEST_2_CLEAR_ON_FAILED_CONN="TRUE"		# If TRUE, then failing network tests go CLEAR if conn-test fails.
NONETPAGE=""					# Network tests that go YELLOW upon failure
FPING="/usr/local/sbin/fping"					# Path and options for the 'fping' program.
NTPDATE="ntpdate"				# Path to the 'ntpdate' program
TRACEROUTE="/usr/sbin/traceroute -n -q 2 -w 2 -m 15" # How to do traceroute on failing ping tests. Requires "trace" in bb-hosts.
BBROUTERTEXT="router"				# What to call a failing intermediate network device.


# Settings for the LARRD graphs

# Top level directory for the RRD files
BBRRDS="$BBVAR/rrd"

# This defines the status- and data-messages you want to collect LARRD data
# about. You will normally not need to modify this, unless you have added a
# script to pick up RRD data from custom tests (the hobbitd_larrd --extra-script
# and --extra-tests options).
# Note that network tests defined in the bb-services file are automatically
# included.
# The format here is "BBCOLUMN=LARRDSERVICE". If you leave out the "=LARRDSERVICE"
# part, it is assumed to be the same as the BBCOLUMN value.
#
# This is also used by the bb-hostsvc.cgi script to determine if the detailed
# status view of a test should include a graph.
LARRDS="cpu=la,disk,memory,conn=tcp,fping=tcp,ftp=tcp,ftps=tcp,ssh=tcp,ssh1=tcp,ssh2=tcp,telnet=tcp,telnets=tcp,smtp=tcp,smtps=tcp,pop-2=tcp,pop2=tcp,pop-3=tcp,pop3=tcp,pop=tcp,pop3s=tcp,imap=tcp,imap2=tcp,imap3=tcp,imap4=tcp,imaps=tcp,nntp=tcp,nntps=tcp,ldap=tcp,ldaps=tcp,rsync=tcp,bbd=tcp,clamd=tcp,oratns=tcp,qmtp=tcp,qmqp=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,nmailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd"

# This defines which LARRD RRD files to include on the "trends" column webpage,
# and the order in which they appear.
GRAPHS="la,disk:disk_part:5,memory,users,vmstat,iostat,tcp.http,tcp,netstat,temperature,ntpstat,apache,bind,sendmail,nmailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd"


############################################################
# These determine some parts of how bbgen generates webpages
############################################################
SUMMARY_SET_BKG="FALSE"				# Do summaries affect the background color of the BB webpage ?
BBMKBB2EXT="eventlog.sh acklog.sh"		# What extensions to have on the BB2 page.
BBREL="Hobbit"					# Used by the standard BB web headers, not by Hobbit
BBRELDATE=""					# Used by the standard BB web headers, not by Hobbit
DOTHEIGHT="16"					# Height (in pixels) of the color GIF's
DOTWIDTH="16"					# Width (in pixels) of the color GIF's
COLUMNDOCURL="$CGIBINURL/hobbitcolumn.sh?%s"	# URL formatting string for column-links

# Fonts and texts
MKBBLOCAL="<B><I>Pages Hosted Locally</I></B>"
MKBBREMOTE="<B><I>Remote Status Display</I></B>"
MKBBSUBLOCAL="<B><I>Subpages Hosted Locally</I></B>"
MKBBACKFONT="COLOR=silver SIZE=\"-1\""		# Size and color of the 'Current acknowledgement...' text in the html log.
MKBBCOLFONT="COLOR=\"#87a9e5\" SIZE=\"-1\""	# Size and color of the column headings text
MKBBROWFONT="SIZE=\"+1\" COLOR=\"#FFFFCC\" FACE=\"Tahoma, Arial, Helvetica\""   # Size,color,font of text in each row (hostname)
MKBBTITLE="COLOR=ivory SIZE=\"+1\""		# Size and color of the BB titles
BBDATEFORMAT="%a %b %d %H:%M:%S %Y"		# Date format
BBRSSTITLE="Hobbit Alerts"			# Title for the RSS and WML outputs.

# For WML output
WMLMAXCHARS="1500"				# Max number of bytes in a WAP message

# For BB reports
BBREPWARN="97"					# Default availability causing yellow status on availability report.
BBGENREPOPTS="--recentgifs --subpagecolumns=2"  # bbgen(1) options used when generating availability reports.

# For BB snapshots
BBGENSNAPOPTS="--recentgifs --subpagecolumns=2" # bbgen(1) options used when generating snapshots.

# For the bb-hist CGI 
BBHISTEXT=""					# What extensions to run on history pages.


# The following defines a bunch of commands that BB extensions expect to be present.
# Hobbit does not use them, but they are provided here so if you use BB extension
# scripts, then they will hopefully run without having to do a lot of tweaking.

TOP=/usr/local/bin/top
UPTIME=/usr/bin/uptime
AWK=/usr/bin/awk
CAT=/usr/bin/cat
CP=/usr/bin/cp
CUT=/usr/bin/cut
DATE=/usr/bin/date
EGREP=/usr/bin/egrep
EXPR=/usr/bin/expr
FIND=/usr/bin/find
GREP=/usr/bin/grep
HEAD=/usr/bin/head
ID=/usr/bin/id
LN=/usr/bin/ln
LS=/usr/bin/ls
MV=/usr/bin/mv
RM=/usr/bin/rm
SED=/usr/bin/sed
SORT=/usr/bin/sort
TAIL=/usr/bin/tail
TOUCH=/usr/bin/touch
TR=/usr/bin/tr
UNIQ=/usr/bin/uniq
WHO=/usr/bin/who
WC=/usr/bin/wc -l
WCC=/usr/bin/wc
# You should check that this returns diskstats in KB (Posix output)
DF=/usr/bin/df -Pk
DFCMD=/usr/bin/df -Pk
# Adjust ps output to your liking
PS=ps ax

# Miscellaneous definitions used by the BB client
MAXLINE=32768

# For the cpu check
DOCPU=TRUE
NOCPUCOLOR=clear
BBCPUTAB=$BBHOME/etc/bb-cputab
BBTOOMANYDAYSUP=9999
CPUPANIC=300
CPUWARN=150
DISPREALLOADAVG=FALSE
TOPARGS=-b -n 1
WARNCOLORONREBOOT=yellow
WARNMINSONREBOOT=60

# For the disk check
DODISK=TRUE
NODISKCOLOR=clear
BBDFTAB=$BBHOME/etc/bb-dftab
DFEXCLUDE=cdrom
DFPANIC=95
DFSORT=4
DFUSE=^/dev
DFWARN=90

# For the msgs check
DOMSGS=TRUE
NOMSGSCOLOR=clear
BBMSGSTAB=$BBHOME/etc/bb-msgstab
CHKMSGLEN=TRUE
IGNMSGS=
MSGEXPIRE=30:60
MSGFILE=/var/log/messages
MSGS=NOTICE WARNING
PAGEMSG=NOTICE
REDMSGSLINES=20
YELLOWMSGSLINES=10

# For the procs check
DOPROCS=TRUE
NOPROCSCOLOR=clear
BBPROCTAB=$BBHOME/etc/bb-proctab
PAGEPROC=cron
PROCS=bbrun
ADDR="bbro at domain.net"
TRACEROUTE="/usr/local/sbin/mtr -c 2 -n --report"


More information about the Xymon mailing list