# This is my spong.conf file for my Demo/Testing Spong site at monsters.org.
# I've made it available to everyone to see how I did it.
#
# NOTE:
# For those looking for the sysquery.pl or the System Summary scripts
# in Spong, they are not in there. System Summary (syssymm) is a seperate
# package. It is also hosted on SourceForge.net
# (http://sourceforge.net/projects/syssumm/
# ---------------------------------------------------------------------------
# Generic SPONG settings, specifies where files are kept, etc...
# ---------------------------------------------------------------------------
$SERVICELISTFIX = 0;
$HOSTGROUPALL = 0;
# This controls the a Spong Display client's default view
$SPONG_DEFAULT_VIEW = "OVERVIEW"; # Can be HOSTS, GROUPS
$WWW_DEFAULT_VIEW = "GROUPS"; # Can be HOSTS, GROUPS
$SPONG_SERVER_ALARM = 10;
$SPONGSLEEP{'DEFAULT'} = 300;
$SPONGSLEEP = 300;
$SPONGSERVER = "zero.monsters.org";
$SPONGDB = "/usr/local/spong/var/database";
$SPONGTMP = "/usr/local/spong/tmp";
$SPONG_UPDATE_PORT = 1998;
$SPONG_QUERY_PORT = 1999;
#$SPONG_BB_UPDATE_PORT = 1984;
#$SPONG_CLIENT_PORT = 2000;
$SPONG_LOG_FILE = 1;
$SPONG_LOG_SYSLOG = 0;
# Keep status updates which cause generate an event (i.e. change of status)
# (Note: This option generate large amounts of data. Use with caution.)
$STATUS_HISTORY = 1;
# Number of frames to use in Web Displays
$WWWFRAMES = 3; # Can be 2 or 3, defaults to 2
# Set to show long host names on Host Summary web display
$WWW_FQDN = 1;
$WWWGIFS = "/spong/images";
$WWWDOCS = "/spong/docs";
$WWWHTML = "/usr/local/spong/www/html";
$WWWSPONG = "/spong/www-spong";
$WAPSPONG = "/spong/wap-spong";
$WWWACK = "/spong//www-spong-ack";
$WWWCONTACT = "/spong/cgi-bin/page";
undef $WWWCONTACT;
# Customized link(s) that can be added to the Host Display (right frame)
#$WWW_ACTIONBAR_CUSTOM =
# "Machine Info";
$WWW_ACTIONBAR_CUSTOM = '
Charts ||
Summary';
# Customizable link that can be added to Host Problems displays (left frame)
$WWW_PROB_ACTIONBAR = $WWW_ACTIONBAR_CUSTOM; # Default to Host Display
# actionbar
# Customizable action bar of Title Frame (only if $WWWFRAMES = 3)
$WWW_TITLE_ACTIONBAR =
# ' Extended ActionBar: ' .
#' | ' .
#' Spong RRD Charts ' .
#' || System Summaries' .
#' || spong.conf' .
#' || spong.hosts' .
#' || spong.groups';
'
' .
''
;
$WWW_TITLE_SIZE = "80";
$WWW_TITLE_COLOR = "#ccccff";
$WWW_CELL_COLOR = "#cccccc";
$WWW_USE_IMAGES = 1;
$WWW_COLOR{"red"} = "#cc0000";
$WWW_COLOR{"yellow"} = "#ffff00";
$WWW_COLOR{"green"} = "#339900";
$WWW_COLOR{"purple"} = "#990099";
$WWW_COLOR{"blue"} = "#0000ff";
$WWW_COLOR{"clear"} = "#999999";
@WWW_REFRESH_ALLOW = ( '192.2.*' );
@WWW_REFRESH_DENY = ( '.*' );
# Date and time format strings. These are strftime() format variables
$DATEFMT = "%m/%d/%y";
$TIMEFMT = "%H:%M:%S";
$TIMEFMTNOSEC = "%H:%M";
$DATETIMEFMT = "%b %d %H:%M:%S %Y";
# ---------------------------------------------------------------------------
# spong-cleanup parameters
# ---------------------------------------------------------------------------
$SPONG_ARCHIVE = "/usr/local/spong/var/archives"; # Where to put the old
# history entries
$OLD_SERVICE = 3; # How many days to keep stale status reported before
# removal
$OLD_HISTORY = 7; # How many days of history to keep for each host
# ---------------------------------------------------------------------------
# spong-network settings
# ---------------------------------------------------------------------------
$CRIT_WARN_LEVEL = 3;
$RECHECKSLEEP = 5;
# ---------------------------------------------------------------------------
# Thresholds, season to taste. These can be overridden on a host by host
# case in a spong.conf. file.
# ---------------------------------------------------------------------------
$CHECKS = 'disk cpu processes logs files'; # The client checks to run
$MAILQWARN = 80;
$MAILQCRIT = 100;
@DFIGNORE = ( "cd\d", "cdrom", ":" ); # List of raw fs's to ignore (regex)
$DFWARN{"ALL"} = 90; # Size to warn (yellow) on
$DFCRIT{"ALL"} = 95; # Size to panic (red) on
$DFWARN{"/usr"} = 95; # Some specifics...
$DFCRIT{"/usr"} = 98;
$DFWARN{"page"} = 50;
$DFCRIT{"page"} = 80;
$CPUCRIT = 5.0; # Panic at load avg of 5.0
$CPUWARN = 3.0; # Warn at load avg of 3.0
@PROCSWARN = ("ntpd");
@PROCSCRIT = ("sendmail","httpd","sshd","named","spong-network");
# $LOGWARN{"/var/log/messages"} = [ "WARNING" ];
# $LOGCRIT{"/var/log/messages"} = [ "NOTICE" ];
# New Logmon configure syntax.
# The Syntax is must more complex that the old code, but it is inifinity more
# configurable.
#
# The top level varable ($LOGCHECKS) is a list of anonymous hashes
# (i.e. $LOGCHECKS is list of references to hashes).
#
# $LOGCHECKS = [ {hash}, {hash}, ];
#
# Each hash look like the following:
#
# { logfile =>'/var/adm/messages',
# checks => [
# { pattern =>'WARNING:(.*)', # Perl RegExp to look fo
# status =>'red', # Color to report 'green',
# # 'yellow',or 'red'
# duration =>60, # Number of minutes to report
# # events
# text =>'WARNING: $1', # Detail text to display. You
# # can use position var from
# # the regexp in the pattern
# },
# { pattern =>'SU\s+(\S+)',
# status =>'yellow',
# duration =>10,
# text =>'SU to user $1',
# id =>'SU', # The id field is optional. It
# # is used to assign an internal
# # key to events. Normally the
# # the text field is used as the
# # key. The is field can used to
# # collapse multiple events to 1.
# },
$LOGCHECKS = [ { 'logfile' => '/var/log/messages',
'checks' => [ { pattern=>'WARNING:(.*)',
status=> 'red',
duration=>60,
text=>'WARNING: $1',
},
],
}
];
# ---------------------------------------------------------------------------
# More configuration information - these variables are for the spong-network
# program, where the ones above are for the spong-client programs.
# ---------------------------------------------------------------------------
$HTTPDOCS{"ALL"} = [ "/index.html" ];
$HTTPPORT{"ALL"} = 80;
# $HTTPDOCS{"sprite.its.uiowa.edu"} = [ "/index.html" ];
$HTTPURLS{"DEFAULT"} = [ 'http://_HOST_/'];
#$HTTPURLS{"mail.k12.ar.us"} = [ 'http://_HOST_:80/xxx.html',
# 'list.k12.ar.us/index.html',
# 'http://mail.k12.ar.us:80/webmail/login.php3',
# ];
# ---------------------------------------------------------------------------
# Just a little more configuration information - these variables are for
# the spong-message program.
# ---------------------------------------------------------------------------
$SEND_MESSAGE = "RED-CHANGE"; # Can be RED, or CHANGE
# or RED-CHANGE or NONE;
$MESSAGES_PER_HOUR = 10000;
$IDENT_MESSAGES_PER_HOUR = 10000;
1; # I'm a file that gets included in perl code - leave this 1 here...
# ---------------------------------------------------------------------------
# OS Specific variables. A few external programs are used by spong-client,
# spong-network, and spong-message. Chances are these differ from OS to OS.
# A couple of things to watch for.
#
# $DF Your df command should output %used as the first column with a '%'
# $PS You really want you ps command to return sorted via CPU usage
# $PING Make sure your ping command only pings a finite number of times
# ---------------------------------------------------------------------------
$DF = "/usr/bin/df";
$LSPS = "/etc/lsps -s";
$UPTIME = "/usr/bin/uptime";
$PS = "/usr/bin/ps -eF \"pcpu time vsz pid ruser args\" | /usr/bin/sort -r";
$GREP = "/usr/bin/egrep";
$PING = "/usr/sbin/ping -n -c 2 HOST";
$TRACEROUTE = "/usr/bin/traceroute";
$SENDMAIL = "/usr/sbin/sendmail -t";
$SENDMAILMQ = "/usr/sbin/sendmail -bp";
$RPCINFO = "/usr/bin/rpcinfo -u";
$NTPDATE = "/usr/sbin/ntpdate -q";
1; # I'm a file that gets included in perl code - leave this 1 here...
# ---------------------------------------------------------------------------
# OS Specific variables. A few external programs are used by spong-client,
# spong-network, and spong-message. Chances are these differ from OS to OS.
# A couple of things to watch for.
#
# $DF Your df command should output %used as the first column with a '%'
# $PS You really want you ps command to return sorted via CPU usage
# $PING Make sure your ping command only pings a finite number of times
# and since some ping command want args after the host, put the
# word HOST where you need the host to be in your ping command
# ---------------------------------------------------------------------------
$DF = "/bin/df";
$UPTIME = "/usr/bin/uptime";
$PS = "/bin/ps ax";
$GREP = "/bin/grep";
$PING = "/bin/ping -c 2 -w 2 HOST";
$TRACEROUTE = "/usr/sbin/traceroute";
$SENDMAIL = "/usr/sbin/sendmail -t";
$MAILQ = "/usr/sbin/sendmail -bp";
$RPCINFO = "/usr/sbin/rpcinfo -u";
$DNSCMD = "/usr/bin/dig";
undef $LSPS;
# Routine to calculate swap space for Linux from /proc fs
sub get_swap {
my ( $msg, $page, $avail, $used, $total);
open (FOO,"-|") or exec "cat /proc/meminfo";
while ($msg = ) {
if ($msg =~ /Swap:\s+(\d+)\s+(\d+)\s+(\d+)/) {
($total,$used,$avail) = ($1, $2, $3);
$page = int($used / ($total) * 100);
last;
}
}
close FOO;
return ($msg, $page);
}
1; # I'm a file that gets included in perl code - leave this 1 here...