Spong Frequently Asked Questions
This document contains a list of the most Frequenly Asked Questions
(FAQ) about Spong. It is really not a HOWTO, but is in a classical Question
/ Answer form.
1. What is Spong?
2. Why doesn't my spong-client status updates
show up on the spong-server?
3. How do I get e-mail/paging/alpha
paging/notifications to work?
1. What is Spong?
his is a simple system monitoring package called spong. It has the
following features:
-
client based monitoring (CPU, disk, processes, logs, etc...)
-
monitoring of network services (smtp, http, ping, pop, dns, etc...)
-
grouping of hosts (routers, servers, workstations, PCs)
-
rules based messaging when problems occur
-
configurable on a host by host basis
-
results displayed via text or web based interface
-
history of problems
-
verbose information to help diagnosis problems
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 (including NT - although it has not been ported yet -
but is on the todo list).
2. Why doesn't my spong-client status update
show up on the spong-server
If your spong-client is setup and runs properly (i.e. spong-client --debug
shows that the ehcks are being run and the results are being sent to the
spong-server). Depending on how your server is setu, 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 macine. 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'.
3. How do I get e-mail/paging/alpha
paging/notifications to work?
The most important thing is to go through the spong.conf, spong.hosts,
and spong.messge configuration files. And be sure to read the documention
for spong.conf, spong.hosts,
spong.message,
configuration files and the spong-message
and
spong-server programs.
If your are still having problems, follow the check list below to help
resolve your problem.
-
In spong.conf make sure the $SEND_MESSAGE is set to 'RED', 'CHANGE' or
'RED-CHANGE'.
-
.In spong.mesage make sure that $RULES_MATCH is set to 'ALL' or 'FIRST-MATCH'.
If you set it to 'OLD', spong-message will revert to an old notification
method.
-
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.
-
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',
},
);
-
And you can test your $MESSAGING_RULES defined in spong.message, your can
run 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 to a file. spong-message counts rules starting with 0 just to be forewarned.
AUTHOR
Stephen L Johnson (stephen.johnson@mail.state.ar.us)
or (sjohnson@monsters.org),
Unix System Administator, DIS - State of Arkansas
Based on code/ideas from Sean MacGuire (BB), and Helen Harrison (Pong).