SmokePing Installation and Configuration on FreeBSD-9.1 ======================================================= Dependencies: Required Packages: ------------------------------------------------------- RRDtool 1.2.x or later Webserver (Apache) Perl 5.8.8 or later. Optional Packages: ------------------------------------------------------- FPing - You need this to run FPing probes EchoPing - You need this to run EcoPing probes Curl - You need this for the Curl probe Dig - You need this for the DNS probe SSH - You need this for the SSH probe Required Perl Modules: ---------------------- FCGI - The module for supporting FastCGI operation. CGI, CGI::Fast - Perl CGI/FastCGI support. Config::Grammar - The configuration file parser used in smokeping LWP - LWP::UserAgent from the libwww-perl (also known as LWP) library. Optional Perl Modules: ---------------------- Socket6 - Enables smokeping to check hostnames that only resolve to an IPv6 address. Net::Telnet - You need this for the TelnetIOSPing probe. Net::OpenSSH - You need this for the OpenSSHJunOSPing probe. Net::DNS - You need this for the AnotherDNS probe. Net::LDAP - You need this for the LDAP probe. IO::Socket::SSL - You need this if you want the LDAP probe to be able to use the 'starttls' command. Authen::Radius - You need this for the Radius probe. 1. Install SmokePing 2.6.7 from ports. ---------------------------------------------------------------------------------- # cd /usr/ports/net-mgmt/smokeping # make all install clean 1.1 Enable and launch the apache service by adding the below line to /etc/rc.conf smokeping_enable=”YES” or issue the following command: # echo 'smokeping_enable="YES"' >> /etc/rc.conf 1.2 Edit the smoke ping configuration file /usr/local/etc/smokeping/config file as follows: owner = Peter Random contact = user@.bogus.gh mailhost = smtp..bogus.gh 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 = /usr/local/smokeping/htdocs/img imgurl = img datadir = /usr/local/var/smokeping piddir = /usr/local/var/smokeping cgiurl = http://pcX.sse.ws.afnog.org/smokeping.cgi smokemail = /usr/local/etc/smokeping/smokemail tmail = /usr/local/etc/smokeping/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 Change the text below in the original file ++ James menu = James title =James alerts = someloss slaves = boomer slave2 host = james.address Replace text above with that of the text below (Replace X with your servers number) ++ PCX menu = pcX title =pcX.sse.ws.afnog.org alerts = someloss # slaves = boomer slave2 host = pcX.sse.ws.afnog.org 1.3 Create the following directories by issuing the following command # mkdir -p /usr/local/var/smokeping # cd /usr/local/var # chown smokeping:smokeping ./smokeping 1.4 Create the smokeping_secrets file by copying the distribution file. # cd /usr/local/etc/smokeping # cp smokeping_secrets.dist smokeping_secrets # chmod 600 ./smokeping_secrets 1.5 Start the smoke ping daemon # /usr/local/etc/rc.d/smokeping start 2. Install mod_fcgid 2.3.6 from ports ---------------------------------------------------------------------------------- # cd /usr/ports/www/fcgi # make all install clean # cd /usr/ports/www/mod_fcgi # make all install clean 3. Configure the Apache22 server for mod_fcgid and smokeping ---------------------------------------------------------------------------------- 3.1 Edit the apache configuration file and ensure that the DirectoryIndex directive is as follows: DirectoryIndex index.php index.html index.htm smokeping.fcgi 3.2 Configure your apache server by creating a smokeping.conf file. # cd /usr/local/etc/apache/Includes # vi smokeping.conf Put the following in the smokeping.conf file LoadModule fcgid_module libexec/apache22/mod_fcgid.so AddHandler fcgid-script .fcgi Alias /smokeping "/usr/local/smokeping/htdocs" Alias /smokeimg/ /usr/local/smokeping/htdocs/img/ Alias /cropper/ /usr/local/smokeping/htdocs/cropper/ Options Indexes FollowSymLinks ExecCGI AllowOverride None Order allow,deny Allow from all 3.3 Restart the apache and smokeping daemons # /usr/local/etc/rc.d/apache22 restart # /usr/local/etc/rc.d/smokeping restart 4. Accessing the smokeping performance monitoring interface ------------------------------------------------------------------------------------ http://pcX.sse.ws.afnog.org/smokeping/smokeping.fcgi 5. Add a new probe ------------------------------------------------------------------------------------- 5.1 Edit the smokeping configuration file and add a new probe. # vi /usr/local/etc/smokeping/config Add the following text to the *****Probes***** section below the fling probe + DNS binary = /usr/bin/dig lookup = afnog.org pings = 5 step = 180 In the Targets section of the configuration file, add a new target ++ dns-server menu = dns-server probe = DNS alerts = someloss host = pcXX.sse.ws.afnog.org Save the file 5.2 Reload the smokeping daemon # /usr/local/etc/rc.d/smokeping reload 5.3 Go to the smokeping webpage to see the results of the new probe.