summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rwxr-xr-xbin/tSmoke.dist (renamed from bin/tSmoke.pl.dist)86
-rw-r--r--etc/tmail.dist (renamed from etc/tmail)0
-rw-r--r--lib/Smokeping.pm9
-rw-r--r--tSmoke.v4.README20
5 files changed, 71 insertions, 50 deletions
diff --git a/Makefile b/Makefile
index af579e4..c2584ed 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ DOCSBASE = $(subst .pod,,$(DOCS))
MODBASE = $(subst .pm,,$(subst lib/,doc/,$(PM))) \
$(subst .pm,,$(subst lib/,doc/,$(PODPROBE))) \
$(subst .pm,,$(subst lib/,doc/,$(PODMATCH)))
-PROGBASE = doc/smokeping doc/smokeping.cgi
+PROGBASE = doc/smokeping doc/smokeping.cgi doc/tSmoke
DOCSCONFIGBASE = doc/smokeping_config
BASE = $(DOCSBASE) $(MODBASE) $(PROGBASE) $(DOCSCONFIGBASE)
@@ -59,6 +59,8 @@ doc/smokeping.1: bin/smokeping.dist
$(POD2MAN) --section 1 > $@
doc/smokeping.cgi.1: htdocs/smokeping.cgi.dist
$(POD2MAN) --section 1 > $@
+doc/tSmoke.1: bin/tSmoke.dist
+ $(POD2MAN) --section 1 > $@
doc/%.html: doc/%.pod
$(POD2HTML)
@@ -77,6 +79,8 @@ doc/smokeping.html: bin/smokeping.dist
$(POD2HTML)
doc/smokeping.cgi.html: htdocs/smokeping.cgi.dist
$(POD2HTML)
+doc/tSmoke.html: bin/tSmoke.dist
+ $(POD2HTML)
doc/%.txt: doc/%.1
$(MAN2TXT)
diff --git a/bin/tSmoke.pl.dist b/bin/tSmoke.dist
index 95a30bb..64e7658 100755
--- a/bin/tSmoke.pl.dist
+++ b/bin/tSmoke.dist
@@ -6,6 +6,31 @@
# tSmoke.v 0.4 2004/03 McGinn-Combs
#-----------------------------------------------
#
+# Modified for Smokeping official distribution since 20050526
+# Original README follows
+#
+# tSmoke.v04.README
+# - added downtime report (--downtime)
+# - a few tweaks to the calculations to ensure it's consistent
+#
+# tSmoke.v03.README
+# - Initial Release
+# - The script, started through cron, will cull through a config file and
+# determine which hosts are down at a point in time (Morning report) and
+# send out an smtp message to a mobile phone (for example).
+#
+# - It will also cull through the same config file and, using an included html
+# file (small change to General section of the config file), send an html
+# message which shows the availability over the past day, week, month
+# and quarter.
+#
+# - It can also show detail data depending on the setting of
+# command line option "detail".
+#
+# tSmoke.v02.README
+# - Local testing version
+#-----------------------------------------------
+#
# 1) This program is run via CRON or the command line
# 2) It extracts RRD information from a smokeping config file
# 3) It pulls data from RRD files to determine if anything is offline, that is returning 0 PINGs
@@ -25,17 +50,17 @@ use strict;
# -- Getopt::Long
#
# Point the lib variables to your implementation
-use lib "/usr/local/smokeping/lib";
+use lib qw(lib);
use lib "/usr/local/rrdtool-1.0.39/lib/perl";
+
use Smokeping;
use Net::SMTP;
-use ISG::ParseConfig;
use Getopt::Long;
use Pod::Usage;
use RRDs;
# Point to your Smokeping config file
-my $cfgfile = "/usr/local/smokeping/etc/config";
+my $cfgfile = "etc/config.dist";
# global variables
my $cfg;
@@ -424,7 +449,7 @@ tSmoke - Commandline tool for sending SmokePing information
=head1 SYNOPSIS
-B<tSmoke.pl> [ B<--testmail> | B<--morning> | B<--weekly> | B<--version> | B<--help> | B<--man>]
+B<tSmoke> [ B<--testmail> | B<--morning> | B<--weekly> | B<--version> | B<--help> | B<--man>]
Options:
@@ -435,51 +460,53 @@ B<tSmoke.pl> [ B<--testmail> | B<--morning> | B<--weekly> | B<--version> | B<--h
--listrrds List the RRDs used by this Smokeping
--morning Send a morning synopsis
--weekly Send a weekly status report
- --to E-mail address to send message (i.e. '--to=xyz@company.com'
+ --to E-mail address to send message (i.e. '--to=xyz@company.com.invalid'
--detail How much detail to send in weekly report (i.e. '--detail=1')
--quiet Do not print welcome
=head1 DESCRIPTION
-The B<tSmoke> tool is a commandline tool which iterfaces with the SmokePing system.
+The B<tSmoke> tool is a commandline tool which interfaces with the SmokePing system.
Its main function is to send a message indicating the current status of the systems
being monitored by Smokeping or an HTML mail file containing the status over the past day,
past week and past month including an overview.
Typical crontab used to invoke this are
-# Quick morning alert to see what's down
-0 6 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mobilephone@att.net --morning
-# Weekly report on the percent availability of network systems with no detail
-0 8 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mailbox@company.com --weekly --detail=0
+
+ # Quick morning alert to see what's down
+ 0 6 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mobilephone@att.net.invalid --morning
+ # Weekly report on the percent availability of network systems with no detail
+ 0 8 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mailbox@company.com.invalid --weekly --detail=0
=head1 SETUP
When installing tSmoke, some variables must be adjusted to fit your local system.
We need to use the following B<libraries>:
-# -- Smokeping
-# -- RRDTool Perl bindings
-# -- Getopt::Long
-# Set up your libraries
-use lib "/usr/local/smokeping/lib";
-use lib "/usr/local/rrdtool-1.0.39/lib/perl";
+=over
-# Add the B<use> statements
-use Smokeping;
-use Net::SMTP;
-use ISG::ParseConfig;
-use Pod::Usage;
-use RRDs;
+=item Smokeping
+
+=item RRDTool Perl bindings
+
+=item Getopt::Long
+
+=back
+
+Set up your libraries:
-# Point to your Smokeping B<config> file
-my $cfgfile = "/usr/local/smokeping/etc/config";
+ use lib "/usr/local/smokeping/lib";
+ use lib "/usr/local/rrdtool-1.0.39/lib/perl";
-# Modify the config file to include a path for tmail
-tmail = /usr/local/smokeping/etc/tmail
+Point to your Smokeping B<config> file
-# Modify the General section of get_parser in Smokeping.pm to find the tmail file
-[ qw(owner imgcache imgurl datadir piddir sendmail smokemail cgiurl mailhost contact syslogfacility syslogpriority tmail) ]
+ my $cfgfile = "/usr/local/smokeping/etc/config";
+
+Modify the Smokeping config file to include a path for tmail in the
+General section:
+
+ tmail = /usr/local/smokeping/etc/tmail
=head1 COPYRIGHT
@@ -508,4 +535,7 @@ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
Dan McGinn-Combs E<lt>d.mcginn-combs@mindspring.comE<gt>
+Modified for Smokeping official distribution by Niko Tyni E<lt>ntyni@iki.fiE<gt>
+
=cut
+
diff --git a/etc/tmail b/etc/tmail.dist
index ed90eea..ed90eea 100644
--- a/etc/tmail
+++ b/etc/tmail.dist
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 7be666d..46545a0 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1555,7 +1555,7 @@ DOC
_vars =>
[ qw(owner imgcache imgurl datadir pagedir piddir sendmail offset
smokemail cgiurl mailhost contact netsnpp
- syslogfacility syslogpriority concurrentprobes changeprocessnames) ],
+ syslogfacility syslogpriority concurrentprobes changeprocessnames tmail) ],
_mandatory =>
[ qw(owner imgcache imgurl datadir piddir
smokemail cgiurl contact) ],
@@ -1714,6 +1714,13 @@ be appended to the process name as '[probe]', eg. '/usr/bin/smokeping
If 'concurrentprobes' is not set to 'yes', this variable has no effect.
DOC
},
+ tmail =>
+ {
+ %$FILECHECK_SUB,
+ _doc => <<DOC,
+Path to your tSmoke HTML mail template file. See the tSmoke documentation for details.
+DOC
+ }
},
Database =>
{
diff --git a/tSmoke.v4.README b/tSmoke.v4.README
deleted file mode 100644
index cfc0799..0000000
--- a/tSmoke.v4.README
+++ /dev/null
@@ -1,20 +0,0 @@
-tSmoke.v04.README
-- added downtime report (--downtime)
-- a few tweaks to the calculations to ensure it's consistent
-
-tSmoke.v03.README
-- Initial Release
-- The script, started through cron, will cull through a config file and
-determine which hosts are down at a point in time (Morning report) and
-send out an smtp message to a mobile phone (for example).
-
-- It will also cull through the same config file and, using an included html
-file (small change to General section of the config file), send an html
-message which shows the availability over the past day, week, month
-and quarter.
-
-- It can also show detail data depending on the setting of
-command line option "detail".
-
-tSmoke.v02.README
-- Local testing version \ No newline at end of file