| Next: todo | Previous: spong.message | [Table of Contents] | [Index] |
It has the following features:
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-hostOr 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.
If you are still having problems, follow the check list below to help resolve your problem.
$MESSAGING_RULES = [
{
contacts => [ 'sjohnson' ]
},
];
This will send everything to the 'sjohnson' contact.
%HUMANS = (
'sjohnson' => {
name => 'Stephen Johnson',
email => 'stephen.johnson@mailhost.at.my.com',
},
);
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.