Next:
todo
Previous:
spong.message
 [Table of Contents][Index]

spongfaq



NAME

spongfaq - frequently asked questions about Spong ($Revision: 1.2 $, $Date: 2000/09/12 19:21:00 $)

DESCRIPTION

This document contains a list of the most Frequently Asked Questions (FAQ) about Spong. It is really not a HOWTO, but is in a classical Question / Answer form.

1. What is Spong?

This is hopefully a simple tool. It does not compete with Tivoli, OpenView, UniCenter, or any other commercial packages, and I have no intention of trying to turn it into one. It is not SNMP based, it communicates via simple TCP based messages. It is written in Perl, so hopefully it can be run on multiple systems

It has the following features:

2. Why doesn't my spong-client status update show up?

If your spong-client is setup and runs properly (i.e. spong-client --debug shows that the checks are being run and the results are being sent to the spong-server). Depending on how your server is setup, the full domain name of your host may not returned with the code that spong-client uses.

The spong-server has a bit of security for status update messages. The host name in the status message must match a host name defined in the spong.hosts files. spong-client uses the gethostbyname() function to try to resolve the host's full name. If it just gets the host name without the domain, spong-server will quietly reject and drop the message.

You can run the perl snippet below to determine what host name that spong-client is resolving for the machine it is running on.

   perl -MSys::Hostname -e \
       '($h) = (gethostbyname(Sys::Hostname::hostname()))[0]; print "$h\n"'
It should print out you the fully qualified domain name of your system. This should match the hostname configured in the song.hosts file on the spong-server machine. If they don't match then you can do 1 of 2 things.

In your hosts file make use that the full domain name is the first name of your host's line. i.e.

   192.168.2.34  my-host.inkcom.com my-host
Or put if your system is in your DNS server properly, make sure that 'dns' is in front of 'file' on the hosts: line of the /etc/nsswitch.conf file.

There a utility gethost-test in the /utils/ directory of the Spong distribution. You can run it on a machine to make sure that it is setup correctly to resolve it's full quality domain name. The utility is run by enter the following command perl gethost-test.

If none of the above works or can't make the changes, you still have one last resort. The spong.conf and spong.conf.<hostname> file are loaded after the $HOST variable is assigned. That mean that you can override the calculated $HOST hostname. Just added at '$HOST = "desired host name";' statement in either of the spong.conf or spong.conf.<hostname> files.

3. How do I get e-mail/paging/alpha paging/notifications to work?

The most important thing is to go through the the spong.conf manpage, the spong.hosts manpage, and the spong.message manpage configuration files. And be sure to read the documentation for the spong.conf manpage, the spong.hosts manpage the spong.message manpage, configuration files and the the spong-message manpage and the spong-server manpage programs.

If you are still having problems, follow the check list below to help resolve your problem.

  1. $SEND_MESSAGE in spong.conf
    In spong.conf make sure the $SEND_MESSAGE is set to 'RED', 'CHANGE' or 'RED-CHANGE'.

  2. $RULES_MATCH in spong.conf
    In spong.message make sure that $RULES_MATCH is set to 'ALL' or 'FIRST-MATCH'. If you set it to 'OLD', spong-message will revert to the old notification method in Spong 2.0 - 2.1.

  3. Messaging rules in spong.message
    If your are having problems with defining your rules, put in a very minimal rules set.
       $MESSAGING_RULES = [
                             {
                                contacts => [ 'sjohnson' ]
                             },
                          ];
    
    This will send everything to the 'sjohnson' contact.

  4. %HUMANS in spong.hosts
    In spong.hosts, you must define at least one contact (the %HUMANS in spong.hosts) in order to have any notifications sent. for the example rule setup above, to get e-mail sent to that user you can have an entry like:
       %HUMANS = (
          'sjohnson' => {
                          name => 'Stephen Johnson',
                          email => 'stephen.johnson@mailhost.at.my.com',
                        },
       );
    
  5. 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:
       spong-message --debug red hostname.my.com disk 98765432 'This is a test'
    
    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.

AUTHORSHIP and COPYRIGHT

Copyright (c) 1999-2000 Stephen L Johnson


[Top] Generated by Pod::HTML 0.41 on Tue Nov 21 12:31:35 2000