summaryrefslogtreecommitdiffstats
path: root/doc/smokeping_install.pod
blob: bb5d3d562a4b3b2beecd36cac0f5d9666ed3f2e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
=head1 NAME

smokeping_install - How to install SmokePing

=head1 OVERVIEW

This document explains how to setup SmokePing at your site.

=head1 DESCRIPTION

=head2 Prerequisites

SmokePing does not stand alone. It relies on various other tools and
services being present. Apart from a Unix OS and a working Perl installation
you need the following things. The list contains the names of the tools
together with the version of the tool which I am using, and a link for
downloading the tool.

=over

=item RRDtool 1.2.x

L<http://oss.oetiker.ch/rrdtool/>

Just follow the installation instructions. We need this package todo all the
logging and graphing in SmokePing.

=item FPing 

The official site L<http://fping.sourceforge.net/> seems to be a bit
unmaintained. You might want to grab an updated version of fping from
L<http://oss.oetiker.ch/smokeping/pub/>. 

Note that fping must be installed setuid root. It seems that older versions
of fping report round trip times in 0.1 milliseconds instead of 1 milliseconds
as advertised ... SmokePing tries to figure this out. It tells
you when it starts ... let me know it it gets it wrong.

=item EchoPing  (Optional)

L<http://echoping.sourceforge.net/>

You need this to run the EchoPing probes

=item Curl (Optional)

L<http://curl.haxx.se/>

You need this for the Curl probe.

=item dig (Optional)

L<http://www.isc.org/sw/bind/>

You need this for the DNS probe.

=item SSH (Optional)

L<http://www.openssh.org/>

You need this for the SSH probe.

=item Various Perl modules (Most of these are optional)

You can get these from L<http://www.cpan.org/>.

=over

=item libwww-perl

The master/slave functionality introduced a dependency LWP::UserAgent
from the libwww-perl (also known as LWP) library. Currently the module
is needed even if the master/slave mode is not enabled.

=item Socket6 0.11-1

Optionally installing the Socket6 module for perl enables
smokeping to check hostnames that only resolve to an IPv6
address. If you probe such hosts using ie. the FPing6 probe
and get warnings that those hosts don't resolve to an IP
address, you need to install it.

=item Net::Telnet 

You need this for the TelnetIOSPing probe.

=item Net::DNS

You need this for the AnotherDNS probe.

=item Net::LDAP

You need this for the LDAP probe.

=item IO::Socket::SSL

You need this if you want the LDAP probe to be able to use the 'starttls' command.

=item Authen::Radius

You need this for the Radius probe.

=back

=item Webserver 

L<http://httpd.apache.org/>

Well I wont get much into this. The important thing is, to have a webserver
which allows you to run CGI scripts. If you are using Apache I strongly
recommend using the F<suexec> system for running CGI scripts. Often it is
sufficient to change the F<suexec> binary to setuid root and restart Apache.
Using F<suexec> allow to run cgi scripts under proper user accounts.

=item Perl 5.8.8

L<http://www.perl.com>

I guess you will get away with older versions of perl. I am using 5.8.8 here
and it works fine.

=item SpeedyCGI 

L<http://www.daemoninc.com/SpeedyCGI/>

SpeedyCGI speeds up CGIs written in perl dramatically by making them memory
resident and handing new request to the script which is already running.
SmokePing has been optimized for use with SpeedyCGI. Note that you do NOT
need mod_speedy, just the plain and simple speedy executable, this is the
beauty of this tool it works without touching your apache ...  Otherwise you
could as well be using FastCGI or mod_perl. There is a bug in speedy with
returning error messages to the apache error log. You can find a patch in
the smokeping download area.

=item CGI::Carp

L<http://http://search.cpan.org/~lds/CGI.pm>

If you are using a version of Perl older than 5.8.1, you should consider
installing a newer version of CGI::Carp (must be at least 1.24, included in
CGI.pm-2.82). Otherwise any error messages generated by the CGI script
will not show up quite as clean as they could in the web server error log.
If you can't or don't want to upgrade CGI::Carp, you can also set
the C<changecgiprogramname> variable in the C<General> section to the
value C<no>.

=back

=head2 Installation

Once the tools listed above are in place, you can start setting up SmokePing
itself. Once the SmokePing tools are unpacked, they are more of less ready
to use. At least to the extent, that it is not necessary to B<install> them.
You may want to rename the directory to a name which does not contain the
version number of SmokePing, or at least make a symlink, so that you can use
a persistent name when referring to SmokePing files.

In the distribution you find a number of files named F<*.dist> they have to
be edited and renamed to F<*>. Below you find a short explanation for each
of the files you have to edit:


=over

=item F<bin/smokeping>

Make sure all the required libraries are available and the first line of the
script points to your copy of perl. Adjust the B<use lib> lines to point to
your B<RRDtool> installation and to the B<Smokeping/lib> directory and edit
the path of the config file to be in sync with reality.

=item F<htdocs/smokeping.cgi>

Edit the F<smokeping.cgi> analog to the F<smokeping> script above. Make sure
the first line of the script is pointing to your freshly installed copy of
Speedy CGI. Store the script in a directory of your weberver where CGIs get
executed. You also have to edit the B<use lib> line similar to what you did
to F<smokeping>. 

=item F<htdocs/cropper/*>

To make the interactive graph-zoomer work, you have to place the content of the
cropper directory somewhere on your webserver and adapt the links in F<basepage.html>
(see below).

=item F<etc/config>

Create your SmokePing configuration file. The easiest is to copy the
F<etc/config> file and work from there. Please refer to
L<smokeping_config> for details.

=item F<etc/basepage.html>

Edit the html template to your likings. Please do not remove the link to the
SmokePing counter and my name from the template. The content of the template
will be renderd by the smokeping.cgi. This means that all embeded links must
be relative to smokeping.cgi.

=item F<etc/smokemail>

If you are going to use the B<DYNAMIC> IP support, customize the contents of this file.

=back

=head2 Starting the Smokeping Daemon

With all the scaffolding in place, you can now launch the smokeping daemon and send
have it gather data for you. First you may want to run it in debug mode to see what
it is doing

 ./bin/smokeping --debug

once all is well, start it up as a deamon. I would recomend to enable the logfile
option so that you can see if it runs into trouble.

 ./bin/smokeping --logfile=smoke.log

Once the system works, you may want to put a SmokePing startup script into
your F</etc/init.d> tree. Check out L<smokeping> for further information.

When you can now also open the smokeping.cgi webpage to look at your data.

=head2 Adding SmokeTrace online Traceroute ability

If you want to add traceroute ability to your smokeping setup, check out the
L<smoketrace> manual page.

=head1 COPYRIGHT

Copyright (c) 2001, 2008 by Tobias Oetiker. All right reserved.

=head1 LICENSE

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., 675 Mass Ave, Cambridge, MA
02139, USA.

=head1 AUTHOR

Tobias Oetiker E<lt>tobi@oetiker.chE<gt>

=cut