Smokeping with FreeBSD


SmokePing keeps track of your network latency:
    Best of breed latency visualisation.
    Interactive graph explorer.
    Wide range of latency measurment plugins.
    Master/Slave System for distributed measurement.
    Highly configurable alerting system.
    Live Latency Charts with the most 'interesting' graphs.

Installation

#  cd /usr/ports/net-mgmt/smokeping
[/usr/ports/net-mgmt/smokeping]# make config-recursive install clean

================================================================
SmokePing has now been installed in /usr/local/smokeping/.
NOTE: A set of sample configuration files have been installed:
  /usr/local/etc/smokeping/config
  /usr/local/etc/smokeping/smokemail
  /usr/local/etc/smokeping/basepage.html
  /usr/local/etc/smokeping/tmail

You *MUST* edit these to suit your requirements. Please read the
manpages 'smokeping_install' and 'smokeping_config' for further
details on installation and configuration.

Once configured, you can start SmokePing by adding:
  smokeping_enable="YES"
to /etc/rc.conf, and then running, as root:
  /usr/local/etc/rc.d/smokeping start
To enable Apache web access, add something like the following to
your /usr/local/etc/apache/httpd.conf:
  DocumentRoot /usr/local/smokeping/htdocs
  ScriptAlias /smokeping.cgi /usr/local/smokeping/htdocs/smokeping.cgi
  ScriptAlias /tr.cgi /usr/local/smokeping/htdocs/tr.cgi

Enjoy!
================================================================

Configuration

1) Move Smokeping htdocs, lib, var folders
from /usr/local/smokeping/htdocs to /usr/local/www/smokeping
from /usr/local/smokeping/lib to /usr/local/www/smokeping-lib
from /usr/local/var/smokeping/ to /usr/local/www/smokeping-rrd
edit
/usr/local/www/smokeping/smokeping.cgi
/usr/local/www/smokeping/tr.cgi
/usr/local/bin/smokeping

use lib qw(/usr/local/www/smokeping-lib);

2) Apache22 httpd.conf
LoadModule speedycgi_module   libexec/apache22/mod_speedycgi.so
#LoadModule speedycgi_module   libexec/apache2/mod_speedycgi.so
#LoadModule fcgid_module libexec/apache22/mod_fcgid.so
Alias /smokeping "/usr/local/smokeping/htdocs"
Alias /smokeimg/ /usr/local/smokeping/htdocs/img/
Alias /cropper/ /usr/local/smokeping/htdocs/cropper/

<Directory /usr/local/smokeping/htdocs>
 Options Includes ExecCGI
  DirectoryIndex smokeping.fcgi
  AddHandler cgi-script .cgi
  AddHandler cgi-script .fcgi
#  AddHandler fcgid-script .fcgi
 AllowOverride All
 Order deny,allow
 Allow from 10.0.200
 Deny from all
</Directory>

SpeedyCGI 2.22
# cd /usr/ports/www/p5-CGI-SpeedyCGI/
# make install clean


3) Prepare Smokeping Log Files
touch /var/log/smokeping.log
chown smokeping:smokeping /var/log/smokeping.log

4) Edit Smokeping Config
$ee /usr/local/etc/smokeping/config
*** General ***
owner    = MY COMPANY
contact  = noc@my-company.com
mailhost = mail.my-company.com
sendmail = /usr/lib/sendmail
# NOTE: do not put the Image Cache below cgi-bin since all files under cgi-bin will be executed ...
# this is not good for images.
imgcache = /usr/local/www/smokeping/img/
imgurl   = /smokeimg
datadir  = /usr/local/www/smokeping-rrd
piddir   = /var/run/smokeping
cgiurl   = http://my-company.com/smokeping.cgi
smokemail = /usr/local/etc/smokeping/smokemail
tmail = /usr/local/etc/smokeping/tmail
syslogfacility = local0
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no
*** Alerts ***
to = noc@my-company.com
from = smokeping@my-company.com

+bigloss
type = loss
pattern = <100%,>50%,>50%
comment = host not responding
...



Customizations to the Smokeping web page templates can be made in the following config files:
/usr/local/etc/smokeping/smokemail
/usr/local/etc/smokeping/basepage.html
/usr/local/etc/smokeping/tmail

Customize
# cd /usr/ports/net/tcping
[/usr/ports/net/tcping]# make config-recursive install clean


# locate tcptraceroute
/usr/ports/net/tcptraceroute
# cd /usr/ports/net/tcptraceroute
# make config-recursive install clean

Starting
/usr/local/etc/rc.d/smokeping restart

http://scratching.psybermonkey.net/2009/08/smokeping-how-setup-logging-or-debuging.html



Final notes after building
=================================================================

SmokePing has now been installed in /usr/local/smokeping/.

NOTE: A set of sample configuration files have been installed in
/usr/local/etc/smokeping.

You *MUST* edit these to suit your requirements. Please read the
manpages 'smokeping_install' and 'smokeping_config' for further
details on installation and configuration.

If you are upgrading from a previous version of Smokeping, the
manpage 'smokeping_upgrade' may be of help.

Once configured, you can start SmokePing by adding:

  smokeping_enable="YES"

to /etc/rc.conf, and then running, as root:

  /usr/local/etc/rc.d/smokeping start

For configuration of web access, please see the 'smokeping_install'
manpage.

Enjoy!

=================================================================
===>   Compressing manual pages for smokeping-2.6.9
===>   Registering installation for smokeping-2.6.9
Installing smokeping-2.6.9... done
===>  Cleaning for p5-CGI-Session-4.48
===>  Cleaning for p5-SNMP_Session-1.13_2
===>  Cleaning for p5-libwww-6.05
===>  Cleaning for p5-CGI.pm-3.63,1
===>  Cleaning for p5-FCGI-0.74
===>  Cleaning for p5-Config-Grammar-1.10
===>  Cleaning for rrdtool-1.4.8
===>  Cleaning for echoping-6.0.0_4
===>  Cleaning for p5-Authen-Radius-0.24
===>  Cleaning for p5-Net-Telnet-3.04
===>  Cleaning for p5-Authen-NTLM-1.09
===>  Cleaning for p5-Encode-Locale-1.03
===>  Cleaning for p5-File-Listing-6.04
===>  Cleaning for p5-HTML-Parser-3.71
===>  Cleaning for p5-HTTP-Cookies-6.01
===>  Cleaning for p5-HTTP-Daemon-6.01
===>  Cleaning for p5-HTTP-Date-6.02
===>  Cleaning for p5-HTTP-Message-6.06_2
===>  Cleaning for p5-HTTP-Negotiate-6.01
===>  Cleaning for p5-LWP-MediaTypes-6.02
===>  Cleaning for p5-Net-HTTP-6.06
===>  Cleaning for p5-URI-1.60
===>  Cleaning for p5-WWW-RobotRules-6.02
===>  Cleaning for p5-Crypt-SSLeay-0.64
===>  Cleaning for p5-LWP-Protocol-https-6.04
===>  Cleaning for intltool-0.50.2
===>  Cleaning for freetype2-2.5.2
===>  Cleaning for cairo-1.10.2_7,2
===>  Cleaning for png-1.5.17
===>  Cleaning for pango-1.34.1_1
===>  Cleaning for dejavu-2.34
===>  Cleaning for popt-1.16
===>  Cleaning for openldap-client-2.4.38
===>  Cleaning for p5-Data-HexDump-0.02
===>  Cleaning for p5-HTML-Tagset-3.20
===>  Cleaning for p5-IO-HTML-1.00
===>  Cleaning for p5-IO-Socket-SSL-1.962
===>  Cleaning for p5-Mozilla-CA-20130114
===>  Cleaning for p5-XML-Parser-2.41_1
===>  Cleaning for xcb-util-renderutil-0.3.8
===>  Cleaning for pixman-0.32.4
===>  Cleaning for libXrender-0.9.8
===>  Cleaning for fontconfig-2.11.0_1,1
===>  Cleaning for cmake-2.8.12.1
===>  Cleaning for libXft-2.3.1
===>  Cleaning for gobject-introspection-1.36.0_2
===>  Cleaning for harfbuzz-0.9.25
===>  Cleaning for xorg-fonts-truetype-7.7_1
===>  Cleaning for encodings-1.0.4_1,1
===>  Cleaning for gnomehier-3.0
===>  Cleaning for p5-Net-SSLeay-1.57
===>  Cleaning for p5-IO-Socket-IP-0.27
===>  Cleaning for p5-Socket-2.013
===>  Cleaning for xcb-util-0.3.9_1,1
===>  Cleaning for renderproto-0.11.1
===>  Cleaning for cmake-modules-2.8.12.1_1
===>  Cleaning for python2-2_2
===>  Cleaning for icu-50.1.2
===>  Cleaning for graphite2-1.2.4
===>  Cleaning for font-bh-ttf-1.0.3_1
===>  Cleaning for font-misc-meltho-1.0.3_1
===>  Cleaning for font-misc-ethiopic-1.0.3_1
===>  Cleaning for mkfontscale-1.1.1
===>  Cleaning for bdftopcf-1.0.4
===>  Cleaning for font-util-1.3.0_1
===>  Cleaning for mkfontdir-1.0.7
===>  Cleaning for libfontenc-1.1.2
===>  Cleaning for libXfont-1.4.7,1
===>  Cleaning for fontsproto-2.1.2
===>  Cleaning for smokeping-2.6.9