mon-commit Mailing List for mon (Page 11)
Brought to you by:
trockij
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(36) |
Jul
(21) |
Aug
(9) |
Sep
(1) |
Oct
(2) |
Nov
(12) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(4) |
Feb
(10) |
Mar
(5) |
Apr
(22) |
May
(17) |
Jun
(3) |
Jul
(4) |
Aug
(10) |
Sep
(2) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
2006 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
(2) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(22) |
Jun
(19) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2008 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(7) |
Nov
(1) |
Dec
|
2009 |
Jan
(2) |
Feb
(9) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
(65) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David N. <vi...@us...> - 2005-02-19 17:47:49
|
Update of /cvsroot/mon/mon-contrib/monitors/tftp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11277/tftp Log Message: Directory /cvsroot/mon/mon-contrib/monitors/tftp added to the repository |
From: David N. <vi...@us...> - 2005-02-19 17:43:38
|
Update of /cvsroot/mon/mon-contrib/monitors/udp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10471 Added Files: udp.monitor Log Message: Adding udp.monitor, udp equivelant of tcp.monitor. --- NEW FILE: udp.monitor --- #!/usr/bin/perl -w # # try to connect to a particular # port on a bunch of hosts. For use with "mon". # # Arguments are "[-p port] [-t timeout] [-r local-port] host [host...]" # # David Nolan, vi...@cm... # based on tcp.monitor by Jim Trocki, tr...@tr... # # $Id: udp.monitor,v 1.1 2005/02/19 17:43:21 vitroth Exp $ # # Copyright (C) 1998, Jim Trocki # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # use Getopt::Std; use Socket; use Sys::Hostname; my %opt; getopts ("p:r:t:", \%opt); my $PORT = $opt{"p"} || 23; my $TIMEOUT = $opt{"t"} || 10; my $RECVPORT = $opt{"r"}; my @failures = (); my @detail = (); my $ALARM = 0; foreach my $host (@ARGV) { my $pro = getprotobyname ('udp'); if (!defined $pro) { die "could not getprotobyname\n"; } if (!defined socket (S, PF_INET, SOCK_DGRAM, $pro)) { die "could not create socket: $!\n"; } my $a = inet_aton ($host); if (!defined $a) { push @failures, $host; push @detail, "$host could not inet_aton"; close (S); next; } my $sin = sockaddr_in ($PORT, $a); if (!defined $sin) { push @failures, $host; push @detail, "$host could not sockaddr_in"; close (S); next; } if (defined $RECVPORT) { $iaddr = gethostbyname(hostname()); $paddr = sockaddr_in($RECVPORT, $iaddr); $res = bind(S, $paddr); if (!$res) { push @failures, $host; push @detail, "$host: Could not bind to local port $RECVPORT"; close (S); next; } } my ($r, $from); eval { local $SIG{"ALRM"} = sub { die "alarm\n" }; alarm $TIMEOUT; send (S, "", 0, $sin); $from = recv(S, $r, 1, 0); alarm 0; }; if ($@) { push @failures, $host; if ($@ eq "alarm\n") { push @detail, "$host timeout"; } else { push @detail, "$host interrupted syscall: $!"; } close (S); next; } if (!defined $r) { push @failures, $host; push @detail, "$host no udp response packet received: $!"; close (S); next; } my ($fromport, $fromaddr) = sockaddr_in($from); if ($fromport != $PORT || $fromaddr ne $a) { push @failures, $host; my $fromhost = gethostbyaddr($fromaddr, AF_INET); push @detail, "response received from $fromhost:$fromport, instead of $host:$PORT"; next; } if (!defined close (S)) { push @failures, $host; push @detail, "$host could not close socket: $!"; next; } } if (@failures == 0) { exit 0; } print join (" ", sort @failures), "\n"; print "\n", join ("\n", @detail), "\n"; exit 1; |
From: David N. <vi...@us...> - 2005-02-19 17:42:54
|
Update of /cvsroot/mon/mon-contrib/monitors/udp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10372/udp Log Message: Directory /cvsroot/mon/mon-contrib/monitors/udp added to the repository |
From: David N. <vi...@us...> - 2005-02-19 17:38:49
|
Update of /cvsroot/mon/mon-contrib/monitors/kerberos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9524 Added Files: krb5.monitor krb5.monitor.README Log Message: Added kerberos 5 test script. --- NEW FILE: krb5.monitor.README --- # This script will attempt to get Kerberos 5 tickets from one or more kerberos # KDCs. Requires Authen::Krb5. # # The user name, password, and realm can all be specified on the # commandline, or they can be read from the monitor-auth.cf file in the mon # config base directory. Matching entries in monitor-auth.cf will look like: # # *:*:user=username # *:*:password=password-string # *:*:realm=EXAMPLE.COM # # (Where *:* can be replaced with group:service, group:* or *:service, which # allows you to define different settings for different hostgroups/services. # # A temporary kerberos config file will need to be written to disk in order # to test the servers independently. The mon state dir will be used, or you # can specify a directory on the command line. # # Arguments: # [--directory dir] [--user user] [--password password] # [--realm realm] hostname [...] # # Script Author: Carnegie Mellon University, Computing Services # Technical Contact: ne...@an... --- NEW FILE: krb5.monitor --- #!/usr/bin/perl # # This script will attempt to get Kerberos 5 tickets from one or more kerberos # KDCs. Requires Authen::Krb5. # # The user name, password, and realm can all be specified on the # commandline, or they can be read from the monitor-auth.cf file in the mon # config base directory. Matching entries in monitor-auth.cf will look like: # # *:*:user=username # *:*:password=password-string # *:*:realm=EXAMPLE.COM # # (Where *:* can be replaced with group:service, group:* or *:service, which # allows you to define different settings for different hostgroups/services. # # A temporary kerberos config file will need to be written to disk in order # to test the servers independently. The mon state dir will be used, or you # can specify a directory on the command line. # # Arguments: # [--directory dir] [--user user] [--password password] # [--realm realm] hostname [...] # # # Script Author: Carnegie Mellon University, Computing Services # Technical Contact: ne...@an... # Copyright (c) 2002 Carnegie Mellon University. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # 3. The name "Carnegie Mellon University" must not be used to endorse or # promote products derived from this software without prior written # permission. For permission or any legal details, please contact: # Office of Technology Transfer # Carnegie Mellon University # 5000 Forbes Avenue # Pittsburgh, PA 15213-3890 # (412) 268-4387, fax: (412) 268-7395 # tec...@an... # # 4. Redistributions of any form whatsoever must retain the following # acknowledgment: "This product includes software developed by Computing # Services at Carnegie Mellon University (http://www.cmu.edu/computing/)." # # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, # IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. use IO::File; use Authen::Krb5; use Getopt::Long; use strict 'refs'; use strict 'subs'; $result = GetOptions(\%opt, 'debug', 'dir=s', 'user=s', 'password=s', 'realm=s'); die "Usage: $0 [--directory dir] [--user user] [--password password]\n [--realm realm] hostname [...]\n" if (!$result); @failures = (); @report = (); $user = $opt{user}; $password = $opt{password}; $realm = $opt{realm}; &parse_cf; print STDERR "Using user:$user password:$password realm:$realm\n" if ($opt{debug}); if (!$user || !$password || !$realm) { print "krb5.monitor: user/password/realm were not specified.\n"; exit -1; } foreach $kdc ( @ARGV ) { &krb5_poll( $kdc ); } if (@failures == 0) { exit 0; } print "@failures\n"; print "@report"; exit 1 if ($someok); exit 255; sub parse_cf { my (%users, %passwords, %realms); my $g=$ENV{MON_GROUP} || 'kerberos-servers'; my $s=$ENV{MON_SERVICE} || 'krb5'; my $file = $ENV{MON_CFBASEDIR}."/monitor-auth.cf"; print STDERR "Parsing $file\n" if ($opt{debug}); if ($cf=new IO::File "<$file") { while (<$cf>) { if (/^(\S+):user\s*=\s*(\S+)$/) { $users{$1}=$2; } if (/^(\S+):password\s*=\s*(\S+)$/) { $passwords{$1}=$2; } if (/^(\S+):realm\s*=\s*(\S+)$/) { $realms{$1}=$2; } } $user ||= $users{"$g:$s"}; $user ||= $users{"$g:*"}; $user ||= $users{"*:$s"}; $user ||= $users{"*:*"}; $password ||= $passwords{"$g:$s"}; $password ||= $passwords{"$g:*"}; $password ||= $passwords{"*:$s"}; $password ||= $passwords{"*:*"}; $realm ||= $realms{"$g:$s"}; $realm ||= $realms{"$g:*"}; $realm ||= $realms{"*:$s"}; $realm ||= $realms{"*:*"}; } } sub krb5_poll { my ($kdc)=@_; my $dir= $opt{'dir'} || $ENV{"MON_STATEDIR"} || "/usr/lib/mon/state.d"; my $confdir="$dir/krb5"; my $conffile="$confdir/$kdc/krb5.conf"; my ($cli,$serv,$cc,$ret, $error, $k5c, $constant); mkdir($confdir) unless (-d $confdir); unless (-f $conffile) { $error=1; if ($realm) { mkdir "$confdir/$kdc"; $k5c=new IO::File "> $conffile"; if ($k5c) { print $k5c <<"_EOC_"; [libdefaults] default_realm=$realm default_tgs_enctypes = des-cbc-crc default_tkt_enctypes = des-cbc-crc default_etypes = des-cbc-crc default_etypes_des = des-cbc-crc clockskew = 300 checksum_type = 1 [realms] $realm = { kdc=$kdc } _EOC_ $error=0; close($k5c); } else { print STDERR "Couldn't create $conffile: $!\n" if ($opt{debug}); } } if ($error) { push @failures, $kdc; if ($realm) { push @report, "\n$kdc: MONCONFIGURATION: could not initalize new config file\n"; } else { push @report, "\n$kdc: MONCONFIGURATION: No config file\n"; } return; } } $ENV{KRB5_CONFIG}="$confdir/$kdc/krb5.conf"; Authen::Krb5::init_context(); Authen::Krb5::init_ets(); $cli=Authen::Krb5::parse_name("$user\@$realm"); unless ($cli) { push @failures, $kdc; push @report, "\n$kdc: MONCONFIGURATION: ".Authen::Krb5::error()."\n...while parsing $user\n"; Authen::Krb5::free_context(); return; } $serv=Authen::Krb5::build_principal_ext($cli); unless ($serv) { push @failures, $kdc; push @report, "\n$kdc: MONCONFIGURATION: ".Authen::Krb5::error()."\n...while generating server name\n"; Authen::Krb5::free_context(); return; } $cc=Authen::Krb5::cc_resolve("MEMORY:"); unless ($cc) { push @failures, $kdc; push @report, "\n$kdc: MONCONFIGURATION: ".Authen::Krb5::error()."\n...while getting local credentials cache\n"; Authen::Krb5::free_context(); return; } unless ($cc->initialize($cli)) { push @failures, $kdc; push @report, "\n$kdc: MONCONFIGURATION: " .Authen::Krb5::error() ."\n...while preparing local credentials cache\n"; Authen::Krb5::free_context(); return; } $ret=Authen::Krb5::get_in_tkt_with_password($cli,$serv,$password,$cc); if ($ret) { $someok=1; } else { push @failures, $kdc; $err= Authen::Krb5::error(); if ($err + 0 == Authen::Krb5::KRB5_KDC_UNREACH()) { push @report, "\n$kdc: Timed Out\n"; } elsif ($err + 0 == Authen::Krb5::KRB5_REALM_CANT_RESOLVE()) { push @report, "\n$kdc: Cannot resolve hostname\n"; } else { push @report, "\n$kdc: $err\n"; } } Authen::Krb5::free_context(); } |
From: David N. <vi...@us...> - 2005-02-19 17:35:10
|
Update of /cvsroot/mon/mon-contrib/monitors/kerberos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8723/kerberos Log Message: Directory /cvsroot/mon/mon-contrib/monitors/kerberos added to the repository |
From: David N. <vi...@us...> - 2005-02-19 16:50:45
|
Update of /cvsroot/mon/mon-contrib/monitors/dhcp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28736 Added Files: dhcp.monitor dhcp.monitor.README Log Message: Added dhcp.monitor script --- NEW FILE: dhcp.monitor.README --- # This script will verify that a DHCP server is operating. # # usage: dhcp.monitor [host ...] # # Uses Net::DHCP::Watch to send a DHCP inform message to each of the servers # listed on the command line, and then waits up to 30 seconds for a response. # # The script will determine your mon server's mac address and IP by parsing the # output of 'ifconfig eth0'. You may need to modify that logic for your # operating system. # # Depending on your OS, you may need to have your mon server *not* be using DHCP # for its own interface management, as some DHCP implementations will bind the # DHCP port and refuse to allow Net::DHCP:Watch to generate and receive its own # requests. --- NEW FILE: dhcp.monitor --- #!/usr/bin/perl -w # verify that a DHCP server is operating. # # usage: dhcp.monitor [host ...] # # Uses Net::DHCP::Watch to send a DHCP inform message to each of the servers # listed on the command line, and then waits up to 30 seconds for a response. # # The script will determine your mon server's mac address and IP by parsing the # output of 'ifconfig eth0'. You may need to modify that logic for your # operating system. # # Depending on your OS, you may need to have your mon server *not* be using DHCP # for its own interface management, as some DHCP implementations will bind the # DHCP port and refuse to allow Net::DHCP:Watch to generate and receive its own # requests. # Copyright (c) 2002 Carnegie Mellon University. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # 3. The name "Carnegie Mellon University" must not be used to endorse or # promote products derived from this software without prior written # permission. For permission or any legal details, please contact: # Office of Technology Transfer # Carnegie Mellon University # 5000 Forbes Avenue # Pittsburgh, PA 15213-3890 # (412) 268-4387, fax: (412) 268-7395 # tec...@an... # # 4. Redistributions of any form whatsoever must retain the following # acknowledgment: "This product includes software developed by Computing # Services at Carnegie Mellon University (http://www.cmu.edu/computing/)." # # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, # IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL, # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. use Net::DHCP::Watch; $Client = qx[ /sbin/ifconfig eth0 | /bin/sed 's/:/ /' | /bin/grep "inet addr" | /bin/awk '{print \$3}' ]; chomp($Client); $Ether = qx[ /sbin/ifconfig eth0 | /bin/grep HWaddr | /bin/awk '{print \$5}']; chomp($Ether); foreach $host (@ARGV) { eval { my $dhcpw = new Net::DHCP::Watch({ client => $Client, server => $host, ether => $Ether, timeout => 30, }); my $success = 0; foreach (1..3) { $dhcpw->watch(); my $s = $dhcpw->status(); if ($s->{Ok}) { $success = 1; last; } $dhcpw->unwatch(); } if (!$success) { push @failures, $host; push @longerr, "$host: DHCP INFORM request failed"; } }; if ($EVAL_ERROR && ($EVAL_ERROR =~ /Timeout/ )) { push @failures, $host; push @longerr, "$host: Request timed out."; } elsif ($EVAL_ERROR) { push @longerr, "$host: $EVAL_ERROR"; push @failures, $host; } } if (!@failures) { exit 0; } print join(" ", @failures),"\n"; print join("\n", @longerr), "\n"; exit scalar @failures; |
From: David N. <vi...@us...> - 2005-02-19 16:47:39
|
Update of /cvsroot/mon/mon-contrib/monitors/dhcp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27708/dhcp Log Message: Directory /cvsroot/mon/mon-contrib/monitors/dhcp added to the repository |
From: David N. <vi...@us...> - 2005-02-17 20:53:03
|
Update of /cvsroot/mon/mon-client/Mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25422/Mon Modified Files: Client.pm Log Message: _un_esc_str shouldn't modify an undefined input. Bug reported by Ed Ravin. Index: Client.pm =================================================================== RCS file: /cvsroot/mon/mon-client/Mon/Client.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Client.pm 18 Jun 2004 14:25:16 -0000 1.1.1.1 --- Client.pm 17 Feb 2005 20:52:49 -0000 1.2 *************** *** 1674,1677 **** --- 1674,1679 ---- my $str = shift; + return "" unless (defined($str)); + $str =~ s{\\([0-9a-f]{2})}{chr(hex($1))}eg; |
From: David N. <vi...@us...> - 2005-02-17 14:07:48
|
Update of /cvsroot/mon/mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19276 Modified Files: mon Log Message: Fixed a bug with auto detection of *bsd OS's, for syslog configuration. (Patch from Ed Ravin.) Added support for -M to take an optional argument to specificy the path to the m4 executable. (Idea from Peter Wirdemo) Replaced Getopt::Std with Getopt::Long, and fixed some bugs with option processing. -k was documented but not processed. -O and -o were processed but not used. -k now works, -O now works, -o has been removed. Index: mon =================================================================== RCS file: /cvsroot/mon/mon/mon,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mon 15 Nov 2004 14:45:16 -0000 1.10 --- mon 17 Feb 2005 14:07:39 -0000 1.11 *************** *** 38,42 **** # modules in the perl distribution # ! use Getopt::Std; use Text::ParseWords; use POSIX; --- 38,42 ---- # modules in the perl distribution # ! use Getopt::Long qw(:config no_ignore_case); use Text::ParseWords; use POSIX; *************** *** 204,208 **** # argument parsing # ! getopts ("fhMSvda:A:b:B:c:D:i:l:L:m:O:o:p:P:r:s:t:", \%opt); # --- 204,238 ---- # argument parsing # ! my $getopt_result = GetOptions(\%opt, ! qw/ ! A|authfile=s ! B|cfbasedir=s ! D|statedir=s ! L|logdir=s ! M|m4:s ! O|syslogfacility=s ! P|pidfile=s ! S|stopped ! a|alertdir=s ! b|basedir=s ! c|configfile=s ! d|debug ! f|fork ! h|help ! i|sleep=i ! k|maxkeep=i ! l|loadstate:s ! m|maxprocs=i ! p|port=i ! r|randstart=s ! s|scriptdir=s ! t|trapport=i ! v|version ! /); ! ! if (!$getopt_result) { ! usage(); ! exit; ! } # *************** *** 230,234 **** } ! if ($^O eq "linux" || $^O =~ /^(open|free|net)bsd\$/ || $^O eq "aix") { Sys::Syslog::setlogsock ('unix'); --- 260,264 ---- } ! if ($^O eq "linux" || $^O =~ /^(open|free|net)bsd$/ || $^O eq "aix") { Sys::Syslog::setlogsock ('unix'); *************** *** 877,884 **** # parse configuration file # ! if ($opt{"M"} || $CF =~ /\.m4$/) { return "could not open m4 pipe of cf file: $CF: $!" ! if (!open (CFG, "m4 $CF |")); } --- 907,916 ---- # parse configuration file # ! if (exists($opt{"M"}) || $CF =~ /\.m4$/) { + my $m4 = "m4"; + $m4 = $opt{"M"} if (defined($opt{"M"})); return "could not open m4 pipe of cf file: $CF: $!" ! if (!open (CFG, "$m4 $CF |")); } *************** *** 3023,3028 **** sub usage { print <<"EOF"; ! usage: mon [-a dir] [-c config] [-d] [-f] [-i secs] [-k num] ! [-m num] [-p num] [-P file] [-r num] [-s dir] mon -v --- 3055,3062 ---- sub usage { print <<"EOF"; ! usage: mon [-a dir] [-A file] [-b dir] [-B dir] [-c config] [-d] ! [-D dir] [-f] [-h] [-i secs] [-k num] [-l [type]] [-L dir] ! [-M [path]] [-m num] [-p num] [-P file] [-r num] [-s dir] ! [-S] [-t num] mon -v *************** *** 3038,3047 **** -i secs sleep interval (seconds), defaults to 1 -k num keep history of last num events ! -l load old state from statedir -L dir log directory (logdir) ! -M pre-process config file with m4 -m num throttle at maximum number of monitor processes -O facility syslog facility to use - -o file on-call schedule -p num server listens on port num -P file PID file --- 3072,3082 ---- -i secs sleep interval (seconds), defaults to 1 -k num keep history of last num events ! -l [type] load some types of old state from statedir. type can ! be disabled (default), opstatus or all. -L dir log directory (logdir) ! -M [path] pre-process config file with m4. if m4 isn't in \$PATH ! specify the path to m4 here -m num throttle at maximum number of monitor processes -O facility syslog facility to use -p num server listens on port num -P file PID file *************** *** 4684,4688 **** $CF{"HISTORICTIME"} = 0; $CF{"DEP_RECUR_LIMIT"} = 10; ! $CF{"SYSLOG_FACILITY"} = "daemon"; $CF{"STARTUPALERTS_ON_RESET"} = 0; $CF{"MONREMOTE"} = undef; --- 4719,4723 ---- $CF{"HISTORICTIME"} = 0; $CF{"DEP_RECUR_LIMIT"} = 10; ! $CF{"SYSLOG_FACILITY"} = $opt{"O"} || "daemon"; $CF{"STARTUPALERTS_ON_RESET"} = 0; $CF{"MONREMOTE"} = undef; |
From: Jim T. <tr...@us...> - 2005-01-18 20:45:09
|
Update of /cvsroot/mon/mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4533 Modified Files: Tag: mon-1-0-0pre1 mon Log Message: fixed auth.cf trap section parsing, prob reported by jgarzik Index: mon =================================================================== RCS file: /cvsroot/mon/mon/mon,v retrieving revision 1.4.2.14 retrieving revision 1.4.2.15 diff -C2 -d -r1.4.2.14 -r1.4.2.15 *** mon 19 Nov 2004 18:27:47 -0000 1.4.2.14 --- mon 18 Jan 2005 20:44:45 -0000 1.4.2.15 *************** *** 2608,2613 **** # } elsif ($cmd eq "checkauth") { ! split(' ',$args); ! $cmd = $_[0]; $user = $clients{$cl}->{"user"}; # Note that we call check_auth without syslogging here. --- 2608,2612 ---- # } elsif ($cmd eq "checkauth") { ! $cmd = (split(' ', $args))[0]; $user = $clients{$cl}->{"user"}; # Note that we call check_auth without syslogging here. *************** *** 3621,3624 **** --- 3620,3624 ---- } ($host, $user, $password) = ($1, $2, $3); + my $host_orig = $host; if ($host eq "*") { *************** *** 3627,3639 **** # ! } elsif ($host =~ /^[a-z]/ && ($host = gethostbyname ($host)) eq "") { ! syslog ('err', "invalid host in $CF{AUTHFILE}, line $."); ! next; ! } elsif ($host =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ && ! ($host = inet_aton ($host)) eq "") { ! syslog ('err', "invalid host in $CF{AUTHFILE}, line $."); ! next; } else { ! syslog ('err', "invalid host in $CF{AUTHFILE}, line $."); next; } --- 3627,3646 ---- # ! } elsif ($host =~ /^[a-z]/) { ! ! if (($host = gethostbyname ($host)) eq "") { ! syslog ('err', "invalid host in $CF{AUTHFILE} (could not resolve IP address for $host_orig), line $."); ! next; ! } ! ! } elsif ($host =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { ! ! if (($host = inet_aton ($host)) eq "") { ! syslog ('err', "invalid host in $CF{AUTHFILE} (bad IP address, $host_orig), line $."); ! next; ! } ! } else { ! syslog ('err', "invalid host in $CF{AUTHFILE} (cannot determine address, $host_orig), line $."); next; } *************** *** 3777,3781 **** my $trap_val = $2; chomp $trap_val; ! $trap_val =~ s/^\'(.*)\'$/\1/; $trap{$trap_name} = un_esc_str ($trap_val); } --- 3784,3788 ---- my $trap_val = $2; chomp $trap_val; ! $trap_val =~ s/^\'(.*)\'$/$1/; $trap{$trap_name} = un_esc_str ($trap_val); } |
From: Jim T. <tr...@us...> - 2005-01-09 03:28:06
|
Update of /cvsroot/mon/mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23384 Modified Files: Tag: mon-1-0-0pre1 CHANGES INSTALL KNOWN-PROBLEMS Log Message: misc. updates Index: KNOWN-PROBLEMS =================================================================== RCS file: /cvsroot/mon/mon/KNOWN-PROBLEMS,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2 *** KNOWN-PROBLEMS 12 Jun 2004 18:17:56 -0000 1.1.1.1.2.1 --- KNOWN-PROBLEMS 9 Jan 2005 03:27:55 -0000 1.1.1.1.2.2 *************** *** 6,9 **** --- 6,11 ---- ------------------------------ + alerts block the mon server until they exit + clients/skymon has not yet been updated to work with the new Mon::Client API. Index: CHANGES =================================================================== RCS file: /cvsroot/mon/mon/CHANGES,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -C2 -d -r1.2.2.3 -r1.2.2.4 *** CHANGES 3 Aug 2004 15:58:09 -0000 1.2.2.3 --- CHANGES 9 Jan 2005 03:27:55 -0000 1.2.2.4 *************** *** 1,4 **** --- 1,47 ---- $Id$ + Changes between mon-1.0.0pre4 and mon-1.0.0pre5 + Tue Dec 14 17:22:52 EST 2004 + ----------------------------------------------- + + (some of this may have been omitted in previous changelog entries) + + -call_alert should not call waitpid, it only needs to call close, + since perl's close will call waitpid for us. calling waitpid after + closing a filehandle opened with open(FH, "|-") will always return + an error, which is what it was doing. + + -don't quote output of "list descriptions" + + -carp about duplicate services and periods + + -added some comments to better explain the alert suppression in do_alert, added + ignore_summary from head + + -updated explanation of alert decision logic in mon.8 man page, + i.e. observe_detail and ignore_summary and strict options to alertevery + + -added -tcp flag to dns.monitor + + -fix to fping.monitor to better understand output from fping + by Daniel Wallace <da...@ak...> + + -added http_tppnp.monitor + by Jon Meek <me...@ie...> + + -updated ntpdate.monitor + by Jon Meek <me...@ie...> + + -added radius.monitor + + -added snmpvar.monitor + + -added "excludewatch" to monshow + + -made netappfree.monitor use MON_CFBASEDIR env var + + -made snmpvar.monitor use MON_CFBASEDIR env var + + Changes between mon-1.0.0pre3 and mon-1.0.0pre4 Tue Aug 3 08:02:35 EDT 2004 Index: INSTALL =================================================================== RCS file: /cvsroot/mon/mon/INSTALL,v retrieving revision 1.1.1.1.2.5 retrieving revision 1.1.1.1.2.6 diff -C2 -d -r1.1.1.1.2.5 -r1.1.1.1.2.6 *** INSTALL 12 Jul 2004 12:46:23 -0000 1.1.1.1.2.5 --- INSTALL 9 Jan 2005 03:27:55 -0000 1.1.1.1.2.6 *************** *** 37,40 **** --- 37,45 ---- Convert::BER G/GB/GBARR/Convert-BER-1.3101.tar.gz + You can find detailed instructions on how to locate and install + Perl modules in the CPAN FAQ: + + http://www.cpan.org/misc/cpan-faq.html + 2. INSTALLING THE PERL CLIENT MODULE |
From: Jim T. <tr...@us...> - 2005-01-09 03:28:05
|
Update of /cvsroot/mon/mon/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23384/etc Modified Files: Tag: mon-1-0-0pre1 example.cf Log Message: misc. updates Index: example.cf =================================================================== RCS file: /cvsroot/mon/mon/etc/example.cf,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** example.cf 9 Jun 2004 05:18:06 -0000 1.1.1.1 --- example.cf 9 Jan 2005 03:27:56 -0000 1.1.1.1.2.1 *************** *** 293,294 **** --- 293,317 ---- upalert mail.alert mi...@do... alertevery 8h + + + # + # Escalation using Multiple Periods + # + + watch webserver.corp.com + service fping + monitor fping.monitor + interval 1m + period P1: wd {Sun-Sat} + alert mail.alert trockij + alertafter 3 + numalerts 1 + period P2: wd {Sun-Sat} + alert qpage.alert trockij + alertafter 6 + numalerts 1 + period P3: wd {Sun-Sat} + alert call911.alert + alertafter 12h + alertevery 24h + |
From: Jim T. <tr...@us...> - 2005-01-09 03:28:04
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23384/mon.d Modified Files: Tag: mon-1-0-0pre1 fping.monitor Log Message: misc. updates Index: fping.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/fping.monitor,v retrieving revision 1.1.1.1.2.2 retrieving revision 1.1.1.1.2.3 diff -C2 -d -r1.1.1.1.2.2 -r1.1.1.1.2.3 *** fping.monitor 30 Nov 2004 16:20:25 -0000 1.1.1.1.2.2 --- fping.monitor 9 Jan 2005 03:27:56 -0000 1.1.1.1.2.3 *************** *** 162,166 **** print "start time: " . localtime ($START_TIME) . "\n"; print "end time : " . localtime ($END_TIME) . "\n"; ! print "duration : " . ($END_TIME - $START_TIME) . " seconds\n\n"; if (@unreachable != 0) --- 162,167 ---- print "start time: " . localtime ($START_TIME) . "\n"; print "end time : " . localtime ($END_TIME) . "\n"; ! print "duration : " . ($END_TIME - $START_TIME) . " seconds\n"; ! print "fping args: $CMD\n\n"; if (@unreachable != 0) |
From: Jim T. <tr...@us...> - 2004-12-15 15:24:45
|
Update of /cvsroot/mon/mon/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16539/doc Modified Files: Tag: mon-1-0-0pre1 README.snmpvar.monitor Log Message: get conf from MON_CFBASEDIR Index: README.snmpvar.monitor =================================================================== RCS file: /cvsroot/mon/mon/doc/README.snmpvar.monitor,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** README.snmpvar.monitor 28 Jun 2004 14:37:59 -0000 1.1.2.1 --- README.snmpvar.monitor 15 Dec 2004 15:24:17 -0000 1.1.2.2 *************** *** 28,33 **** module installed (http://www.cpan.org/misc/cpan-faq.html) * Copy snmpvar.mon to your mon.d directory ! * Copy snmpvar.def to /etc/mon, add your own variables ! * Copy snmpvar.cf to /etc/mon and edit to match your needs * Test from mon.d directory with ./snmpvar.monitor -l host1 host2 ... * Test again from mon.d directory with ./snmpvar.monitor host1 host2 ... --- 28,34 ---- module installed (http://www.cpan.org/misc/cpan-faq.html) * Copy snmpvar.mon to your mon.d directory ! * Copy snmpvar.def to /etc/mon (or your CFBASEDIR), add your own variables ! * Copy snmpvar.cf to /etc/mon (or your CFBASEDIR) and edit to match your ! needs * Test from mon.d directory with ./snmpvar.monitor -l host1 host2 ... * Test again from mon.d directory with ./snmpvar.monitor host1 host2 ... *************** *** 37,42 **** Commandline options: ! --varconf=/path/to/snmpvar.def if neither /etc/mon nor /usr/lib/mon/etc ! --config=/path/to/snmpvar.cf if neither /etc/mon nor /usr/lib/mon/etc --community=your_SNMP_read_community if not 'public' --- 38,45 ---- Commandline options: ! --varconf=/path/to/snmpvar.def if neither $ENV{"MON_CFBASEDIR"} nor ! /etc/mon nor /usr/lib/mon/etc ! --config=/path/to/snmpvar.cf if neither $ENV{"MON_CFBASEDIR"} nor ! /etc/mon nor /usr/lib/mon/etc --community=your_SNMP_read_community if not 'public' |
From: Jim T. <tr...@us...> - 2004-12-15 15:24:43
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16539/mon.d Modified Files: Tag: mon-1-0-0pre1 snmpvar.monitor Log Message: get conf from MON_CFBASEDIR Index: snmpvar.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/snmpvar.monitor,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** snmpvar.monitor 28 Jun 2004 14:38:00 -0000 1.1.2.1 --- snmpvar.monitor 15 Dec 2004 15:24:17 -0000 1.1.2.2 *************** *** 37,41 **** # # This monitor looks for configuration files in the current directory, ! # in /etc/mon and /usr/lib/mon/etc. Command line option --varconf # overrides the location of the variable definition file, option # --config sets the configuration file name. --- 37,42 ---- # # This monitor looks for configuration files in the current directory, ! # in the environment variable supplied by the mon server (MON_CFBASEDIR), ! # /etc/mon, and /usr/lib/mon/etc. Command line option --varconf # overrides the location of the variable definition file, option # --config sets the configuration file name. *************** *** 110,113 **** --- 111,115 ---- sub GetSNMPArgs; sub Decode; + sub find_conf_dir; GetOptions (\%opt, "config=s", "groups=s", "varconf=s", *************** *** 126,137 **** openlog('snmpvar.mon', 'cons,pid', 'daemon'); - # find config files ! $CF1 = '/etc/mon'; ! $CF2 = '/usr/lib/mon/etc'; ! $VARCONF_FILE = (-d $CF1 ? $CF1 : $CF2) . '/snmpvar.def'; ! $MONCONF_FILE = (-d $CF1 ? $CF1 : $CF2) . '/snmpvar.cf'; ! $SNMPCONF_FILE = (-d $CF1 ? $CF1 : $CF2) . '/snmpopt.cf'; # pick up local config files for testing --- 128,137 ---- openlog('snmpvar.mon', 'cons,pid', 'daemon'); # find config files ! @CFDIRS = ($ENV{"MON_CFBASEDIR"}, '/etc/mon', '/usr/lib/mon/etc'); ! $VARCONF_FILE = find_conf_dir (@CFDIRS) . '/snmpvar.def'; ! $MONCONF_FILE = find_conf_dir (@CFDIRS) . '/snmpvar.cf'; ! $SNMPCONF_FILE = find_conf_dir (@CFDIRS) . '/snmpopt.cf'; # pick up local config files for testing *************** *** 147,152 **** print STDERR "\nsnmpvar.monitor: configured from $VARCONF_FILE, $MONCONF_FILE\n\n" if $opt{'debug'}; ! ReadVarDef($VARCONF_FILE) || die "could not read variable definition: $!\n"; ! ReadVarList($MONCONF_FILE) || die "could not read config: $!\n"; ReadSNMPConf($SNMPCONF_FILE); # this is optional stuff --- 147,152 ---- print STDERR "\nsnmpvar.monitor: configured from $VARCONF_FILE, $MONCONF_FILE\n\n" if $opt{'debug'}; ! ReadVarDef($VARCONF_FILE) || die "could not read variable definition $VARCONF_FILE: $!\n"; ! ReadVarList($MONCONF_FILE) || die "could not read config $MONCONF_FILE: $!\n"; ReadSNMPConf($SNMPCONF_FILE); # this is optional stuff *************** *** 468,471 **** --- 468,484 ---- + sub find_conf_dir + { + my @dirs = @_; + + foreach my $d (@dirs) + { + return $d if (-d $d); + } + + return ""; + } + + format STDOUT_TOP = Host Variable min value max stat |
From: Jim T. <tr...@us...> - 2004-12-14 22:24:50
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25268 Modified Files: Tag: mon-1-0-0pre1 netappfree.monitor Log Message: oops, MON_CFBASEDIR Index: netappfree.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/netappfree.monitor,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2 *** netappfree.monitor 14 Dec 2004 20:42:18 -0000 1.1.1.1.2.1 --- netappfree.monitor 14 Dec 2004 22:24:40 -0000 1.1.1.1.2.2 *************** *** 101,105 **** #$CONFIG = $opt{"config"} || (-d "/etc/mon" ? "/etc/mon" : "/usr/lib/mon/etc") ! $CONFIG = $opt{"config"} || (-d $ENV{"CFBASEDIR"} ? $ENV{"CFBASEDIR"} : -d "/etc/mon" ? "/etc/mon" : "/usr/lib/mon/etc") . "/netappfree.cf"; --- 101,105 ---- #$CONFIG = $opt{"config"} || (-d "/etc/mon" ? "/etc/mon" : "/usr/lib/mon/etc") ! $CONFIG = $opt{"config"} || (-d $ENV{"MON_CFBASEDIR"} ? $ENV{"MON_CFBASEDIR"} : -d "/etc/mon" ? "/etc/mon" : "/usr/lib/mon/etc") . "/netappfree.cf"; |
From: Jim T. <tr...@us...> - 2004-12-14 22:22:04
|
Update of /cvsroot/mon/mon/clients In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24689 Modified Files: Tag: mon-1-0-0pre1 monshow Log Message: added excludewatch Index: monshow =================================================================== RCS file: /cvsroot/mon/mon/clients/monshow,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2 *** monshow 3 Aug 2004 15:55:53 -0000 1.1.1.1.2.1 --- monshow 14 Dec 2004 22:21:55 -0000 1.1.1.1.2.2 *************** *** 135,139 **** # read config file # ! my ($e, $what) = read_cf ($CF); if ($e ne "") --- 135,139 ---- # read config file # ! my ($e, $what, $excludewatch) = read_cf ($CF); if ($e ne "") *************** *** 186,190 **** expand_watch ($what, $st); ! my $rows = select_table ($what, $st); compose_header ($st->{"state"}); --- 186,190 ---- expand_watch ($what, $st); ! my $rows = select_table ($what, $st, $excludewatch); compose_header ($st->{"state"}); *************** *** 382,385 **** --- 382,386 ---- my ($group, $service); my @RC; + my %excludewatch; my $view = 0; *************** *** 490,493 **** --- 491,497 ---- } + # + # set commands + # if (/^set \s+ (\S+) \s* (\S+)?/ix) { *************** *** 524,527 **** --- 528,535 ---- } + # + # non-set commands + # + elsif (/^watch \s+ (\S+)/x) { *************** *** 547,555 **** } else { my $lnum = $.; close (IN); ! err_die ("error in config file, line $."); } } --- 555,572 ---- } + elsif (/^excludewatch \s+ (.*)$/x) + { + foreach my $w (split (/\s+/, $1)) + { + $excludewatch{$w} = 1; + } + next; + } + else { my $lnum = $.; close (IN); ! err_die ("error in config file, line $lnum"); } } *************** *** 562,566 **** } ! return ("", \@RC); } --- 579,583 ---- } ! return ("", \@RC, \%excludewatch); } *************** *** 955,959 **** sub select_table { ! my ($what, $st) = @_; my @rows; --- 972,976 ---- sub select_table { ! my ($what, $st, $excludewatch) = @_; my @rows; *************** *** 968,972 **** foreach my $service (keys %{$st->{"opstatus"}->{$group}}) { ! push (@rows, [$group, $service]); } } --- 985,989 ---- foreach my $service (keys %{$st->{"opstatus"}->{$group}}) { ! push (@rows, [$group, $service]) unless (exists $excludewatch->{$group}); } } *************** *** 975,979 **** else { ! @rows = @{$what}; } --- 992,999 ---- else { ! foreach my $r (@{$what}) ! { ! push (@rows, $r) unless (exists $excludewatch->{$r->[0]}); ! } } *************** *** 1725,1726 **** --- 1745,1747 ---- $l; } + |
From: Jim T. <tr...@us...> - 2004-12-14 22:18:27
|
Update of /cvsroot/mon/mon/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23868 Modified Files: Tag: mon-1-0-0pre1 monshow.1 Log Message: added excludewatch Index: monshow.1 =================================================================== RCS file: /cvsroot/mon/mon/doc/monshow.1,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** monshow.1 9 Jun 2004 05:18:06 -0000 1.1.1.1 --- monshow.1 14 Dec 2004 22:17:57 -0000 1.1.1.1.2.1 *************** *** 200,203 **** --- 200,207 ---- .\" .TP + .BI "excludewatch" " group [group...]" + Exclude one or more groups from the report. + .\" + .TP .BI "service" " group service" Include the status of the service specified by |
From: Jim T. <tr...@us...> - 2004-12-14 20:42:27
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1712 Modified Files: Tag: mon-1-0-0pre1 netappfree.monitor Log Message: look for config file in env var CFBASEDIR supplied by the mon server Index: netappfree.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/netappfree.monitor,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** netappfree.monitor 9 Jun 2004 05:18:04 -0000 1.1.1.1 --- netappfree.monitor 14 Dec 2004 20:42:18 -0000 1.1.1.1.2.1 *************** *** 98,102 **** $TIMEOUT = $opt{"timeout"} || 2; $TIMEOUT *= 1000 * 1000; $RETRIES = $opt{"retries"} || 5; ! $CONFIG = $opt{"config"} || (-d "/etc/mon" ? "/etc/mon" : "/usr/lib/mon/etc") . "/netappfree.cf"; --- 98,106 ---- $TIMEOUT = $opt{"timeout"} || 2; $TIMEOUT *= 1000 * 1000; $RETRIES = $opt{"retries"} || 5; ! ! #$CONFIG = $opt{"config"} || (-d "/etc/mon" ? "/etc/mon" : "/usr/lib/mon/etc") ! ! $CONFIG = $opt{"config"} || (-d $ENV{"CFBASEDIR"} ? $ENV{"CFBASEDIR"} : ! -d "/etc/mon" ? "/etc/mon" : "/usr/lib/mon/etc") . "/netappfree.cf"; |
From: Jim T. <tr...@us...> - 2004-11-30 16:20:35
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21901 Modified Files: Tag: mon-1-0-0pre1 fping.monitor Log Message: added -b switch (from ed ravin) Index: fping.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/fping.monitor,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2 *** fping.monitor 29 Jul 2004 21:10:19 -0000 1.1.1.1.2.1 --- fping.monitor 30 Nov 2004 16:20:25 -0000 1.1.1.1.2.2 *************** *** 28,32 **** my %opt; ! getopts ("ahr:s:t:T", \%opt); sub usage --- 28,32 ---- my %opt; ! getopts ("ab:hr:s:t:T", \%opt); sub usage *************** *** 36,39 **** --- 36,40 ---- -a only report failure if all hosts are unreachable + -b num send "num" bytes of ping data (default 56, like regular ping) -r num retry "num" times for each host before reporting failure -s num consider hosts which respond in over "num" msecs failures *************** *** 51,55 **** my $TIMEOUT = $opt{"t"} || 2000; my $RETRIES = $opt{"r"} || 3; ! my $CMD = "fping -e -r $RETRIES -t $TIMEOUT"; my $START_TIME = time; my $END_TIME; --- 52,57 ---- my $TIMEOUT = $opt{"t"} || 2000; my $RETRIES = $opt{"r"} || 3; ! my $NUMBYTES = $opt{"b"} || 56; ! my $CMD = "fping -e -r $RETRIES -t $TIMEOUT -b $NUMBYTES"; my $START_TIME = time; my $END_TIME; |
From: Jim T. <tr...@us...> - 2004-11-22 18:48:04
|
Update of /cvsroot/mon/mon/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22513 Modified Files: Tag: mon-1-0-0pre1 mon.8 Log Message: oops, forgot to mention observe_detail in alertevery explanation Index: mon.8 =================================================================== RCS file: /cvsroot/mon/mon/doc/mon.8,v retrieving revision 1.1.1.1.2.5 retrieving revision 1.1.1.1.2.6 diff -C2 -d -r1.1.1.1.2.5 -r1.1.1.1.2.6 *** mon.8 19 Nov 2004 18:26:22 -0000 1.1.1.1.2.5 --- mon.8 22 Nov 2004 18:47:54 -0000 1.1.1.1.2.6 *************** *** 1141,1145 **** .TP ! .BI alertevery " timeval [observe_detail | strict]" The .B alertevery --- 1141,1145 ---- .TP ! .BI alertevery " timeval [observe_detail | ignore_summary | strict ]" The .B alertevery *************** *** 1163,1166 **** --- 1163,1167 ---- then the alertevery interval is overridden, and an alert will be sent. + The "ignore_summary" argument suppresses this behavior. If the string "observe_detail" is the last argument, then both the summary |
From: Jim T. <tr...@us...> - 2004-11-19 18:27:57
|
Update of /cvsroot/mon/mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28690 Modified Files: Tag: mon-1-0-0pre1 mon Log Message: added some comments to better explain the alert suppression in do_alert, added ignore_summary from head Index: mon =================================================================== RCS file: /cvsroot/mon/mon/mon,v retrieving revision 1.4.2.13 retrieving revision 1.4.2.14 diff -C2 -d -r1.4.2.13 -r1.4.2.14 *** mon 13 Aug 2004 04:15:16 -0000 1.4.2.13 --- mon 19 Nov 2004 18:27:47 -0000 1.4.2.14 *************** *** 594,606 **** # output from monitor is different or if strict alertevery # my ($prevsumm) = split("\n", $sref->{"_failure_output"}); if ( ! $pref->{"alertevery"} != 0 && ( ! ($tmnow - $pref->{"_last_alert"} < $pref->{"alertevery"}) && ( ! ($pref->{"_alertevery_strict"}) || ! ($pref->{"_observe_detail"} && $sref->{"_failure_output"} eq $output) || ! (!$pref->{"_observe_detail"} && $prevsumm eq $summary) ) ) --- 594,612 ---- # output from monitor is different or if strict alertevery # + # strict and _ignore_summary are basically the same though + # strict short-circuits and overrides other settings and exists + # for compatibility with pre-1.1 configs + # my ($prevsumm) = split("\n", $sref->{"_failure_output"}); if ( ! $pref->{"alertevery"} != 0 && # if alertevery is set and ( ! ($tmnow - $pref->{"_last_alert"} < $pref->{"alertevery"}) && # we're within the time period and one of these: ( ! ($pref->{"_alertevery_strict"}) || # [ strict is set or ! ($pref->{"_observe_detail"} && $sref->{"_failure_output"} eq $output) || # observing detail and output hasn't changed or ! (!$pref->{"_observe_detail"} && $prevsumm eq $summary) || # not observing detail ! # and not ignoring summary and summ hasn't changed or ! ($pref->{"_ignore_summary"}) # we're ignoring summary changes ] ) ) *************** *** 1298,1301 **** --- 1304,1308 ---- $pref->{"_observe_detail"} = 0; $pref->{"_alertevery_strict"} = 0; + $pref->{"_ignore_summary"} = 0; if ($args =~ /(\S+) \s+ observe_detail \s*$/ix) *************** *** 1305,1308 **** --- 1312,1321 ---- } + elsif ($args =~ /(\S+) \s+ ignore_summary \s*$/ix) + { + $pref->{"_ignore_summary"} = 1; + $args = $1; + } + # # for backawards-compatibility with <= 0.38.21 *************** *** 1318,1328 **** elsif ($args =~ /(\S+) \s+ strict \s*$/ix) { - $args = $1; $pref->{"_alertevery_strict"} = 1; } if (!($args = dhmstos ($args))) { close (CFG); ! return "cf error: invalid time interval '$args' (syntax: alertevery {positive number}{smhd} [ strict | observe_detail ]), line $line_num"; } --- 1331,1341 ---- elsif ($args =~ /(\S+) \s+ strict \s*$/ix) { $pref->{"_alertevery_strict"} = 1; + $args = $1; } if (!($args = dhmstos ($args))) { close (CFG); ! return "cf error: invalid time interval '$args' (syntax: alertevery {positive number}{smhd} [ strict | observe_detail | ignore_summary ]), line $line_num"; } |
From: Jim T. <tr...@us...> - 2004-11-19 18:26:32
|
Update of /cvsroot/mon/mon/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28354/doc Modified Files: Tag: mon-1-0-0pre1 mon.8 Log Message: updated to explain alertevery strict| ignore_summary | observe_detail Index: mon.8 =================================================================== RCS file: /cvsroot/mon/mon/doc/mon.8,v retrieving revision 1.1.1.1.2.4 retrieving revision 1.1.1.1.2.5 diff -C2 -d -r1.1.1.1.2.4 -r1.1.1.1.2.5 *** mon.8 13 Aug 2004 04:15:17 -0000 1.1.1.1.2.4 --- mon.8 19 Nov 2004 18:26:22 -0000 1.1.1.1.2.5 *************** *** 41,46 **** was designed to be open in the sense that it supports arbitrary monitoring facilities and alert methods via a common interface, which ! are easily implemented through programs (in C, Perl, shell, etc.), ! SNMP traps, and special Mon (UDP packet) traps. .SH OPTIONS --- 41,46 ---- was designed to be open in the sense that it supports arbitrary monitoring facilities and alert methods via a common interface, which ! are easily implemented through programs (in C, Perl, shell, etc.) ! and special Mon (UDP packet) traps. .SH OPTIONS *************** *** 194,198 **** resource which is provided by a group. Services are usually modeled after things such as an SMTP server, ICMP echo capability, server disk space ! availability, or SNMP events. .TP .BI watch --- 194,198 ---- resource which is provided by a group. Services are usually modeled after things such as an SMTP server, ICMP echo capability, server disk space ! availability, or SNMP queries. .TP .BI watch *************** *** 368,375 **** If an alert was already sent within the last .B alertevery ! interval, do not send another alert, ! .I unless ! the summary output from the current monitor program differs from the last ! monitor process. Otherwise, send an alert using each alert program listed for that period. The --- 368,375 ---- If an alert was already sent within the last .B alertevery ! interval and the monitor has continued to report a nonzero exit ! status for a time period ! less than that interval, do not send another alert, ! unless the summary output from the most recent monitor process differs from the previous. Otherwise, send an alert using each alert program listed for that period. The *************** *** 385,392 **** The reasoning is that if the summary output changes, then a significant event occurred and the user should be alerted. ! The "strict" argument to alertevery will suppress both ! comparing the output from the previous monitor run to the current ! and prevent a successful return value of the monitor from ! resetting the alertevery timer. For example, "alertevery 24h strict" will only send out an alert once every 24 hours, regardless of whether the monitor output changes, or if the service stops and then --- 385,397 ---- The reasoning is that if the summary output changes, then a significant event occurred and the user should be alerted. ! The "ignore_summary" option will suppress all successive ! alerts while the service continues to fail, even if the ! summary output changes. ! If the "strict" ! alertevery option is ! used, then behave the same as if "ignore_summary" was ! set, but do not reset the alertevery timer when ! the monitor exits with a zero status. ! For example, "alertevery 24h strict" will only send out an alert once every 24 hours, regardless of whether the monitor output changes, or if the service stops and then *************** *** 1145,1151 **** variable, and limits the number of times an alert is sent when the service continues to fail. ! For example, if the interval is "1h", then only the alerts in the period section will only ! be triggered once every hour. If the .B alertevery keyword is --- 1150,1159 ---- variable, and limits the number of times an alert is sent when the service continues to fail. ! For example, if the interval is "1h", then the alerts in the period section will only ! be triggered once every hour as the service continues to fail. ! The alertevery interval timer will be reset if the monitor ! stops exiting with a nonzero exit status (i.e. it reports a success). ! If the .B alertevery keyword is |
From: Jim T. <tr...@us...> - 2004-11-19 15:23:20
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18502 Modified Files: Tag: mon-1-0-0pre1 ntpdate.monitor Log Message: updates from meekj Index: ntpdate.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/ntpdate.monitor,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ntpdate.monitor 23 Jun 2004 13:25:32 -0000 1.1.2.1 --- ntpdate.monitor 19 Nov 2004 15:23:09 -0000 1.1.2.2 *************** *** 31,35 **** =item B<--maxoffset> Maximum value of the clock offset in seconds, ! default is 0.8 s (a large value, ntp typically keeps clocks within milliseconds of each other). An alarm will be triggered if this value is exceeded. --- 31,35 ---- =item B<--maxoffset> Maximum value of the clock offset in seconds, ! default is 800 ms (a large value, ntp typically keeps clocks within milliseconds of each other). An alarm will be triggered if this value is exceeded. *************** *** 41,47 **** log file is: ! =item B<-d> ! Debug/Test, for manual testing only. =back --- 41,66 ---- log file is: ! time server stratum offset delay ! time is in UNIX seconds, offset, and delay are in seconds. ! ! =item B<-shortalerts> ! ! Use only hostname in alert list. For organizations with long FQDNs ! this will make mail and pager alerts more readable. ! ! =item B<--htmlfile /full/path/to/file.html> ! ! Optional location to write the formated results from the current ! test. Be sure that the directory is writeable by the user under whom ! mon is running. ! ! =item B<-d> or B<--debug> ! ! Debug/Test/Verbose, for manual testing only. ! ! =item B<--ntpdate> ! ! Specify the location of ntpdate, the default is /usr/sbin/ntpdate =back *************** *** 54,58 **** service ntpdate interval 30m ! monitor ntpdate.monitor --maxoffset 0.1 --log /usr/local/mon/logs/gv-ntp-YYYYMM.log period wd {Sun-Sat} alert mail.alert us...@so... --- 73,77 ---- service ntpdate interval 30m ! monitor ntpdate.monitor --maxoffset 0.100 --log /usr/local/mon/logs/gv-ntp-YYYYMM.log period wd {Sun-Sat} alert mail.alert us...@so... *************** *** 61,67 **** =head1 BUGS ! The location of ntpdate is hardcoded to be /usr/sbin/ntpdate. This ! works for Solaris 8 and RedHat Linux 7.x, at least, but it should be ! configurable. Check the first line of this file to be sure that it points to an --- 80,91 ---- =head1 BUGS ! Listing a server twice can cause ntpdate to report that server as ! Stratum 0. ! ! The shortalerts option only reports the hostname, it could be extended ! to provide a configurable number of FQND fields. ! ! ntpdate will be removed from the NTP distribution at some point. This ! monitor will need to be modified to use some form of ntpd -q instead. Check the first line of this file to be sure that it points to an *************** *** 83,87 **** # Jon Meek # Lawrenceville, NJ ! # me...@ie... # # --- 107,111 ---- # Jon Meek # Lawrenceville, NJ ! # meekj at ieee.org # # *************** *** 106,120 **** use Getopt::Long; - use Data::Dumper; GetOptions( "maxstratum=i" => \$MaxStratum, "maxoffset=f" => \$MaxOffset, # "dns" => \$UseDNS, ! "d" => \$opt_d, ! "l=s" => \$opt_l, ! "log=s" => \$opt_l, ); use Net::DNS; # --- 130,148 ---- use Getopt::Long; GetOptions( "maxstratum=i" => \$MaxStratum, "maxoffset=f" => \$MaxOffset, # "dns" => \$UseDNS, ! "d|debug" => \$Debug, ! "l=s" => \$LogFile, ! "log=s" => \$LogFile, ! "htmlfile=s" => \$HtmlFile, ! "shortalerts" => \$ShortAlerts, ! "ntpdate=s" => \$NTPDATE, ); use Net::DNS; + use Sys::Hostname; + use POSIX qw(strftime); # *************** *** 126,134 **** $MaxStratum = 10 unless $MaxStratum; $MinStratum = 1; # # Trigger alarm if the time is ever off by this much # ! $MaxOffset = 0.800 unless $MaxOffset; # Seconds ! $NTPDATE = '/usr/sbin/ntpdate'; @Failures = (); --- 154,168 ---- $MaxStratum = 10 unless $MaxStratum; $MinStratum = 1; + + # Use the first occurrence of this stratum as the reference time for alarms + $ReferenceStratum = 1 unless $ReferenceStratum; + # # Trigger alarm if the time is ever off by this much # ! $MaxOffset = 0.800 unless $MaxOffset; # seconds ! $NTPDATE = '/usr/sbin/ntpdate' unless $NTPDATE; ! ! $HtmlFileHandle = &HTMLheader($HtmlFile) if ($HtmlFile ne "" && HTMLheader); @Failures = (); *************** *** 138,150 **** $TimeOfDay = time; # Current time ! print "TimeOfDay: $TimeOfDay\n" if $opt_d; ! $cmd = qq{$NTPDATE -q @Hosts |}; $pid = open(NTP, $cmd) || die "Couldn't run $cmd\n"; while ($in = <NTP>) { ! # print $in if $opt_d; chomp $in; # # Pick out server strings --- 172,190 ---- $TimeOfDay = time; # Current time ! print "TimeOfDay: $TimeOfDay\n" if $Debug; ! $cmd = qq{$NTPDATE -q @Hosts 2>&1 |}; $pid = open(NTP, $cmd) || die "Couldn't run $cmd\n"; + $detail = ""; + $ntpdate_output = ""; + while ($in = <NTP>) { ! # print $in if $Debug; ! $ntpdate_output .= $in; ! chomp $in; + # # Pick out server strings *************** *** 156,202 **** $delay = $4; $name = $NameByIP{$ip}; ! print "$in $name\n" if $opt_d; ! # ! # Prepare log entries ! # ! if (exists $NameByIP{$ip}) { ! $hostnameforlog = $NameByIP{$ip}; } else { ! $hostnameforlog = $ip; } ! if ($opt_l or $opt_d) { ! $LogString{$ip} = qq{$TimeOfDay $hostnameforlog $stratum $offset $delay}; } # ! # Check alarm limits # ! if (($stratum > $MaxStratum) || ($stratum < $MinStratum) || (abs($offset) > $MaxOffset)) { ! $FailureDetail{$ip} = $in; ! print "Fail: $ip $stratum $offset $delay $name\n" if $opt_d; ! } else { ! $SuccessDetail{$ip} = sprintf ("%-20s %-7d %-2.5f %-2.5f", $hostnameforlog, $stratum, $offset, $delay); } } - # Ignore the final line for now, probably not needed at all - # - # if ($in =~ / adjust time server\s+([\d\.]+)\s+offset\s+([\d\.\-\+]+)\s+/) { - # $ip = $1; - # $offset = $2; - # if (abs($offset) > $MaxOffset) { - # $FailureDetail{$ip} = $in; - # print "Fail: $ip $offset\n" if $opt_d; - # } - # } } # # Write results to logfile, if -l # ! if ($opt_l) { ! $LogFile = $opt_l; ($sec, $min, $hour, $mday, $Month, $Year, $wday, $yday, $isdst) = localtime($TimeOfDay); --- 196,275 ---- $delay = $4; $name = $NameByIP{$ip}; ! print "$in Name: $name Stratum: $stratum\n" if $Debug; ! ! $detail .= "$in Name: $name Stratum: $stratum\n"; ! ! if (exists $NameByIP{$ip}) { # Use system name if we have it ! $HostName = $NameByIP{$ip}; } else { ! $HostName = $ip; # Otherwise use IP address } ! $IP{$HostName} = $ip; ! $Stratum{$HostName} = $stratum; ! $Offset{$HostName} = $offset; ! $Delay{$HostName} = $delay; ! $Detail{$HostName} = $in; ! ! if ((!defined $ReferenceOffset) && ($stratum == 1)) { # Save offset from first stratum 1 server seen ! $ReferenceOffset = $offset; } + # ! # Prepare log entries # ! if ($LogFile or $Debug) { ! $LogString{$HostName} = qq{$TimeOfDay $HostName $stratum $offset $delay}; } } + } + + # + # Build formatted results and check alarm limits + # + $FmtDetail = qq{NTP Server Delta, s Stratum Rel, s Offset, s\n}; + + &HTMLtableHeader($HtmlFileHandle, 'NTP Server', 'Delta, s', 'Stratum', 'Rel, s', 'Offset, s', 'Status') if ($HtmlFile ne ""); + + foreach $hostname (sort keys %Stratum) { + $DeltaTime = $Offset{$hostname} - $ReferenceOffset; + $DeltaTimeByHost{$hostname} = $DeltaTime; + + $FmtDetail .= sprintf ("%-40s %12.6f %3d %12.6f %12.6f", + $hostname, $DeltaTime, $Stratum{$hostname}, $Offset{$hostname}, $Delay{$hostname}); + + $fail_string = ' '; + + if (($Stratum{$hostname} > $MaxStratum) || ($Stratum{$hostname} < $MinStratum) + || (abs($DeltaTime) > $MaxOffset)) { + $ip = $IP{$hostname}; + $FailureDetail{$hostname} = $Detail{$hostname}; + push(@Failures, $hostname); + $FmtDetail .= q{ Fail}; + $fail_string = 'Fail'; + } + + $FmtDetail .= "\n"; + + if ($HtmlFile ne "") { + $fDeltaTime = sprintf("%12.6f", $DeltaTime); + $fOffset = sprintf("%12.6f", $Offset{$hostname}); + $fDelay = sprintf("%12.6f", $Delay{$hostname}); + &HTMLtableRow($HtmlFileHandle, $hostname, $fDeltaTime, $Stratum{$hostname}, $fOffset, $fDelay, $fail_string); + } } + print "\n$FmtDetail\n" if $Debug; + + $detail .= "\n$FmtDetail\n"; + # # Write results to logfile, if -l # ! if ($LogFile) { ! $LogFile = $LogFile; ($sec, $min, $hour, $mday, $Month, $Year, $wday, $yday, $isdst) = localtime($TimeOfDay); *************** *** 220,233 **** } ! if ($opt_d) { ! foreach $ip (sort keys %LogString) { ! print "LOG: $LogString{$ip}\n"; ! } } ! foreach $ip (sort keys %FailureDetail) { ! push(@FailureIP, $FailureDetail{$ip}); ! push(@FailuresIP, $ip); } --- 293,307 ---- } ! foreach $ip (sort keys %LogString) { ! print "LOG: $LogString{$ip}\n" if ($Debug); ! $detail .= "LOG: $LogString{$ip}\n"; } + &HTMLtrailer($HtmlFileHandle) if $HtmlFile; ! if (@Failures == 0) { # Indicate "all OK" to mon ! print "\n$detail"; ! print "\nntpdate -q output:\n\n$ntpdate_output"; ! exit 0; } *************** *** 235,278 **** # Otherwise we have one or more failures # ! foreach $ip (@FailuresIP) { ! if (exists $NameByIP{$ip}) { ! push(@FailuresName, $NameByIP{$ip}); ! } else { ! push(@FailuresName, $ip); } } - @SortedFailures = sort @FailuresName; ! print "@SortedFailures\n"; ! if (@FailuresIP) ! { ! print "servers which have a failure:\n\n"; ! foreach $ip (sort keys %FailureDetail) { ! print "$NameByIP{$ip} $ip $FailureDetail{$ip}\n"; ! } ! print "\n\n"; ! } ! # ! # show details for non-failed hosts ! # ! print "servers which have no failures:\n\n"; ! printf ("%-20s %-2s %-8s %-8s\n", "server", "stratum", "offset", "delay"); ! print "-" x 50 . "\n"; ! foreach my $k (sort keys %SuccessDetail) ! { ! print "$SuccessDetail{$k}\n"; ! } ! if (@FailuresIP == 0) { # Indicate "all OK" to mon ! exit 0; ! } - exit 1; # Indicate failure to mon # --- 309,344 ---- # Otherwise we have one or more failures # ! ! if ($ShortAlerts) { ! foreach $host (sort @Failures) { ! if ($host =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { # IP address, don't shorten ! push(@SortedFailures, $host); ! } else { ! $host =~ /(.*?)\./; ! push(@SortedFailures, $1); ! } } + } else { + @SortedFailures = sort @Failures; } ! print "------- Have Failures -------\n" if $Debug; ! print "@SortedFailures\n"; ! print "------- Details -------\n" if $Debug; ! print $detail; ! #foreach $hostname (sort keys %FailureDetail) { ! # print "$NameByIP{$hostname} $hostname $FailureDetail{$hostname} $DeltaTimeByHost{$hostname} s\n"; ! #} ! print "\nntpdate -q output:\n\n$ntpdate_output"; ! exit 1; # Indicate failure to mon ! ############################################################################## # *************** *** 289,295 **** if ($query) { foreach $rr ($query->answer) { ! #print "$target Type: ", $rr->type, "\n" if $opt_d; if ($rr->type eq "A") { ! print $rr->address . ' ' if $opt_d; $NameByIP{$rr->address} = $target; } --- 355,361 ---- if ($query) { foreach $rr ($query->answer) { ! #print "$target Type: ", $rr->type, "\n" if $Debug; if ($rr->type eq "A") { ! print $rr->address . ' ' if $Debug; $NameByIP{$rr->address} = $target; } *************** *** 300,301 **** --- 366,424 ---- } + sub HTMLheader { + # + # Print basic standard header for this application + # + my($FileName) = @_; + local *F; + open(F, ">$FileName") || warn "$$ can't open $FileName, check permissions"; + + $Title = "NTP Server Status"; + $MonitorHostname = hostname; + $FmtTimeNow = strftime("%A %d-%b-%Y %H:%M:%S %Z", localtime(time)); + + print F <<"EndOfHeader"; + <HTML> + <HEAD> + <TITLE>$Title</TITLE> + </HEAD> + <BODY bgcolor="#ffffff" text="#000000"> + <H1>$Title from $MonitorHostname</H1> + <p>$FmtTimeNow</p> + <table border=2 cellpadding=3> + EndOfHeader + + return *F; + } + + + sub HTMLtableHeader { + my($FileHandle, @Headers) = @_; + print $FileHandle "<TR>\n"; + foreach $h (@Headers) { + print $FileHandle "<TH>$h</TH>\n"; + } + print $FileHandle "</TR>\n"; + } + + sub HTMLtableRow { + my ($FileHandle, @Fields) = @_; + my ($align, $f); + $align = ''; + print $FileHandle "<TR>\n"; + foreach $f (@Fields) { + print $FileHandle "<TD$align>$f</TD>\n"; + $align = ' align=right'; + } + print $FileHandle "</TR>\n"; + } + + sub HTMLtrailer { + # + # Print basic standard trailer for this application + # + my($FileHandle) = @_; + + print $FileHandle "</table>\n</body>\n</html>\n"; + close $FileHandle; + } |
From: David N. <vi...@us...> - 2004-11-15 14:45:58
|
Update of /cvsroot/mon/mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9218 Modified Files: CHANGES CREDITS INSTALL KNOWN-PROBLEMS README TODO VERSION mon Added Files: mon.spec Log Message: Pulling lots of changes from the 1.0.0pre* branch into the HEAD, to prepare to tag mon-1.1pre1 Index: KNOWN-PROBLEMS =================================================================== RCS file: /cvsroot/mon/mon/KNOWN-PROBLEMS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** KNOWN-PROBLEMS 9 Jun 2004 05:18:03 -0000 1.1.1.1 --- KNOWN-PROBLEMS 15 Nov 2004 14:45:16 -0000 1.2 *************** *** 1,9 **** # ! # $Id$ ! # Release $Name$ # ! KNOWN PROBLEMS in 0.99.3 devel ! -------------------------- clients/skymon has not yet been updated to work with the new Mon::Client --- 1,8 ---- # ! # $Name$ # ! KNOWN PROBLEMS in $Name$ ! ------------------------------ clients/skymon has not yet been updated to work with the new Mon::Client Index: VERSION =================================================================== RCS file: /cvsroot/mon/mon/VERSION,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** VERSION 9 Jun 2004 05:18:03 -0000 1.1.1.1 --- VERSION 15 Nov 2004 14:45:16 -0000 1.2 *************** *** 1,2 **** ! $ProjectVersion: mon-0-99-3.47 $ ! $ProjectDate: Mon, 07 Jun 2004 13:56:49 -0400 $ --- 1,10 ---- ! $Name$ ! ! $Log$ ! Revision 1.2 2004/11/15 14:45:16 vitroth ! Pulling lots of changes from the 1.0.0pre* branch into the HEAD, to prepare ! to tag mon-1.1pre1 ! ! Revision 1.1.1.1.2.1 2004/06/12 18:17:57 trockij ! added some rcs tags to identify the file versions ! --- NEW FILE: mon.spec --- # # spec file for package mon (Version 1.0.0pre3) # # Copyright (c) 2004 SUSE LINUX AG, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://www.suse.de/feedback/ # BuildRequires: bash bzip2 cpio cpp diffutils file filesystem findutils grep groff gzip info m4 make man patch sed tar texinfo autoconf automake binutils gcc libtool perl rpm Name: mon Version: 1.0.0pre4jt1 Release: 2 Summary: The mon network monitoring system License: GPL Group: System/Monitoring URL: http://www.kernel.org/software/mon/ Source: http://www.kernel.org/pub/software/admin/mon/%{name}-%{version}.tar.bz2 Source1: http://www.kernel.org/pub/software/admin/mon/mon-client-%{version}.tar.bz2 Requires: perl Requires: perl(Time::Period) Requires: perl-Convert-BER Requires: fping Requires: perl-libwww-perl BuildRoot: %{_tmppath}/%{name}-%{version}-build %define filelist %{name}-%{version}-filelist %description "mon" is a tool for monitoring the availability of services. Services may be network-related, environmental conditions, or nearly anything that can be tested with software. It is extremely useful for system administrators, but not limited to use by them. It was designed to be a general-purpose problem alerting system, separating the tasks of testing services for availability and sending alerts when things fail. To achieve this, "mon" is implemented as a scheduler which runs the programs which do the testing, and triggering alert programs when these scripts detect failure. None of the actual service testing or reporting is actually handled by "mon". These functions are handled by auxillary programs. Authors: -------- Jim Trocki <tr...@tr...> %prep ################################################################### %setup -q %setup -T -D -a 1 ################################################################### %build cd mon.d make cd ../mon-client-%{version} %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '` %{__make} ################################################################### %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_libdir}/mon/alert.d mkdir -p %{buildroot}/%{_sbindir} mkdir -p %{buildroot}/%{_mandir}/man1 mkdir -p %{buildroot}/%{_libdir}/mon/mon.d mkdir -p %{buildroot}/%{_localstatedir}/lib/mon mkdir -p %{buildroot}/%{_libdir}/mon/utils mkdir -p %{buildroot}/%{_sysconfdir}/mon mkdir -p %{buildroot}/%{_sysconfdir}/init.d mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d mkdir -p ./examples cp mon %{buildroot}/%{_sbindir}/ cp -a ./alert.d/ %{buildroot}/%{_libdir}/mon/ cp ./clients/moncmd %{buildroot}/%{_sbindir}/moncmd cp ./clients/monshow %{buildroot}/%{_sbindir}/monshow cp -a ./doc/*.1 %{buildroot}/%{_mandir}/man1/ mv ./etc/very-simple.cf %{buildroot}/%{_sysconfdir}/mon/mon.cf mv ./etc/auth.cf %{buildroot}/%{_sysconfdir}/mon mv ./etc/S99mon %{buildroot}/%{_sysconfdir}/init.d/mon cp -a ./etc/* ./examples cp -a ./mon.d/{*.monitor,*.wrap} %{buildroot}/%{_libdir}/mon/mon.d/ cp -a ./utils/ %{buildroot}/%{_libdir}/mon/ mkdir -p %{buildroot}/sbin ln -sf ../etc/init.d/mon %{buildroot}/sbin/rcmon cd mon-client-%{version} && %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '` cd .. # clean up after perl module install - remove special files find %{buildroot} -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" |xargs -i rm -f {} # build filelist echo "%defattr(-,root,root)" > %filelist find %{buildroot} -type f -printf "/%%P\n" | grep -v "man/man" >> %filelist [ -z %filelist ] && { echo "ERROR: EMPTY FILE LIST" exit -1 } ################################################################### %files -f %filelist %doc %{_mandir}/man1/moncmd.1* %doc %{_mandir}/man1/monshow.1* %doc %{_mandir}/man3/Mon::* %doc CHANGES COPYING COPYRIGHT CREDITS INSTALL KNOWN-PROBLEMS README %doc TODO VERSION mon.lsm %doc ./doc/README.* %doc ./doc/globals %doc ./examples ################################################################### %clean if [ -z "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ] then rm -rf $RPM_BUILD_ROOT fi rm -rf $RPM_BUILD_ROOT ################################################################### %preun if [ -r %{_localstatedir}/run/mon.pid ]; then /etc/init.d/mon stop fi ################################################################### %post if [ -d %{_localstatedir}/log -a ! -f %{_localstatedir}/log/mon_history.log ]; then touch %{_localstatedir}/log/mon_history.log fi ################################################################### %postun if [ "$1" = "0" -a -f %{_localstatedir}/log/mon_history.log ]; then rm -f %{_localstatedir}/log/mon_history.log fi %changelog -n mon * Thu Jul 07 2004 - er...@tr... - update to 1.0.0pre2, remove suse-ness * Mon Mar 01 2004 - hm...@su... - building as nonroot-user * Fri Feb 27 2004 - ku...@su... - Cleanup neededforbuild - fix compiler warnings * Mon Feb 10 2003 - lm...@su... - Fixed path to comply with FHS. * Fri Oct 18 2002 - lm...@su... - Fix for Bugzilla #21086: init script had a broken path and syntax error. * Tue Aug 20 2002 - lm...@su... - Fix for Bugzilla # 17936; PreRequires corrected. * Mon Aug 12 2002 - lm...@su... - Perl dependencies updated for Perl 5.8.0 * Fri Jul 26 2002 - lm...@su... - Perl dependencies adjusted to comply with SuSE naming scheme * Fri Jul 26 2002 - lm...@su... - Adapted from Conectiva to UnitedLinux - init script cleanup * Wed Jul 24 2002 - Fábio Olivé Leite <ol...@co...> - Version: mon-0.99.2-1ul - Adapted for United Linux * Sat Jul 20 2002 - Claudio Matsuoka <cl...@co...> - Version: mon-0.99.2-3cl - updated dependencies on perl modules to lowercase names * Thu May 16 2002 - Fábio Olivé Leite <ol...@co...> - Version: mon-0.99.2-2cl - Added %%attr to %%{_libdir}/mon/*, so that the helper scripts are executable Closes: #5522 (aparente problema com as permissões) - Changed initscript to use gprintf Closes: #4172 (Internacionalização (?)) * Fri Dec 28 2001 - Ricardo Erbano <er...@co...> - Version: mon-0.99.2-1cl - New upstream relase 0.99.2 * Sat Nov 17 2001 - Claudio Matsuoka <cl...@co...> - Version: mon-0.38.20-6cl - fixed doc permissions * Thu Jun 21 2001 - Eliphas Levy Theodoro <el...@co...> - Version: mon-0.38.20-5cl - fixed initscript - /usr/lib/mon -> /usr/sbin (Closes: #3792) - added requires for perl-Convert-BER - added post{,un} scripts to handle logfile mon_history.log * Fri Mar 23 2001 - Luis Claudio R. Gonçalves <lcl...@co...> - Version: mon-0.38.20-4cl - fixed the initscript (it was missing a "-f" switch) * Tue Oct 31 2000 - Arnaldo Carvalho de Melo <ac...@co...> - %%{_sysconfdir}/mon is part of this package - small cleanups * Thu Sep 28 2000 - Fábio Olivé Leite <ol...@co...> - Wrong version in the mon-perl dependency... * Thu Sep 21 2000 - Fábio Olivé Leite <ol...@co...> - Updated to 0.38.20. * Fri Jun 16 2000 - Fábio Olivé Leite <ol...@co...> - Fixed TIM alert, added history file, added logrotate script * Mon Jun 12 2000 - Fábio Olivé Leite <ol...@co...> - Added an alert via TIM Celular cellphones * Thu Jun 08 2000 - Fábio Olivé Leite <ol...@co...> - Made the %%preun nicer * Thu Jun 01 2000 - Fábio Olivé Leite <ol...@co...> - New spec format * Mon Apr 17 2000 - Fábio Olivé Leite <ol...@co...> - Added a new monitor (initscript.monitor) * Fri Apr 14 2000 - Fábio Olivé Leite <ol...@co...> - Added proxy support to http.monitor * Thu Apr 13 2000 - Fábio Olivé Leite <ol...@co...> - Fixed a small bug in the init script - Added scripts to alert via Mobi pagers and Global Telecom cellphones * Mon Apr 10 2000 - Fábio Olivé Leite <ol...@co...> - Initial RPM packaging Index: INSTALL =================================================================== RCS file: /cvsroot/mon/mon/INSTALL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** INSTALL 9 Jun 2004 05:18:03 -0000 1.1.1.1 --- INSTALL 15 Nov 2004 14:45:16 -0000 1.2 *************** *** 1,61 **** $Id$ ! INSTALLATION ! ------------ ! ! Several parts: ! ! 1. mon, the server ! 2. Mon::Client, the Perl library used by some clients. 3. C programs in mon.d ! REQUIREMENTS ! ------------ ! The "mon" daemon uses Perl 5.n, where n >= 005_01. Older versions of Perl had ! problems with Sys::Syslog under Linux, and had dated versions of ! Text::ParseWords. Mon also requires that *.ph be created from the system ! header files. If you're using a pre-packaged Perl (such as from RedHat) then ! this has been done for you already. Otherwise, this is done manually during ! Perl installation by these means: cd /usr/include ! h2ph *.h sys/*.h ! However, if you're running Linux you may need to run ! cd /usr/include ! h2ph *.h sys/*.h asm/*.h - If you try to run mon and Perl complains with the "did you run h2ph?" - message, then chances are this step wasn't done. ! You'll need the following modules for the server to function, all of ! which are available from your nearest CPAN archive, or the place ! where you got mon: ! -Time::Period (the one written by Patrick Ryan) ! -Time::HiRes ! -Convert::BER ! -Mon::* All of the monitor and alert scripts that are packaged with mon are actually *optional*. However, this is what you'll need for each special ! monitor: ! freespace.monitor ! The disk space monitor requires the "Filesys::DiskSpace" Perl ! module from CPAN. ! fping.monitor ! Requires the "fping" code, probably available from the same ! place that you got this package. ! telnet.monitor ! This requires the Net::Telnet Perl module, available from ! CPAN. reboot.monitor --- 1,87 ---- $Id$ ! OVERVIEW ! -------- ! There are several components you'll need to get working to ! have a fully functional mon installation. + 1. mon, the server + 2. Mon::Client, the Perl library used by some clients 3. C programs in mon.d + 4. Optional (but highly useful) monitors + 5. A customized mon.cf to make the server do what you want ! 1. MON SERVER ! ------------- ! The "mon" daemon uses Perl 5.n, where n >= 005_01. ! ! Mon requires that *.ph be created from the system header files. If you try to ! run mon and Perl complains with the "did you run h2ph?" message, then chances ! are this step wasn't done, either by your package manager or manually after ! Perl installation. You can fix it by doing the following, as root: cd /usr/include ! h2ph -r -l . ! You'll need the following modules for the server to function, all of ! which are available from your nearest CPAN archive. The listed ! CPAN paths relative to /cpan/modules/by-authors/id/ -- versions of ! modules on CPAN change quickly, so there may be newer versions available, ! but the following are known to work: ! Time::Period PRYAN/Period-1.20.tar.gz ! Time::HiRes J/JH/JHI/Time-HiRes-1.59.tar.gz ! Convert::BER G/GB/GBARR/Convert-BER-1.3101.tar.gz ! 2. INSTALLING THE PERL CLIENT MODULE ! ------------------------------------ ! The Perl client module is distributed as a separate package. It is named ! "mon-client-*.tar.gz". Refer to that for installation instructions. ! It is available on kernel.org mirrors in the /pub/software/admin/mon directory, ! and in CVS on sourceforge.net. Be sure to match the version of mon-client with ! the version of mon you are using. At this time, branch "mon-1-0-0pre1" of the ! mon CVS module matches the "mon-client-1-0-0pre1" branch of the mon-client CVS ! module. See http://sourceforge.net/projects/mon/ for information on CVS access. ! ! ! 3. COMPILING THE C CODE (optional) ! ---------------------------------- ! ! Some of the monitors included with mon are written in C and need to ! be compiled for your system. If you want to use the RPC monitor or the ! dialin.monitor wrapper, ! ! cd mon.d ! (edit Makefile) ! make ! make install ! cd .. ! ! Keep in mind that although this is known to work on Linux, Solaris, and AIX, ! it may not compile on your system. It is not required for the operation of mon ! itself. ! ! ! 4. MONITORS ! ----------- All of the monitor and alert scripts that are packaged with mon are actually *optional*. However, this is what you'll need for each special ! monitor, with CPAN paths relative to /cpan/modules/by-author/id/ ! freespace.monitor - requires Filesys::Diskspace from CPAN, ! in FTASSIN/Filesys-DiskSpace-0.05.tar.gz ! ! fping.monitor - requires the 'fping' binary, from http://www.fping.com ! RPM packages available at http://dag.wieers.com/packages/fping/ ! telnet.monitor - requires the Net::Telnet from CPAN, ! in J/JR/JROGERS/Net-Telnet-3.03.tar.gz reboot.monitor *************** *** 64,78 **** process.monitor hpnp.monitor ! All use the UCD SNMP 3.6.3, along with G.S. Marzot's ! Perl module. ! ! ldap.monitor ! requires the Net::LDAPapi Perl module, available from CPAN. ! dialin.monitor ! requires the Perl Expect module, available from CPAN. ! dns.monitor ! requires the Net::DNS Perl module. msql-mysql.monitor --- 90,104 ---- process.monitor hpnp.monitor ! Use the 'net-snmp' package (formerly UCD SNMP), from ! http://sourceforge.net/projects/net-snmp ! with G.S. Marzot's Perl module G/GS/GSM/SNMP-4.2.0.tar.gz ! ldap.monitor - requires Net::LDAPapi from CPAN, ! CDONLEY/Net-LDAPapi-1.42.tar.gz ! dialin.monitor - requires the Perl Expect module from CPAN, ! R/RG/RGIERSIG/Expect-1.15.tar.gz ! dns.monitor - requires Net::DNS from CPAN, ! C/CR/CREIN/Net-DNS-0.47.tar.gz msql-mysql.monitor *************** *** 83,107 **** details. ! ! 1. INSTALLING THE PERL CLIENT MODULE ! ------------------------------------ ! ! As of 0.38.8, the Perl client module is distributed as a separate ! package. It is named "Mon-*.tar.gz". As of 1-Aug-2001, the most ! recent distribution is Mon-0.99.1.tar.gz. Refer to that for ! installation instructions. This module is available in both CPAN ! (http://www.perl.com/CPAN/) and on kernel.org mirrors in the ! /pub/software/admin/mon directory. ! ! ! 2. MON SERVER INSTALLATION ! -------------------------- -Read the man page for "mon" and "moncmd" in the doc/ directory to get ! an overview about the directories involved, i.e. the configuration, alert, monitors, state, and run directories. cd doc ! nroff -man mon.1 | more -read the "READMEs" in the doc/ directory for some useful --- 109,121 ---- details. ! 5. MON.CF CUSTOMIZATION AND STARTUP ! ----------------------------------- -Read the man page for "mon" and "moncmd" in the doc/ directory to get ! an overview of the directories involved, i.e. the configuration, alert, monitors, state, and run directories. cd doc ! nroff -man mon.8 | more -read the "READMEs" in the doc/ directory for some useful *************** *** 162,175 **** ! 3. COMPILING THE C CODE (optional) ! ---------------------------------- ! -cd mon.d ! (edit Makefile) ! make ! make install ! cd .. ! to build the RPC monitor and the dialin.monitor wrapper. Keep in mind ! that if this may fail for some reason (it works under Linux, Solaris, ! and AIX), it is not required for the operation of mon itself. --- 176,193 ---- ! WEB INTERFACE ! ------------- ! This distribution contains two web interfaces: monshow and mon.cgi. monshow is ! a simple report-only tool which supports configurable "views" of the mon ! configuration. monshow also operates as a textmode report generator. ! mon.cgi, however, supports the full functionality of mon, including the ability ! to disable/enable groups and hosts and services, acknowledge failed services, ! show alert and downtime history, authenticate users, among many other things. ! ! To install monshow, simply copy clients/monshow into your web server's cgi-bin ! path and name it "monshow.cgi". You may want to read the man page in the doc/ ! directory so that you can understand how to configure a "view" to your liking. ! ! To install mon.cgi, follow the instructions found in doc/README.mon.cgi. Index: CREDITS =================================================================== RCS file: /cvsroot/mon/mon/CREDITS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CREDITS 9 Jun 2004 05:18:03 -0000 1.1.1.1 --- CREDITS 15 Nov 2004 14:45:16 -0000 1.2 *************** *** 8,11 **** --- 8,21 ---- Lots of ideas, inital testing under Solaris, and http.monitor code. + David Nolan + vit...@cm... + Many bug fixes and feature additions. David probably runs the largest + mon installation in existence. + + Ed Ravin + er...@pa... + Bug fixes, many enhancements to monitors, feature additions, and fixes + for BSD-isms. + Martin J. Laubach mj...@em... *************** *** 93,94 **** --- 103,109 ---- an...@my... mon.cgi v1.32 and later, bug reports and fixes. + + Eric Sorenson + er...@tr... + Documentation and RPM spec updates + Index: README =================================================================== RCS file: /cvsroot/mon/mon/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 9 Jun 2004 05:18:03 -0000 1.1.1.1 --- README 15 Nov 2004 14:45:16 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + $Name$ $Id$ *************** *** 54,58 **** ------------ ! The latest version of mon is available from kernel.org in pub/software/admin/mon/. Please choose a mirror from --- 55,59 ---- ------------ ! The latest release of mon is available from kernel.org in pub/software/admin/mon/. Please choose a mirror from *************** *** 64,67 **** --- 65,81 ---- + CVS + --- + + CVS trees of both the development trunk and stable release branches are + available from anonymous CVS access on sourceforge.net. To check out the latest + stable branch, do the following: + + $ cvs -d:pserver:ano...@cv...:/cvsroot/mon login + $ cvs -z3 -d:pserver:ano...@cv...:/cvsroot/mon co -r mon-1-0-0pre1 mon + + The "development" branch may be checked out by omitting the "-r mon-1-0-0pre1". + + INSTALLATION ------------ Index: CHANGES =================================================================== RCS file: /cvsroot/mon/mon/CHANGES,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CHANGES 11 Jun 2004 14:55:55 -0000 1.2 --- CHANGES 15 Nov 2004 14:45:16 -0000 1.3 *************** *** 1,4 **** --- 1,128 ---- $Id$ + Changes between mon-1.0.0pre3 and mon-1.0.0pre4 + Tue Aug 3 08:02:35 EDT 2004 + ----------------------------------------------- + + -when allow_empty_group is not set and no host arguments + to pass to a monitor, the interval wasn't being reset so + it would spam the syslog with lots of "no host arguments" + messages. this is fixed. + + -in reset_timer, there was a chance that _timer could get + set to a negative value, which is not right. fixed it. + + -fixed the bug where lots of mon processes could accumulate if the + exec of an alert failed. also fixed error handling of failed + alerts. + + -added "show failures only" button to mon.cgi to speed it up. + by Ed Ravin <er...@pa...> + + -small permissions fix to rpm spec file + + -added MON_CFBASEDIR variable to monitor and alert + environment, which is set to the value of "cfbasedir" in the + config file. + + -removed unfinished snmp trap handling stuff. it doesn't work at all, + and it's misleading to people even though the man page says it doesn't + work. + + -added monitor_duration and monitor_running output to opstatus detail + in monshow + + Changes between mon-1.0.0pre1 and mon-1.0.0pre3 + Mon Jul 12 09:12:29 EDT 2004 + ----------------------------------------------- + + -changed README to refer to the new, more sensible name for the perl module + client, which is mon-client + + -applied eric's updates to INSTALL and added a mention of monshow and mon.cgi as + the web interfaces + + -added eric's rpm spec file (i removed the patches because they are no longer + needed) + + -added lmb's syslog.monitor (a nifty hack) + + -added 'alertevery strict' code and docs, updated the README and INSTALL to + mention CVS, updated CREDITS + + -incorporated mon.cgi 1.52 + + -minor addition to alert behavior explanation in mon.8 + + -in dialin.monitor.wrap.c, return the exit status of execv (if it fails, that is) + + -fixed path to perl in file_change.monitor and smtp3.monitor + + -added some rcs tags to identify the file versions + + -handle_trap_timeout now calls process_event, and it works fine with + alert/upalert/alertevery/etc. as shown by my testing + + -received traps now reset the trap timeout counter, and fixed some + other stuff wrt trap timeouts + + -added sub process_event and made proc_cleanup and handle_trap use it + so that the alert mgmt code is shared rather than in two places. i tested + as much of it as i could and all seems to work well now, especially + upalert, alertafter, alertevery with traps. + + -added per-service "_monitor_duration" variable which records how many + seconds the previous monitor took to execute. this is available via + "list opstatus". if no monitor has executed yet then the value is -1. + + -added per-service "_monitor_running" variable whose value is 0 or 1 + depending on whether the monitor is currently running for that service. + + -removed gunk from handle_trap regarding the various TRAP_COLDSTART, etc. + processing, since most of it was a bad idea anyway, or at least as far as + i could tell. traps and their exit values are now processed exactly as + monitors are, which simplifies things greatly and adds to more intuitive + functionality. this means the "spc" value in a trap is now ignored. + + -fixed some args processing in call_alert + + -fixed a bug which would prevent alerts or upalerts + from being sent when call alerts is passed the "output" + argument whose value is undef + + -remove usage of parse_line in trap processing + (backported from mon 1.1 code) + + -make esc_str escape spaces in order to be compatible with monperl-1-0-0pre1 + + -added list of all possible client commands to moncmd + + -added --community to set the snmp community in reboot.monitor + + -patch to traceroute.monitor from meekj + added StateDir, TracerouteOptions, StopAt config options + some bugfixes to config file parsing + reap children to avoid defunct processes + added timeout alarm + + -up_rtt.monitor + added -r to log individual rtts, better error reporting for tcp and udp check + + + + + Changes between mon-0.99.3-47 and mon-1.0.0pre1 + ----------------------------------------------- + Fri Jun 18 10:35:18 EDT 2004 + + -removed nonsensical unless statement which would conditionally set the op + status to STAT_OK. it should be set unconditionally + + -added "strict" option to alertevery + + -changed protocol to escape spaces to coincide with the change in Mon::Client + + + Changes between mon-0.99.2 and mon-0.99.3 Fri Jun 11 10:55:27 EDT 2004 *************** *** 172,178 **** the "all" directive in auth.cf - -removed nonsensical unless statement which would conditionally set the op - status to STAT_OK. it should be set unconditionally - Changes between mon-0.99.1 and mon-0.99.2 --- 296,299 ---- Index: TODO =================================================================== RCS file: /cvsroot/mon/mon/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO 9 Jun 2004 05:18:03 -0000 1.1.1.1 --- TODO 15 Nov 2004 14:45:16 -0000 1.2 *************** *** 1,31 **** $Id$ ! -fix problem where all members of hostgroup are disabled ! and it spams the log every second: ! ! Feb 24 04:02:36 mon-bd2 mon[11668]: monitor for ATE/fping not called because of no host arguments ! ! ! -pass cfbasedir as env vars to monitors and alerts ! just like logdir ! ! -include snmpvar.monitor in the main dist ! ! -add short "trap howto" and "radius howto" posts to the mon ! list in the doc/ directory. -make traps authenticate via the same scheme used to obscure the password in RADIUS packets - -have an absolute "alertevery" which squelches alerts - regardless of whether or not the service goes down/up/down. - -descriptions defined in mon.cf should be 'quoted' ! -document command section, trap section, snmp trap section in authfile ! -there should be only one routine which handles dealing with failures ! and successes (including calling alerts), probably the routine which tests ! $? in proc_cleanup. -output to client should be buffered and incorporated into the I/O loop. --- 1,14 ---- $Id$ ! -add short a "radius howto" to the doc/ directory. -make traps authenticate via the same scheme used to obscure the password in RADIUS packets -descriptions defined in mon.cf should be 'quoted' ! -document command section and trap section in authfile ! -finish support for receiving snmp traps -output to client should be buffered and incorporated into the I/O loop. *************** *** 41,48 **** -document "clear" client command - -Separate the decision-making code about sending alerts into a - separate routine, and make do_alert do nothing but deliver the - actual alert. - -Document trap authentication. --- 24,27 ---- *************** *** 74,75 **** --- 53,85 ---- -make it possible to disable just one of multiple alarms in a service + + -make a logging facility which forks and execs external logging + daemons and writes to them via some ipc such as unix domain socket. + mon should be sure that one of each type of these loggers is running + at all times. configure the logging either globally or for each + service. write both the success and failure status to the log in + some "list opstatus" type format. each logger can do as it wishes + with the data (e.g. stuff it into rrdtool, mysql, cat it to a file, etc.) + + + # global setting + logger = file + + watch stuff + service http + logger file -p _LOGDIR_ + ... + service fping + # this will use the global logger setting + ... + service + # this will override the global logger setting + logger none + ... + + + common options to logger: + -d dir path to logging dir + -f file name of log file + -g, -s group, service + Index: mon =================================================================== RCS file: /cvsroot/mon/mon/mon,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mon 27 Jun 2004 19:05:40 -0000 1.9 --- mon 15 Nov 2004 14:45:16 -0000 1.10 *************** *** 54,59 **** use Time::HiRes qw(gettimeofday tv_interval usleep); use Time::Period; - use Mon::SNMP; - #use SNMP in read_cf() sub auth; --- 54,57 ---- *************** *** 84,88 **** sub gen_scriptdir_hash; [...1613 lines suppressed...] my $escstr = ""; + return $escstr if (!defined $str); + for (my $i = 0; $i < length ($str); $i++) { *************** *** 5499,5503 **** my $msg = shift; my $ans = ""; ! $ans = $PAM_username if ($code == Authen::PAM::PAM_PROMPT_ECHO_ON() ); $ans = $PAM_password if ($code == Authen::PAM::PAM_PROMPT_ECHO_OFF() ); --- 5318,5322 ---- my $msg = shift; my $ans = ""; ! $ans = $PAM_username if ($code == Authen::PAM::PAM_PROMPT_ECHO_ON() ); $ans = $PAM_password if ($code == Authen::PAM::PAM_PROMPT_ECHO_OFF() ); |