# $SPONGSLEEP{'spong-server'} = 120; # values to override the 'DEFAULT'
# $SPONGSLEEP{'spong-client'} = 300; # with the named program
-$SPONGSERVER = "spong-server.aci.alltel.com";
+$SPONGSERVER = "spong-server.my-ink.com";
$SPONGDB = "/usr/local/spong/var/database";
$SPONGTMP = "/usr/local/spong/tmp";
$SPONG_UPDATE_PORT = 1998;
$WWW_DEFAULT_VIEW = "GROUPS";
# Date and time format strings. These are strftime() format variables
-$DATETIMEFMT = "%c";
-$DATEFMT = "%m/%d/%y";
-$TIMEFMT = "%H:%M:%S";
-
+$DATEFMT = "%m/%d/%y"; # MM/DD/YY
+$TIMEFMT = "%H:%M:%S"; # HH:MM:SS
+$TIMEFMTNOSEC = "%H:%M"; # HH:MM
+$DATETIMEFMT = "%c"; # scalar localtime() format
$WWW_TITLE_COLOR = "#9999ff"; # Background color for table title cells
$WWW_CELL_COLOR = "#cccccc"; # Background color for table detail cells
},
);
-1;
+# %HOSTS_DEFAULTS is used to establish default configuration values for
+# various spong network checks. Any value in the %HOSTS entry will override
+# the %HOSTS_DEFAULT value.
+
+%HOSTS_DEFAULTS = (
+);
+
+# %HOSTS_ALL is used to define values that will used/checks in the spong
+# network checks. %HOST_ALL values are not the same are %HOSTS_DEFAULTS
+# entries. A value defined in a %HOST entry will override the same entry
+# defined in $HOSTS_DEFAULTS. Values in %HOSTS_ALL are added the list of
+# even if there are no values found.
+
+%HOSTS_ALL = (
+);
+
+1; # Don't remove me
If set to I<1>, B<spong-network> will log errors to the syslog using the
I<USER> facility and the I<ERR> priority.
+=item $TIMEFMT
+
+A string that contains strftime() presentation symbols for formatting time
+displays which have hours, minutes and seconds. The default is "%H:%M:%S".
+
+=item $TIMEFMTNOSEC
+
+A string that contains strftime() presentation symbols for formatting time
+displays which have hours and minutes. The default is "%H:%M".
+
+=item $DATEFMT
+
+A string that contains strftime() presentation symbols for formatting date
+displays. The default is "%m/%d/%y" (i.e numeric month / numeric day /
+ year w/o century ).
+
+=item $DATETIMEFMT
+
+A string that contains strftime() presentation symbols for formating a full
+date and time display. The default is "%c" (preferred date and time
+representation for the current locale. And alternate format might be
+"$DATEFMT, $TIMEFMT".
+
=back
=head2 spong-server
print " "x(9-length(substr( $self->services(), 0, 7 )));
if( $d1 == $d2 && $m1 == $m2 && $y1 == $y2 ) {
- $date = POSIX::strftime( "%H:%M", localtime($self->end()) );
+ $date = POSIX::strftime( $main::TIMEFMTNOSEC, localtime($self->end()) );
} else {
- $date = POSIX::strftime( "%D", localtime($self->end()) );
+ $date = POSIX::strftime( $main::DATEFMT, localtime($self->end()) );
}
print $date, " "x(12-length($date));
($format eq "standard" && $event->time() > (time() - 7*$day)) ||
($format eq "full" && $event->time() > (time() - 31*$day)) ) {
- my $dstr = POSIX::strftime( "%A, %D", localtime($event->time()) );
+ my $dstr = POSIX::strftime( "%A, $main::DATEFMT", localtime($event->time()) );
if( $dstr ne $date ) {
if( $date ne "" ) { print "\n"; }
print "$dstr\n", "-"x78, "\n";
($format eq "standard" && $event->time() > (time() - 7*$day)) ||
($format eq "full" && $event->time() > (time() - 31*$day)) ) {
- my $dstr = POSIX::strftime( "%A, %D", localtime($event->time()) );
+ my $dstr = POSIX::strftime( "%A, $main::DATEFMT", localtime($event->time()) );
if( $dstr ne $date ) {
if( $date ne "" ) { print "</table><br>"; }
print "$dstr\n<hr border=1 noshade>\n";
print " problem: $prob ";
if( $summ ) { print "($summ)\n"; } else { print "\n"; }
if( $time ) {
- print " updated: ", POSIX::strftime( "%H:%M, %D", localtime($time) );
+ print " updated: ", POSIX::strftime( "$main::TIMEFMTNOSEC, $main::DATEFMT", localtime($time) );
print "\n";
}
print " contact: $human ($email)\n";
# if( $summ ) { print "$spacer summary: $summ<br>\n"; }
if( $time ) {
print "$spacer updated: ";
- print POSIX::strftime( "%H:%M, %D", localtime($time) ), "<br>\n";
+ print POSIX::strftime( "$main::TIMEFMTNOSEC, $main::DATEFMT", localtime($time) ), "<br>\n";
}
if ( $main::WWWCONTACT ) {
print $color, " "x(9-length($color));
if( $d1 == $d2 && $m1 == $m2 && $y1 == $y2 ) {
- $date = POSIX::strftime( "%H:%M", localtime($self->rtime()) );
+ $date = POSIX::strftime( $main::TIMEFMTNOSEC, localtime($self->rtime()) );
} else {
- $date = POSIX::strftime( "%D", localtime($self->rtime()) );
+ $date = POSIX::strftime( $main::DATEFMT, localtime($self->rtime()) );
}
print $date, " "x(11-length($date));
print "<td align=center valign=top nowrap>";
if( $d1 == $d2 && $m1 == $m2 && $y1 == $y2 ) {
- print POSIX::strftime( "%H:%M", localtime($self->rtime()) ), " ";
+ print POSIX::strftime( $main::TIMEFMTNOSEC, localtime($self->rtime()) ), " ";
} else {
- print POSIX::strftime( "%D", localtime($self->rtime()) ), " ";
+ print POSIX::strftime( $main::DATEFMT, localtime($self->rtime()) ), " ";
}
print "</td>\n";
print "</tr></table><p>";
print "<b>Updated:</b> ";
- print POSIX::strftime( "%H:%M, %D", localtime($self->rtime()) );
+ print POSIX::strftime( "$main::TIMEFMTNOSEC, $main::DATEFMT", localtime($self->rtime()) );
print "<br><b>Duration:</b> ";
print $self->format_duration($self->stime(),$self->rtime());
&problems( $group );
print "<p><hr><a href=\"$me/groups\">Group</a>: <b>$gname</b>\n<hr>\n";
- print "Updated at ", POSIX::strftime( "%H:%M, on %D", localtime() ), "\n";
+ print "Updated at ", POSIX::strftime( "$TIMEFMTNOSEC, on $DATEFMT", localtime() ), "\n";
&footer();
}
print "<p><hr>";
# print "<a href=\"$me/groups\">Group</a>: <b>$gname</b>\n<hr>\n";
- print "Updated at ", POSIX::strftime( "%H:%M, on %D", localtime() ), "\n";
+ print "Updated at ", POSIX::strftime( "$TIMEFMTNOSEC, on $DATEFMT", localtime() ), "\n";
&footer();
}