Smokeping configuration,

Source: Internet
Author: User
Tags pings rrdtool syslog smokeping

Smokeping configuration,

Reference:

This article briefly introduces how to install and configure smokeping.

I. Environment 1. OS

Server: 10.11.4.250/CentOS-7-x86_64-1511

2. Smokeping version

Smokeping-2.6.11: http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.11.tar.gz

Ii. Install Smokeping 1. Install EPEL
# The epel version may be changed and may not be downloaded [root @ smokeping ~] after the change # Rpm-Uvh restart ~] # Yum install foo-y
2. Install dependency & Environment
# Some of the problems I encountered are: "wqy *" is not pre-installed, leading to Chinese display problems; "perl-Sys-Syslog" is not pre-installed ", in the "gmake install" stage, an error occurs: [root @ smokeping ~] # Yum install-y rrdtool wqy * fping echoping curl bind-utils httpd-devel perl-FCGI perl-CGI-SpeedyCGI perl-libwww-perl perl-Socket6 perl-Net-Telnet perl-Net-OpenSSH perl-Net-DNS perl-LDAP perl-IO-Socket-SSL perl-ExtUtils-MakeMaker rrdtool-perl-Sys-Syslog perl -RadiusPerl perl-Time-HiRes perl-RRD-Simple libxml2-devel libpng-devel glib pango-devel freetype-devel fontconfig cairo-devel libart_lgpl libart_lgpl-devel mod_fastcgi
3. Compile and install
# Note that you must build the perl module before configuring configure. Otherwise, an error is returned. [Root @ smokeping ~] # Cd/usr/local/src/[root @ smokeping src] # wget expose src] # tar-zxvf smokeping-2.6.11.tar.gz [root @ smokeping src] # cd smokeping-2.6.11 [root @ smokeping smokeping-2.6.11] #. /setup/build-perl-modules.sh/usr/local/smokeping/thirdparty [root @ smokeping smokeping-2.6.11] #. /configure -- prefix =/usr/local/smokeping [root @ smokeping smokeping-2.6.11] # gmake install
3. Configure the Smokeping 1. config file
# Create a program running directory and assign permissions to [root @ smokeping smokeping-2.6.11] # cd/usr/local/smokeping/[root @ smokeping] # mkdir var cache data [root @ smokeping] # chown apache: apache var/cache/data/# generate the cgi File and config file [root @ smokeping] # cp/usr/local/smokeping/htdocs/smokeping. fcgi. dist/usr/local/smokeping/htdocs/smokeping. fcgi [root @ smokeping] # cp/usr/local/smokeping/etc/config. dist/usr/local/smokeping/etc/config
1) General configuration
# Modifying cgiurl, General, and Alerts is one of multiple sections in the config file [root @ smokeping] # sed-I's | some. url | 10.11.4.250 | G'/usr/local/smokeping/etc/config
2) Alerts Configuration
# Someloss partial annotation default configuration, reset the monitoring mechanism [root @ smokeping] # vim/usr/local/smokeping/etc/config + somelosstype = loss # in percent # pattern => 0%, * 12 *,> 0%, * 12 *,> 0% # comment = loss 3 times in a rowpattern = 0%,> 2%,> 2%,> 2% comment = 60 packets are sent each time, packet loss rate exceeds 2% for three consecutive round robin checks # added rtt Monitoring Mechanism + rttdetecttype = rtt # in millisecondspattern = <55, <55, <55,> 55,> 55,> 55 comment = 60 packets are sent each time, and the polling check delay exceeds 55 milliseconds for three consecutive times.
3) Database Configuration
# Ping 20 times in 300 seconds by default, change to 120 second ping 30 times [root @ smokeping] # sed-I's | step = 300 | step = 120 | G'/usr/local/smokeping/etc/config [root @ smokeping] # sed-I's | pings = 20 | pings = 30 | G'/usr/local/smokeping/etc/config
4) Presentation Configuration
# Add the UTF-8 Chinese Character Set *** presentation *** charset = UTF-8 under Presentation # in the detail section of presentation, comment out the default display time of historical data, reset value + detailwidth = 600 height = 200unison_tolerance = 2 # "Last 3 Hours" 3 h # "Last 30 Hours" 30 h # "Last 10 Days" 10d # "Last 400 Days "400d" Last 10 Minutes "10 m" Last 30 Minutes "30 m" Last 4 Hours "4 h" Last 12 Hours "12 h" Last 1 Days "24 h" Last 3 days "3d" Last 1 Weeks "7d" Last 1 Mouths "30d" Last Half years "180d" Last 1 years "365d
2. Modify account File Permissions
# Change the password file permission to root read-only [root @ smokeping] # chmod 600/usr/local/smokeping/etc/smokeping_secrets.dist
3. Apache configuration
# Set the Logon account and password [root @ smokeping] # htpasswd-c/usr/local/smokeping/htdocs/htpasswd mcloudadminNew password: Re-type new password: # httpd file configuration, add smokeping configurations in the "DocumentRoot"/var/www/html "section, note the consistency of strong-related settings such as path [root @ smokeping] # vim/etc/httpd/conf/httpd. confDocumentRoot "/var/www/html" 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>
4. Set iptables
[root@smokeping smokeping]# vim /etc/sysconfig/iptables-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT[root@smokeping smokeping]# service iptables restart
5. Set startup
[root@smokeping smokeping]# echo "/usr/local/smokeping/bin/smokeping &">> /etc/rc.local
4. Add monitoring points for Smokeping. 1. Precautions

To add a monitoring site for smokeping, you must modify the config file to modify the "Targets" section.

Note:

2. Configuration example
# The following is a simple two-layer directory-level Configuration example: [root @ smokeping] # vim/usr/local/smokeping/etc/config *** Targets *** probe = FPingmenu = Toptitle = network quality monitoring system remark = SmokePing. <br> \ you can observe the network quality here. + IDCmenu = IDC network quality title = network quality monitoring statistics + + All_Monitormenu = network quality overview title = network quality overview host =/IDC/CoreSwitch/IDC/AccessSwitch + + CoreSwitchmenu = monitoring point core title = monitoring point to core alerts = somelosshost = 10.10.24.1 ++ AccessSwitchmenu = monitoring point to access title = monitoring point to access alerts = somelosshost = 10.11.4.1
5. Verify 1. Start the service
[root@smokeping ~]# systemctl start httpd[root@smokeping ~]# /usr/local/smokeping/bin/smokeping &

2. URL Login

URL Logon: http: // 10.11.4.250/smokeping

Enter the apache account/password set above to log on to the smokeping console.

1) HomePage

As you can see, the Logon account is the mcloudadmin set above. The home page and the left-side directory are all set in the "Targets" section of the config file.

2) Directory level

3) display time of historical data

Set the parameters in the detail section of the Presentation Section of the config file.

4) monitoring sampling points

In the Database section of the config file.

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.