#!/bin/sh
#
# bbdef.sh
#
# BIG BROTHER DEFINITIONS AREA
# Sean MacGuire - The MacLawran Group Inc.
# Version 1.4
# Mar 05th, 2000
#
# This program is Copyright (c) 1997-2000
# The MacLawran Group Inc.
# All Rights Reserved
#

# OS TYPE
BBOSTYPE="&BBOSTYPE"
export BBOSTYPE

#
# NEW FOR 1.04... DISPLAY FULLY QUALIFED DOMAIN NAMES?
# i.e. aaa.bbb.com instead of just aaa
#
# FQDN="TRUE"		# YES...

FQDN="&BBFQDN"


#
# USE lynx IF YOU MUST TEST PASSWORD PROTECTED PAGES
# OR https TESTING...
# LIKE Leif Ericksen <phantom@wwa.com>
LYNX="/usr/local/bin/lynx -dump -head"

#
# INTERNET SERVICES YOU DON'T WANT TO GET PAGED ON
# WHEN THEY'RE DOWN... ASSUMPTION IS YOU WANT TO KNOW 
# ABOUT EVERYTHING RIGHT NOW... (pop3/smtp/ssh/...)
#

NONETPAGE=""
export NONETPAGE


#
# WHERE tmp FILES LIVE - THIS IS GOOD FOR SECURITY
# THANKS TO Alan Cox (alan@cymru.net)
#

BBTMP="$BBHOME/tmp"
export BBTMP


#
# LOCAL CLIENT MONITORING CONFIGURATION FOR bb-local.sh
#
# WARNING AND PANIC LEVELS FOR LOCAL SYSTEM INFOMRAION
# YOU CAN SET VALUES ON A SPECIFIC FILESYSTEM BY USING
#	THE etc/bb-dftab FILE
#

DFWARN=90				# (YELLOW) DISK % TO WARN
DFPANIC=95				# (RED) DISK % TO PANIC
export DFWARN DFPANIC


#
# CPU LEVELS ARE THE 5 MINUTE LOAD AVERAGE x 100
#

CPUWARN=150				# (YELLOW) WARN AT LOAD AVG OF 1.5
CPUPANIC=300				# (RED) PANIC AT LOAD AVG OF 3
export CPUPANIC CPUWARN


#
# PROCESS MONITORING
# THESE VALUES ARE OVERRIDDEN BY THE etc/bb-proctab FILE
#

PROCS="bbrun"				# (YELLOW) WARN IF NOT RUNNING 
PAGEPROC="cron"				# (RED) PAGE IF NOT RUNNING
export PROCS PAGEPROC


#
# MESSAGE FILE MONITORING (/var/adm/messages or similar)
#
# SMM: NEW IN BB 1.4
# CHKMSGLEN IS SET TO TRUE BY DEFAULT.  IT WILL SCREAM IF IT FINDS
# AN EMPTY MESSAGES FILE.  BETTER SAFE THAN SORRY.
#
CHKMSGLEN="TRUE"			# MAKE SURE MSG FILE IS NON-ZERO LEN
MSGS="NOTICE WARNING"			# (YELLOW) MESSAGES TO WATCH FOR 
PAGEMSG="NOTICE"			# (RED) PAGE IF WE SEE THIS MESSAGE
IGNMSGS=""              # List of messages to ignore if string(s) matches line
                        # delimit each message with ;
export MSGS PAGEMSG IGNMSGS CHKMSGLEN

# 
# PATH TO WEB SERVER DISPLAY
# INSERT THE PATH TO YOUR BBDISPLAY WEB SERVER
# THIS IS USED ONLY IF YOU USE HTMLized STATUS LOGS
#
BBWEB="&BBWEB"
export BBWEB

BBWEBHTMLLOGS="${BBWEB}html/"
export BBWEBHTMLLOGS


#
# Default colors to send notification messages on
#
PAGELEVELS="red purple"                 # Default red purple
                                        # purple is always sent by the
                                        # BBDISPLAY. Clients shouldn't
                                        # send purple
export PAGELEVELS                       # Will be overidden in bbinc.sh
                                        # with values found in
                                        # etc/bbwarnsetup.cfg

#
# GENERATE WEB BASED HISTORY OR USE HISTORY LOG FILE
#
WEBHISTORY="TRUE"			# TRUE will show a web display for history
					# otherwise just the text history log
BBHIST_IGNOREBLUE=FALSE			# Don't count down time from BLUE
export WEBHISTORY BBHIST_IGNOREBLUE

#
# URL OF THE CGI SCRIPTS
#
CGIBINURL="&CGIBINURL"			# e.g. http://myhost/cgi-bin
export CGIBINURL

#
# SAVE THE NEW STATUS LOG IF IT CHANGES THE COLOR ?
# THEY ARE STORED IN www/histlogs
#
SAVESTATUSLOG="TRUE"
export SAVESTATUSLOG

#
# BB creates a static HTML page for every incoming status ?
# Otherwise, the status is generated with $CGIBINURL/bb-hostsvc.sh dynamically
# values: STATIC/DYNAMIC/TEXT
# STATIC - create an HTMLized status log, reverts to TEXT if www/html directory
# 		is missing or unwritable
# DYNAMIC - create a HTMLized status log on the fly when the admin clicks on
# 		the colored dot in bb.html/bb2.html
# TEXT - A simple text page will be displayed
# 
BBLOGSTATUS="STATIC"
export BBLOGSTATUS

# 
# HOW LONG BEFORE SENDING A PURPLE REPORT
# 

PURPLEDELAY="-30"	# THIS MUST BE A NEGATIVE VALUE !!!
export PURPLEDELAY
if [ "$PURPLEDELAY" != "" -a "$PURPLEDELAY" -gt 0 ]
then
	echo "PURPLEDELAY ($PURPLEDELAY) should be a negative value !!!"
fi

# Do you want clear dots for noping directive  & 0.0.0.0 hosts ?
# Set this to anything but TRUE and no clear dots will be
#  generated for hosts=0.0.0.0 and hosts with the noping directive
# You can leave this to TRUE and you can disable the clear button
# individually (by host) using the noconn directive on the host's line
NOPINGCLEAR="TRUE"
export NOPINGCLEAR

# Do you want to see your failed IP tests (done in bb-network.sh)
# to be displayed with a red dot or a clear dot
# *** ONLY *** if the connectivity to that host failed.
IPTEST_2_CLEAR_ON_FAILED_CONN="TRUE"
export IPTEST_2_CLEAR_ON_FAILED_CONN

# Specify scripts to execute while running bb-hist.sh
# Echo from them will be displayed on the generated web page
BBHISTEXT=""
export BBHISTEXT

# Specify scripts to execute while running mkbb.sh/mkbb2.sh
# Echo from them will be displayed on the generated web page
BBMKBBEXT=""
BBMKBB2EXT="eventlog.sh"
export BBMKBBEXT BBMKBB2EXT

# Do we keep historical info by host ? for all ?
BBHOSTHISTLOG=TRUE
BBALLHISTLOG=TRUE
export BBHOSTHISTLOG BBALLHISTLOG

#
# Can summaries set the background color
#
SUMMARY_SET_BKG=TRUE
export SUMMARY_SET_BKG

. ${BBHOME}/etc/bbsys.sh		# INCLUDE SYSTEM DEFINITIONS
. ${BBHOME}/etc/bbinc.sh		# INCLUDE BB DEFINITIONS

export FQDN DF MSGFILE LYNX
