How to install smokeping2.6.8 in centos6.3

Source: Internet
Author: User
Tags pings rrd rrdtool install perl smokeping

How to install smokeping2.6.8 in centos6.3

Smokeping is the best test tool for IDC network quality and stability, including general Ping, dig, echoping, and curl. It can monitor WWW server performance and DNS query performance, monitors SSH performance.


1. Disable firewall and SELinux services

[[Email protected] ~] # Service iptables stop

[[Email protected] ~] # Setenforce 0


2. Use Yum to install the HTTPd service and some library files

[[Email protected] ~] # Yum-y install httpd-devel GCC make curl wget

[[Email protected] ~] # Yum-y install libxml2-devel libpng-devel glib pango-devel \ FreeType-devel fontconfig Cairo-devel \ libart_lgpl libart_lgpl-dev


3. Install rrdtool

Wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz

[[Email protected] ~] # Yum-y install Perl-net-Telnet Perl-net-DNS Perl-LDAP Perl-libwww-perl \ Perl-radiusperl Perl-io-socket-SSL perl-Socket6 Perl-CGI- speedycgi \ Perl-fcgi Perl-CGI-speedcgi Perl-time-hires Perl-extutils-makemaker \

[[Email protected] Wang] # tar zxvf rrdtool-1.4.7.tar.gz

[[Email protected] rrdtool-1.4.7] # cd rrdtool-1.4.7

[[Email protected] rrdtool-1.4.7] #./configure -- prefix =/usr/local/rrdtool

[[Email protected] rrdtool-1.4.7] # Make

[[Email protected] rrdtool-1.4.7] # make install

[[Email protected] rrdtool-1.4.7] #/usr/local/rrdtool/bin/rrdtool-V if the following message appears, the installation is successful!

Rrdtool 1.4.7 copyright 1997-2010 by Tobias oetiker

Compiled JUN 17 2012 09:50:49

Usage: rrdtool [Options] command command_options

Valid commands: Create, update, updatev, graph, graphv, dump, restore,

Last, lastupdate, first, info, fetch, tune,

Resize, xport, flushcached

Rrdtool is distributed under the terms of the GNU General

Public License version 2. (www.gnu.org/copyleft/gpl.html)

For more information read the RRD manpages


4. Install cgilib

Wget http://down1.chinaunix.net/distfiles/cgilib-0.5.tar.gz

[[Email protected] Wang] # tar zxvf cgilib-0.5.tar.gz

[[Email protected] cgilib-0.5] # cd cgilib-0.5

[[Email protected] cgilib-0.5] # Make

[[Email protected] cgilib-0.5] # cp libcgi. A/usr/local/lib

[[Email protected] cgilib-0.5] # cp libcgi. A/usr/local/lib64

[[Email protected] cgilib-0.5] # cp CGI. h/usr/include


5. Install FPING-2.4B_TO

Wget http://oss.oetiker.ch/smokeping/pub/fping-2.4b2_to4-ipv6.tar.gz

[[Email protected] Wang] # tar zxvf fping.tar.gz

[[Email protected] Wang] # fping-2.4b2_to4-ipv6/CD/

[[Email protected] fping-2.4b2_to4-ipv6] #./configure

[[Email protected] fping-2.4b2_to4-ipv6] # Make

[[Email protected] fping-2.4b2_to4-ipv6] # Make check

[[Email protected] fping-2.4b2_to4-ipv6] # make install


6. Install echoping

Wget http://jaist.dl.sourceforge.net/project/echoping/echoping/6.0.0/echoping-6.0.0.tar.gz

[[Email protected] ~] # Yum install popt-devel gettext libidn-devel

[[Email protected] Wang] # tar zxvf echoping-6.0.0.tar.gz

[[Email protected] Wang] # cd echoping-6.0.0

[[Email protected] echoping-6.0.0] #./configure

[[Email protected] echoping-6.0.0] # Make

[[Email protected] echoping-6.0.0] # make install


7. Install fcgi

Wget http://cpan.communilink.net/authors/id/F/FL/FLORA/FCGI-0.74.tar.gz

[[Email protected] Wang] # tar zxvf FCGI-0.74.tar.gz

[[Email protected] Wang] # cd FCGI-0.74

[[Email protected] FCGI-0.74] # Perl makefile. pl

[[Email protected] FCGI-0.74] # Make

[[Email protected] FCGI-0.74] # make install


8. Install mod_fastcgi and DSO

[[Email protected] Wang] # tar zxvf mod_fastcgi-2.4.6.tar.gz

[[Email protected] Wang] # cd mod_fastcgi-2.4.6

[[Email protected] mod_fastcgi-2.4.6] # apxs-O mod_fastcgi.so-C *. c

[[Email protected] mod_fastcgi-2.4.6] # apxs-I-a-n FastCGI. libs/mod_fastcgi.so


9. Install smokeping

Wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz

[[Email protected] # Yum install CPAN

[[Email protected] Wang] # tar zxvf smokeping-2.6.8.tar.gz

[[Email protected] Wang] # cd smokeping-2.6.8

[[Email protected] smokeping-2.6.8] # cp/usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/rrds. PM/usr/lib64/perl5

[[Email protected] smokeping-2.6.8] # cp/usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/rrds. So/usr/lib64/perl5

[[Email protected] smokeping-2.6.8] #./configure -- prefix =/usr/local/smokeping

After the following four commands are executed, execute./configure -- prefix =/usr/local/smokeping. Otherwise, an error is reported when you execute/usr/bin/gmake install.

[[Email protected] smokeping-2.6.8] #./Setup/build-perl-modules.sh/usr/local/smokeping/thirdparty

[[Email protected] smokeping-2.6.8] # Perl-mcpan-e 'Install CGI 'd

[[Email protected] smokeping-2.6.8] # Perl-mcpan-e 'Install CGI: quick'

[[Email protected] smokeping-2.6.8] # Perl-mcpan-e 'config: grammar'

[[Email protected] smokeping-2.6.8] #/usr/bin/gmake install


10. verify whether the installation of smokeping is successful!

[[Email protected] smokeping-2.6.8] # cd/usr/local/smokeping/

[[Email protected] smokeping] # ls

If the following directories are found, the installation of smokeping is successful!

Bin etc htdocs lib share thirdparty


11. Create and modify data, VAR, cache, and smokeing log files

[[Email protected] ~] # Mkdir/usr/local/smokeping/Data

[[Email protected] ~] # Mkdir/usr/local/smokeping/var

[[Email protected] ~] # Mkdir/usr/local/smokeping/Cache

[[Email protected] ~] # Touch/var/log/smokeping. Log

[[Email protected] ~] # Chown Apache. Apache/var/log/smokeping. Log

[[Email protected] ~] # Chown-r Apache. Apache/usr/local/smokeping/


12. Modify the name of the smokeping configuration file.

[[Email protected] ~] # Cp-A/usr/local/smokeping/htdocs/smokeping. fcgi. Dist smokeping. fcgi

[[Email protected] ~] # Cp-A/usr/local/smokeping/etc/config. Dist config


13. Change Password File Permissions

[[Email protected] ~] # Chmod 600/usr/local/smokeping/etc/smokeping_secrets.dist

[[Email protected] ~] # Ls-LH/usr/local/smokeping/etc/smokeping_secrets.dist


14. Modify the main configuration file of smokeping.

[[Email protected] ~] # Vi/usr/local/smokeping/etc/config

Cgiurl = http: // 192.168.1.10/smokeping. CG // This is the path to access smokeping


* ** Database ***

Step = 60 60 seconds ping20 packets

Pings = 20


* ** Presentation ***

Template =/usr/local/smokeping/etc/basepage.html. Dist

Charset = a new line of content added by the UTF-8


+ Fping: Modify the fping path.

Binary =/usr/local/sbin/fping

Packages size = 2000


[[Email protected] ~] # Vi/usr/local/smokeping/bin/smokeping

Use lib QW (/usr/local/rrdtool/lib/perl );

Use lib QW (/usr/local/smokeping/LIB );


15. Configure the main configuration file of the Apache service

[[Email protected] local] # vi/etc/httpd/CONF/httpd. conf

Alias/cache "/usr/local/smokeping/Cache /"


Alias/Cropper "/usr/local/smokeping/htdocs/Cropper /"


Alias/smokeping "/usr/local/smokeping/htdocs/smokeping. fcgi"


<Directory "/usr/local/smokeping">


AllowOverride none


Options all


Addhandler CGI-script. fcgi. cgi


AllowOverride authconfig


Order allow, deny


Allow from all


Authname "smokeping"


Authtype basic


Authuserfile/usr/local/smokeping/htdocs/htpasswd


Require valid-user


Directoryindex smokeping. fcgi


</Directory>


16. Create an account for logging on to smokeping and set a password.

[[Email protected] ~] # Htpasswd-C/usr/local/smokeping/htdocs/htpasswd Admin


17. Compile a smokeping Startup Script

[[Email protected] ~] # Vi/etc/init. d/smokeping

#! /Bin/bash

Pidfile =/usr/local/smokeping/var/smokeping. PID

Smokeping =/usr/local/smokeping/bin/smokeping

Error = 0

Running = 0

Argv = "[email protected]"

If ["x $ argv" = "X"]; then

ARGs = Help

Fi

For ARG in [email protected] $ ARGs

Do

If [-F $ pidfile]; then

PID = 'cat $ pidfile'

If kill-0 $ PID 2>/dev/NULL; then

# Smokeping is running

Running = 1

Else

# Smokeping not running but PID file exists => Delete PID File

Rm-F $ pidfile

Running = 0

Fi

Else

# Smokeping (no PID file) not running

Running = 0

Fi

Case $ ARG in

Start)

If [$ running-EQ 0]; then

If $ smokeping>/dev/NULL; then

Echo "$0 $ Arg: smokeping started"

Else

Echo "$0 $ Arg: smokeping cocould not be started"

Error = 1

Fi

Else

Echo "$0 $ Arg: smokeping is running with PID $ PID"

Error = 2

Fi

;;

Stop)

If [$ running-EQ 1]; then

If kill $ PID; then

Echo "$0 $ Arg: smokeping ($ PID) STOPPED"

Rm $ pidfile

Else

Echo "$0 $ Arg: smokeping cocould not be stopped"

Error = 3

Fi

Else

Echo "$0 $ Arg: smokeping not running"

Error = 4

Fi

;;

Restart)

If [$ running-EQ 1]; then

If $ smokeping -- restart>/dev/NULL; then

Echo "$0 $ Arg: smokeping restarted"

Else

Echo "$0 $ Arg: smokeping cocould not be started"

Error = 5

Fi

Else

$0 start

Fi

;;

Strace_debug)

Rm-F/tmp/strace_smokeping

If [$ running-EQ 1]; then

If strace-O/tmp/strace_smokeping $ smokeping -- restart>/dev/NULL; then

Echo "$0 $ Arg: smokeping restarted with strace debug in/tmp/strace_smokeping"

Else

Echo "$0 $ Arg: smokeping strace debug cocould not be started"

Error = 6

Fi

Else

If strace-O/tmp/strace_smokeping $ smokeping>/dev/NULL; then

Echo "$0 $ Arg: smokeping started with strace debug in/tmp/strace_smokeping"

Else

Echo "$0 $ Arg: smokeping strace debug cocould not be started"

Error = 7

Fi

Fi

;;

Status)

If [$ running-EQ 1]; then

Echo "$0 $ Arg: smokeping is running with PID ($ PID )"

Else

Echo "$0 $ Arg: smokeping is not running"

Fi

;;

*)

Echo "Usage: $0 (START | stop | restart | status | strace_debug | help )"

Cat

Start-start smokeping

Stop-Stop smokeping

Restart-Restart smokeping if running or start if not running

Status-show status if smokeping is running or not

Help-this screen

EOF

;;

Esac

Done

Exit $ Error



17. Grant the script execution permission

[[Email protected] ~] # Chmod + x/etc/init. d/smokeping


18. Check whether the smokeping configuration file is incorrect and start the smokeping and httpd services.

[[Email protected] ~] # Service httpd retsart

[[Email protected] ~] #/Usr/local/smokeping/bin/smokeping -- check


[[Email protected] ~] # Echo "/usr/local/smokeping/bin/smokeping -- logfile =/var/log/smokeping. log 2> & 1 &">/etc/rc. Local


19. Visit the smokeping page.

Http: // 192.168.1.10/smokeping

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/2C/wKioL1P3PN7Qu6p1AAFNNZz0qPs430.jpg "Title =" @ 0 {~ Ph$@5do9ett?ems1=dj.jpg "alt =" wkiol1p3pn7qu6p1aafnnzz0qps#.jpg "/>20. Briefly introduce the usage of the smokeping main configuration file

General is a basic configuration. Note that the imgcache and imgurl parameters are associated with the Apache configuration. If the configuration is incorrect, the image cannot display the default path when you open the web, if you change the path, you also need to change it.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/2C/wKioL1P3Pu3gDrdtAAHYpquutRE625.jpg "Title =" hsf-1j6oj'2qjfhz'%5wcp%%5.jpg "alt =" wkiol1p3pu%drdtaahypquutre625.jpg "/>

Alerts is an alarm setting.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/2C/wKioL1P3P0Lwg2dyAAEZXoTny-8952.jpg "Title =" gx33169policy'aio7a6dbwicu8o8.jpg "alt =" wKioL1P3P0Lwg2dyAAEZXoTny-8952.jpg "/>

Database is the configuration of the RRD database. The parameters step and pings must be configured before the smokeping is started. If you configure these parameters after the smokeping is started, you must delete the original RRD file, then start smokeping. Step = 30 pings = 20 indicates that 20 ping operations are performed every S.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/2A/wKiom1P3QEmB7_9PAAC-VwgEcNA831.jpg "Title ="} pzayv304u (q) 5tqx33 ~ 'Kb.jpg "alt =" wKiom1P3QEmB7_9PAAC-VwgEcNA831.jpg "/>

Presentation is a configuration and explanation of the network status, which basically does not need to be changed.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/2C/wKioL1P3Qp2iYnM8AAGY9YvjNMM806.jpg "Title =" yd1_bifdw'0000_u9pdgv05@qzh.jpg "alt =" wkiol1p3qp2iynm8aagy9yvjnmm806.jpg "/>

Configure the probes pointer to ensure that the fping path is correct. The packetsize parameter sets the fping value.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/2C/wKioL1P3QxHBy12gAABRRmjSqH0096.jpg "Title =" e)om}xxfcd{h(%9jx(atkff.jpg "alt =" wkiol1p3qxhby12gaabrrmjsqh0096.jpg "/>

Targets: configure the objects you monitor

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/2B/wKiom1P3RE6wYmcMAAH6R-gQU6U755.jpg "Title =" ojt1_dh_21__'{lp0}wqe0px9.jpg "alt =" wKiom1P3RE6wYmcMAAH6R-gQU6U755.jpg "/>

21. Summary of problems with installing smokeping

The following problems are caused by incorrect operations. If you are careful, these problems can be avoided.

(1) After smokeping is installed, http: // 192.168.1.10/smokeping always prompts 404 error when accessing smokeping?

The reason is that when I run CP-A/usr/local/smokeping/htdocs/smokeping. fcgi. CGI smokeping. the fcgi name remains unchanged, so an error is reported. The solution is to enter the Directory and modify the name.

(2) When starting smokeping, the system prompts error: slave 'boomer 'is not defined in the' *** slaves *** 'section?

Solution: VI/usr/local/smokeping/etc/config Add a node in slaves.

(3) After smokeping is successfully installed, is there a graph but no data?

Check whether the two main configuration files below smokeping generate the RRD and PNG files

/Usr/local/smokeping/data/test RRD file generation path

Check whether PNG files exist in/usr/local/smokeping/Cache/test/cache and test directories.


View the permissions of the smokeping home directory

Ls-LH/usr/local/smokeping/


Check whether the device you monitor is normal and whether SELinux and iptables of the monitor are disabled.


When adding a monitoring device to the smokeping master configuration file, the following format is required. Otherwise, no data is displayed and the title directory must be in English.

+ Qitawangluo

++ Dianxin-hlj

+++ Dianxin-zongliebiao

I didn't display the data here because I added the added monitoring node to the targets level-1 directory, A level-1 directory should be created separately, and then level-2 and level-3 should be written into Chinese!

The normal figure is as follows:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/2B/wKiom1P3Sa-hvYEzAALRNU0DtJQ781.jpg "Title =" $427 m $ K ~~ 0'(6wtw.tmt97fn.jpg "alt =" wKiom1P3Sa-hvYEzAALRNU0DtJQ781.jpg "/>

The installation and configuration of smokeping can help you with the first installation of smokeping!




















How to install smokeping2.6.8 in centos6.3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.