# See the spong.hosts man page for additional documentation.
#
-# $Id: spong.hosts,v 1.5 2000/12/20 22:04:45 sljohnson Exp $
+# $Id: spong.hosts,v 1.6 2000/12/21 22:47:55 sljohnson Exp $
#
# Don't be afraid. This is a configuration file that defines two things, 1)
# who is respondsible for systems, and how do you get ahold of them, and 2)
'web3.host.edu' => { services => 'ftp smtp http',
contact => 'unix-staff',
+ # Skip the network checks for now
+ skip_network_checks => 1,
},
'some.pc.host.edu' => { services => '',
are the list of services that will be check for each host. The I<ping> service
is prepended to the list of services unless 'noping' is defined.
+Another important attribute for a host is the
+L<skip_network_checks|spong.conf/"skip_network_check"> flag. If this flag is
+set for a host. The B<spong-network> proram will skip the check for the host.
+
=back
=head1 FILES
a list of one or more ip addresses corresponding to multiple interfaces the
machine might have.
+=item * skip_network_checks
+
+a flags (values 1 or 0) to tell the L<spong-network> program to skip the
+network checks for this host.
+
=back
The I<services> attribute is a string listing the network modules to run
The I<ip_addr> attribute is a list (well reference to one anyway) of IP
address that the machine responds to.
+The I<skip_network_checks) flag be used to temporarily disable the network
+checks for one or more hosts. The hosts can stll received spong-client status
+updates. And the historical network information for the hosts is available.
+This is useful when the hosts are being renamed or re-networked over an
+extended period of time.
+
Additional attributes can be added into I<%HOSTS> entries. These attributes
-can be used for any external program of additional modules that you have
+can be used for any external program or additional modules that you have
added to your Spong installation. All of the Spong programs will ignore any
attributes that they don't recognize.
=head1 NAME
-spongfaq - frequently asked questions about Spong ($Revision: 1.2 $, $Date: 2000/09/12 19:21:00 $)
+spongfaq - frequently asked questions about Spong ($Revision: 1.3 $, $Date: 2000/12/21 22:47:56 $)
=head1 DESCRIPTION
=item 1. Testing messaging rules
-You can test your $MESSAGING_RULES defined in spong.message by running
-spong-message in debugging mode to see what is happening step by step:
+If you have a problem with your messaging rules, The spong-message program has
+a debugging and test mode. These modes will allow you to check, test and tweak
+your messaging rules in spong.message.
- spong-message --debug red hostname.my.com disk 98765432 'This is a test'
+Run the spong-message program from a command line as follows:
+
+ spong-message --debug --test color host service `perl -e "print time()"` \
+ 'This is a test.'
+
+The --debug flag will output a large amount of detailed output about what the
+program is doing. The --test flag if the test mode flag. Spong-message will do
+everyting but send out the notifications.
+
+color = status color - green, yellow, or red
+hostname = a hostname from your spong.hosts file
+service = a service name that you are testing.
+
+The back-ticked perl expression just prints the current system time in epoch
+format. And the "The is a test." field is the summary message from a status
+update message.
+
+The --debug output is very detailed about every step that the spong-message
+program is doing. You may need to redirect the output to a file in order to
+look at.
+
+Spong Message will detail step-by-step all of the matched it attempts and the
+resultsand actions of those matches. It will refer to rules by an index number
+starting with the number zero (0) for the first rule.
+
+To test days and times ranges your will need to caculate a specific date/time
+into an epoc or calender time format to feed it to spong-message. You can use
+this short perl code snippet to do it.
+
+ perl -MPOSIX -e 'print mktime( sec, min, hour, day, (month - 1) , \
+ (year - 1900) ), "\n"'
+
+The time is in 24 hour format and the year is the 4 digit year. This will
+print a large number. Use the number in place of the back-ticked perl
+expression on spong-message command.
-This will generate a lot of verbose output. You might want to redirect
-it to a file. spong-message counts rules starting with 0 just to be forewarned.
=back
# (2) Converted checks to new plugin mechanism (Stephen Johnson May 28, 1999)
# Added user-configurable escalation mechanism
#
-# $Id: spong-network.pl,v 1.27 2000/12/19 20:01:57 sljohnson Exp $
+# $Id: spong-network.pl,v 1.28 2000/12/21 22:47:56 sljohnson Exp $
use Carp;
use lib "@@LIBDIR@@";
foreach $host ( @HOSTS_LIST ) {
&debug( "checking network services on $host" );
+ if( $HOST{$host}{'skip_network_checks'} ) {
+ &debug('skipping network checks');
+ next;
+ }
+
my $stopafter = 0;
foreach $_ ( split(/\s+/,$HOSTS{$host}->{'services'}) ) {
# ok...if the check has a : on the end, then stop if it