5. Packages :: 04 Smokeping
Connectivity grapher.
Latest Versions:
http://oss.oetiker.ch/smokeping/pub/
We need the epel repository in yum for installing mod_fcgid httpd-devel, you may choose to uninstall this repo once smokeping is up and running.
wget http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
or
wget http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
rpm -ihv .....[one of the above]
yum install mod_fcgid httpd-devel
yum install rrdtool perl-CGI-SpeedyCGI fping perl-RRD-Simple
mkdir /zone
cd /zone
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.6.tar.gz
tar xvzf smokeping-2.6.6.tar.gz
Perl for the first time
perl -MCPAN -e shell
Manual Reconfigure: cpan> o conf init
Answer no to the first question if you want to make changes to the configuration
Now we want to install any missing perl packages. Currently to get smokeping running I did not run this script, sh ./setup/build-perl-modules.sh, but rather manually installed the perl modules using perl -MCPAN -e shell
sh ./setup/build-perl-modules.sh
which is
#!/bin/bash
. `dirname $0`/sdbs.inc
for module in \
FCGI \
CGI \
CGI::Fast \
Config::Grammar \
Digest::HMAC_MD5 \
Net::Telnet \
Net::OpenSSH \
Net::SNMP \
Net::LDAP \
Net::DNS \
IO::Pty \
LWP \
; do
perlmodule $module
done
RATHER
perl -MCPAN -e shell
install FCGI
install CGI::Fast
install Config::Grammar
install Digest::HMAC_MD5
install Net::Telnet
install Net::OpenSSH
install Net::SNMP
install Net::LDAP
install Net::DNS
install IO::Pty
install LWP
cd /zone/smokeping-2.6.6
./configure --prefix=/opt/smokeping
make install
On with the configuration
cd /opt/smokeping/etc
for foo in *.dist; do cp $foo `basename $foo .dist`; done
cd /opt/smokeping/htdocs
for foo in *.dist; do cp $foo `basename $foo .dist`; done
emacs /etc/httpd/conf/httpd.conf
Add smokeping.fcgi
TO
DirectoryIndex index.html index.html.var
BECOMING
DirectoryIndex index.html index.html.var smokeping.fcgi
And at the end of the file add:
<Directory "/var/www/html/smokeping">
Options +ExecCGI
</Directory>
Now we need some directories and symbolics links in your /var/www/html, e.g :mkdir /opt/smokeping/imgln -s /opt/smokeping/htdocs /var/www/html/smokepingln -s /opt/smokeping/img /var/www/html/smokepingMay need some specific permissions. But what is created should be enough.
I also put this file in the /var/www/html/smokeping directory, for added safety.
emacs /var/www/html/smokeping/.htaccess
AddHandler cgi-script .fcgi
Options +ExecCGI
Restart httpd
emacs /opt/smokeping/etc/config
First off is /opt/smokeping/etc/config
Change the following lines
owner = Tony Arcus
contact = This e-mail address is being protected from spambots. You need JavaScript enabled to view it
mailhost = localhost
sendmail = /usr/sbin/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 = /opt/smokeping/img
imgurl = ../smokeping/img
datadir = /opt/smokeping/data
piddir = /opt/smokeping/var
cgiurl = http://mail.xxxxxxxxxx.co.nz/smokeping/smokeping.fcgi
smokemail = /opt/smokeping/etc/smokemail
tmail = /opt/smokeping/etc/tmail
# specify this to get syslog logging
syslogfacility = local0
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no
*** Alerts ***
to = This e-mail address is being protected from spambots. You need JavaScript enabled to view it
from = This e-mail address is being protected from spambots. You need JavaScript enabled to view it
template = /opt/smokeping/etc/basepage.html
In the middle
*** Slaves ***
secrets=/opt/smokeping/etc/smokeping_secrets
And at the end of this file
+ TheWorld
menu= test
#parents = owner:/Test/location:/
++ Backups
menu = Backups
title =Backups
alerts = someloss
slaves = boomer slave2
host = remote.xxxxxx.co.nz
++ WWW
menu = WWW
title =WWW
alerts = someloss
slaves = boomer slave2
host = www.xxxxxx.co.nz
Next
mkdir /opt/smokeping/data
mkdir /opt/smokeping/var
chmod 600 /opt/smokeping/etc/smokeping_secrets
chown -R apache.apache /var/www/html/smokeping
cd /opt/smokepingLets test
./bin/smokeping --config=/opt/smokeping/etc/config --debug
Let run
./bin/smokeping --config=/opt/smokeping/etc/config --logfile=smoke.log
This is pretty specific for a Centos 6 server.
Please give me feed back if this works or not for you.
Next Page: Yum Upgrades