Install and use the smokeping plug-in

Source: Internet
Author: User
Tags rrdtool install perl smokeping

1. To prevent installation dependency errors, first install third-party source for the system: rpm-uvh http://apt.sw.be/redhat/e16/en/X86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.e16.rf.x86_64.rpm

2. Install the lamp environment and rrdtool graphics processing and other dependent libraries:

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 Perl-RRD-simple rrdtool-perl curl fping echoping httpd-devel GCC make wget libxml2-devel libpng-devel glib pango

Pango-devel FreeType-devel fontconfig Cairo-devel libart_lgpl libart_lgpl-devel mod_fastcgi Screen

3. download and install the smokeping program after installing the environment

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

Tar-zxvf smokeping-2.6.9.tar.gz unzip decompressed .tar.gz compressed package

CD smokeping-2.6.9 # enter the program directory after decompression package

./Configure-Prefix =/usr/local/smokeping # Install the smokeping program under/usr/local/smokeping/path

 

################ If the smokeping program is installed for the first time, an error is reported, which indicates that the Perl module is not supported, after installing the module, run the installation program ###############################

./Setup/build-perl-modules.sh/usr/local/smokeping/thirdparty # Install the Perl module according to the error prompt

### If the Perl module is installed

You need to download and install the perl-devel and Perl-extutils-embed centos systems. You can directly install Perl-devel Perl-extutils-embed-y (in short, the system prompts you to install any plug-ins when there are few plug-ins.) install the plug-ins and execute them again. /Setup/build-perl-modules.sh/usr/local/smokeping/thirdparty

./Configure-Prefix =/usr/local/smokeping # Run the installation program again after the Perl module is loaded.

############## After the installation is successful, a prompt is displayed for compilation, compile as required ###############

/Usr/local/gmake install

############# At this point, the program has been initially installed ###################

4. Configure smokeping

4.1 create the cache var data directory And the smokeping. log file

CD/usr/local/smokeping

Mkdir cache data VaR

Touch/var/log/smokeping. Log

4.2 grant Apache permissions to the files and directories just created

CD/usr/local/smokeping

Chown-r Apache: Apache cache data VaR

Chown-r Apache: Apache/var/log/smokeping. Log

After the execution is complete, ls to check whether the result is correct:

   

4.3 modify the configuration file and the automatically generated file (the object location is consistent with that in the config configuration)

CD/usr/local/smokeping/htdocs/

MV smokeping. fcgi. Dist smokeping. fcgi

CD/usr/local/smokeping/etc

MV config. Dist config

Vim config

# Find cgiurl = http://some.url/smokeping.cgi to change some. URL to a local IP or domain name ##

# Locate the step (monitoring time) and pings (Ping times) in the ** database ** Column) change the value of to your own settings #### change all to 60 is 60 seconds ping60 times ##

  

  

4.4 modify and verify the Password File Permissions

Chmod 600/usr/local/smokeping/etc/smokeping_secrets.dist

  

5. Modify Apache configuration

Vim/etc/httpd/CONF/httpd. conf

#### Add the following code under the DocumentRoot "/var/www/html" line:

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

Order allow, deny

Allow from all

Authname "smokeping"

Authtype basic

Authuserfile/usr/local/smokeping/htdocs/htpasswd

Require valid-user

Directoryindex smokeping. fcgi

</Directory>

 

6. Set the startup of Apache and smokeping processes and disable the firewall.

Echo "/usr/local/smokeping/bin/smokeping-logfile =/var/log/smokeping. log 2> & 1 &">/etc/rc. Local

Chkconfig httpd on

Chkconfig iptables off

7. Start httpd and smokeping

Service httpd restart

/Usr/local/smokeping/bin/smokeping -- logfile =/var/log/smokeping. Log

8. Open the Web interface to test

####### If the "500" error is returned, The SELinux option is not disabled ######

Vim/etc/sysconfig/SELinux

Change to SELinux = Disable or SELinux = permissive

9. Set the Web user name and password

CD/usr/local/smokeping/htdocs

Htpasswd-C/usr/local/smokeping/htdocs/htpasswd admin # Set the account to admin and press enter to prompt you to enter

10. Synchronize host time and configure config Parameters

Ntpdate 210.72.145.44 # The local time can also be synchronized, depending on the detection point

Vim/usr/local/smokeping/etc/config

* ** Presentation ***

Charset = UTF-8 // recognize Chinese Characters

&, Smokeping installation is complete, the rest is to add the smokeping plug-in and set its monitoring parameters &&&&&&&&&&&&&&&&&&&&&&&&&&&&& &

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.