smokeping简明安装

yum install rrdtool rrdtool-perl fping echoping curl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-CGI-SpeedyCGI perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket

tar zxvf smokeping-2.6.9.tar.gz
cd  smokeping-2.6.9
./configure --prefix=/usr/local/smokeping

会出现如下错误:

checking checking for gnu make availablility... /usr/bin/gmake is GNU make
checking checking for perl module 'RRDs'... Failed
checking checking for perl module 'FCGI'... Failed
checking checking for perl module 'CGI'... Failed
checking checking for perl module 'CGI::Fast'... Failed
checking checking for perl module 'Config::Grammar'... Failed
checking checking for perl module 'Digest::HMAC_MD5'... Ok
checking checking for perl module 'LWP'... Ok

** Aborting Configure ******************************

   If you know where perl can find the missing modules, set
   the PERL5LIB environment variable accordingly.

   FIRST though, make sure that 'perl' starts the perl
   binary you want to use for SmokePing.

   Now you can install local copies of the missing modules
   by running

     ./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty

   The RRDs perl module is part of RRDtool. Either use the rrdtool
   package provided by your OS or install rrdtool from source.
   If you install from source, the RRDs module is located
   PREFIX/lib/perl

运行:./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty 自动安装缺失的perl模块

然后再次运行./configure --prefix=/usr/local/smokeping

如果还有错,运行export PERL5LIB=/usr/local/smokeping/thirdparty/lib/perl5/

再次运行configure

/usr/bin/gmake install

即可完成smokeping的安装

然后cd /usr/local/smokeping/

创建cache、data、var目录

mkdir cache data var

配置apache通过web显示监控结果

Alias /smokeping/cache/ /usr/local/smokeping/cache/
Alias /smokeping/ /usr/local/smokeping/htdocs/
<Directory /usr/local/smokeping/htdocs/>
        Order allow,deny
        Allow from all
        Options ExecCGI
        AddHandler cgi-script .fcgi
        <IfModule dir_module>
                DirectoryIndex smokeping.fcgi
        </IfModule>
</Directory>

slave上配置

echo "passwordyoudefine" > /usr/local/smokeping/etc/slave_secret.txt
chmod 600 /usr/local/smokeping/etc/slave_secret.txt

/usr/local/smokeping/bin/smokeping --master-url=http://yourserveraddress/smokeping/smokeping.fcgi --shared-secret=/usr/local/smokeping/etc/slave_secret.txt --cache-dir=/usr/local/smokeping/cache/ --slave-name=slavename