$Id: new-faq.m4,v 1.1 2003/06/02 15:33:49 trockij Exp $
This is the FAQ (Frequently Asked Questions) for the "mon" service
monitoring package. It contains both general and technical information
about mon.
No, it does not. SATAN includes the "fping" and
"tcp_scan" utilities, which the fping, tcp, and telnet
monitors used to use. The dependencies on these
SATAN modules have since been removed. fping is available
as a separate package from mon, and can be found on
kernel.org.
Section 2 - Where to get information
2.1 Where can I get everything that I need for "mon"?
Perl and Perl modules are available from your nearest
CPAN archive.
1.4 When I compile fping-2.2b1 under Linux, I get these
errors:
fping.c:216: conflicting types for sys_errlist
/usr/include/stdio.h:221: previous declaration of sys_errlist
make: *** [fping.o] Error 1
Comment out line 221 in fping.c, since it's a re-declaration
of an extern in stdio.h.
1.5When I run "mon" on Solaris, the daemon appears to start, but
clients hang.
Chances are mon hasn't started at all, and the clients are connecting
to something running on the old mon port of 32777. Check /usr/adm/messages
for a message from mon which says "Could not bind TCP server port".
"mon" has been assigned a port of 2583 by the IANA. If you're running
an older version of mon (0.37), then you should change the default
port from 32777 to 2583 by editing the code in the server (change
"$SERVPORT = 32777" to "$SERVPORT = 2583") and the clients.
You need to apply the patches available from
ftp://sunsite.unc.edu/pub/Linux/system/network/admin
in order for satan to build and work properly. This is really
worth doing, because fping is a huge win when you have
a group that contains a large number of hosts.
All times are stored as time(2) values, which causes no problems with
year 2000. All time calculations are done using these values (it would
be much trouble to do them otherwise).
1.9 When I run mon on RedHat 5.x, I get lots of syntax errors.
The *.ph files generated by h2ph under RedHat 5.x (for Intel, at least) are
broken. They have been fixed by Alan Robertson
(alanr@bell-labs.com), and are
included in his RPM of mon. This RPM is available from the main
distribution site on
ftp.kernel.org.
1.10 When I run 'mon' on Linux/Redhat 5.0 it complains about "setlogsock"
Redhat 5.0 comes with perl-5.004-1. The 'setlogsock' system call
was added in perl-5.004-3. To solve this get perl-5.004-6.i386.rpm
from the Redhat 5.1 distribution and upgrade with the command
"rpm -Uh perl-5.004-6.i386.rpm".
1.11 How do I send an alert only after a service has been down
for more than n minutes?
The "alertafter" parameter in a period definition can do (something
like) this. For example:
watch newkernel
service telnet
interval 8m
monitor telnet.monitor
period wd {Sun-Sat}
alert mail.alert mis
alertafter 3 30m
alertevery 2h
This effectively means, "alert after 3 or more failures that happen
within 30 minutes."
In the case of pinging a host, here's a neat hack:
watch hostgroup
service fping
interval 6m
monitor fping.monitor -r 4 -t 60000
period wd {Sun-Sat}
alert mail.alert mis
alertevery 1h
This makes fping return a failure for a host that doesn't
answer in 4 pings, with 60 seconds between each ping.
1.12 Can I include hostgroups inside of hostgroups?
On Mon, 12 Jan 1998, Thomas Mike Michlmayr (mike@cosy.sbg.ac.at) wrote:
> hi!
>
> i'm trying to setup mon here at our department, and one of the features i'm
> either missing or overlooking is the possibility to include hostgroups in
> a hostgroup.
>
> is this deliberatly, or just something noone thought of?
This is deliberate. I've thought about it a good bit and I decided to
not implement it in the mon config parser because it didn't make too
much sense to me. The only function that sub-hostgroups would serve is
essentially for clarity in the configuration file.
To do what you want, it would be trivial to make an m4-based
configuration, in which you define your hostgroups like this: