Smokeping Monitoring of the network

Source: Internet
Author: User
Tags cairo rrdtool install perl smokeping

smokeping It can be used to detect network status and stability.


1, adjust the firewall settings

[[Email protected] ~]# /etc/init.d/iptables stopiptables: setting chains to  policy ACCEPT: filter          [   ok  ]iptables: flushing firewall rules:                          [   OK  ]iptables: Unloading modules:                                 [  OK  ][[email protected] ~]#  chkconfig iptables off[[email protected] ~]# getenforce enforcing[[email  protected] ~]# setenforce 0[[email protected] ~]# vim /etc/sysconfig/ SELINUX changes "selinux=enforcing" to "SelinuX=disabled " 

2. Modify the Yum installation source

[Email protected] ~]# Vim/etc/sysconfig/selinux [[email protected] ~]# RPM-UVH http://apt.sw.be/redhat/el6/en/x86_64/ Rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpmretrieving http://apt.sw.be/redhat/el6/en/x86_64/ Rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpmwarning:/var/tmp/rpm-tmp.7a2toz:header V3 DSA/SHA1 Signature, key ID 6b8d79e6:nokeypreparing ... ########################################### [100%] 1:rpmfor Ge-release ########################################### [100%]

3. Install RRDtool and dependent libraries

[Email protected] ~]# yum-y install perl 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 Rrdtool-perl Curl fping echoping httpd httpd-devel gcc make wget libxml2-devel libpng-devel glib Pango pango-devel freetype freetype-devel fontconfig Cairo cairo-devel LIBART_LGPL libart_lgpl-devel mod_fastcgi

4, Installation smokeping

[[Email protected] ~]# tar zxvf smokeping-2.6.9.tar.gz[[email protected] ~]# CD The problem with smokeping-2.6.9 is that you need to install Perl modules, so run the following [[email protected] ~]#./setup/build-perl-modules.sh/usr/local/ Smokeping/thirdparty[[email protected] ~]#/configure--prefix=/usr/local/smokeping[[email protected] ~]#/usr/bin/ Gmake Install

5, Configuration Smokeping

[[email protected] smokeping-2.6.9]# cd /usr/local/smokeping/[[email protected]  smokeping]# mkdir -p var cache data[[email protected] smokeping]#  touch /var/log/smokeping.log[[email protected] smokeping]# chown apache:apache  var cache data[[email protected] smokeping]# chown apache:apache /var/log/ smokeping.log [[email protected] smokeping]# lsbin  cache  data   etc  htdocs  lib  share  thirdparty  var[[email  protected] smokeping]# cd /usr/local/smokeping/htdocs/[[email protected] htdocs]#  lscropper  smokeping.fcgi.dist[[email protected] htdocs]# cp -p  smokeping.fcgi.dist /tmp/[[email protected] htdocs]# mv smokeping.fcgi.dist  Smokeping.fcgi[[email protected] htdocs]# cd /usr/local/smokeping/etc/[[email protected] etc]#  Lsbasepage.html.dist  examples        smokeping_ secrets.distconfig.dist         smokemail.dist   tmail.dist[[email protected] etc]# cp -p config.dist /tmp/[[email protected ] etc]# mv config.dist config[[email protected] etc]# vim config
A. Modify "Cgiurl = http://some.url/smokeping.cgi" to "Cgiurl = http://192.168.1.14/smokeping.cgi" B. "The St EP = 300 "modified to" step = 60 ", sample step = pings = 20[[email protected] etc]# chmod 600/usr/loca per minute L/smokeping/etc/smokeping_secrets.dist notes: Modify password file permissions

6, adjust the configuration of Apache

[[email protected] etc]# vim /etc/httpd/conf/httpd.conf Add the following information: # # #set  for  smokeping## #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 "&GT;ALLOWOVERRIDE&NBSP;NONEOPTIONS&NBSP;ALLADDHANDLER&NBSP;CGI-SCRIPT&NBSP;.FCGI&NBSP; cgiallowoverride authconfigorder allow,denyallow from allauthname  "Smokeping" AuthType  BasicAuthUserFile /usr/local/smokeping/htdocs/htpasswdRequire valid-userDirectoryIndex  smokeping.fcgi</directory>[[email protected] etc]# cd /usr/local/smokeping/htdocs/[[ email protected] htdocs]# htpasswd -c /usr/local/smokeping/htdocs/htpasswd  Adminnew password: re-type new password: adding password for user  admin

7, set smokeping boot

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

8. Add smokeping Boot Script

In the/ETC/INIT.D directory, create a new smokeing file with the following contents: #!/bin/bash # # chkconfig: 2345 80 05 #  Description: Smokeping init.d script # Hacked by : jeff  Kang - http://www.jffnms.net # get function from functions library  . /etc/init.d/functions # start the service smokeping start ()  {  echo -n  "starting smokeping: "  /usr/local/smokeping/bin/smokeping >/dev /null 2>&1 ### create the lock file ### touch /var/lock/ subsys/smokeping success $ "Smokeping startup"  echo } # restart the  service smokeping stop ()  { echo -n  "stopping smokeping: "   kill -9  ' ps ax | grep  " /usr/local/smokeping/bin/smokeping"  |  grep -v grep | awk  ' { print $1 } '  >/dev/null 2>&1 ### Now,  Delete the lock file ### rm -f /var/lock/subsys/smokeping success  $ "Smokeping shutdown"  echo } ### main logic ### case  "$"  in start)  start ;;  stop)  stop ;;  status)  status Smokeping ;;  restart|reload|condrestart)  stop start ;;  *)  echo $ "Usage: $0 {start|stop|restart|reload|status}"  exit 1 esac  exit 0

9, opening smokeping service

[[email protected] init.d]# /etc/init.d/smokeping  startstarting smokeping:                                          [  ok  ][[email protected]  init.d]# ps -ef | grep smokeping root        9670      1  0 17:42 ?         00:00:00 /usr/local/smokeping/bin/smokeping [FPing]root        9673   1264  0 17:42 pts/0     00:00:00 grep smokeping then we can enter the smokeping by entering the user name and password via http://192.168.1.144/smokeping.cgi. 

10, smokeping inside open Chinese support and install Chinese fonts

[[email protected] htdocs]# Vim/usr/local/smokeping/etc/config If you need to display Chinese in the Web page, modify the/usr/local/smokeping/etc/config file * * * Presentation ***charset = utf-8//NOTE: add here [[email protected] htdocs]# yum-y install wqy*

11, add monitoring information, restart the service, make the configuration effective

[[email protected] htdocs]# vim /usr/local/smokeping/etc/config [[email  protected] htdocs]# /etc/init.d/smokeping stopstopping smokeping:                                          [   ok  ][[email protected] htdocs]# /etc/init.d/smokeping startstarting  Smokeping:                                          [  ok  ][[email protected] htdocs]#  ps -ef | grep smokepingroot       9861       1   0 18:04 ?        00:00:00 /usr/local/smokeping/ bin/smokeping [fping]root       9864   1442   0 18:04 pts/1    00:00:00 grep smokeping

12. Other Information

Check the smokeping configuration file [[email protected] htdocs]#/usr/local/smokeping/bin/smokeping--checkconfiguration file '/usr/local /smokeping/bin/. /etc/config ' Syntax OK. [[email protected] htdocs]#/usr/local/smokeping/bin/smokeping--help Description: + Gansu//note, here the plus sign must be in English, cannot be chinese menu = Gansu title = Gansu + + Daliang//Similarly, here ' + + ' after must be in English, + and + + content behind the will not be realistic, just play a role in naming. menu = Girder title = girder: 10.138.1.11host = 10.138.1.11alerts = Someloss, Level Two, level three directory structure: + Yijimenu = First Level title = First Class + + Erjimenu = two level tit Le = level two + + + + Sanjimenu = Sanjititle =sanji:10.138.16.54host = 10.138.16.54alerts = Somelosstitle represents the title of the picture on the right, Memu represents the menu on the left.


This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1764246

Smokeping Monitoring of the network

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.