Centos下smokeping的安装配置
title content-title">环境:
CentOS+rrdtool+smokeping实现网络监控
前提软件需求:
freetype-devel-2.1.9-1.i386.rpm
zlib-devel-1.2.1.2-1.i386.rpm
libpng-devel-1.2.7-1.i386.rpm
libart_lgpl-devel-2.3.16-3.i386.rpm
fping
CGI-SpeedyCGI-2.22.tar.gz
系统需求:
1安装 fping
64位 wget http://dag.wieers.com/rpm/packages/fping/fping-2.4-1.b2.2.el5.rf.x86_64.rpm
32位 wget http://dag.wieers.com/rpm/packages/fping/fping-2.4-1.b2.2.el5.rf.i386.rpm
2 安装CGI-SpeedyCGI
wget http://daemoninc.com/SpeedyCGI/CGI-SpeedyCGI-2.22.tar.gz
tar zxvf CGI-SpeedyCGI-2.22.tar.gz
cd CGI-SpeedyCGI-2.22
perl Makefile.PL
make
make test
make install
3 安装rrdtool
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.26.tar.gz
tar zxvf rrdtool-1.2.26.tar.gz
cd rrdtool-1.2.26
./configure --prefix=/usr/local/rrdtool
make
make install
4 安装smokeping
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.2.tar.gz
tar zxvf smokeping-2.4.2.tar.gz
ln -s smokeping-2.4.2 smokeping
5 配置smokeping
首先建立两个目录:
mkdir /usr/local/smokeping/cache
mkdir /usr/local/smokeping/var
chown apache.apache /usr/local/smokeping/cache /usr/local/smokeping/var
然后修改如下几个配置文件:
(1) /usr/local/smokeping/etc/config.dist
imgcache = /usr/local/smokeping/cache
imgurl = ../cache
datadir = /usr/local/smokeping/var
piddir = /usr/local/smokeping/var
cgiurl = http://smokeping.sso.cn/htdocs/smokeping.cgi
smokemail = /usr/local/smokeping/etc/smokemail.dist
tmail = /usr/local/smokeping/etc/tmail.dist
template = /usr/local/smokeping/etc/basepage.html.dist
注释掉如下:(2.42新版本下不用注释也行)
#*** Slaves ***
#secrets=/usr/local/smokeping/etc/smokeping_secrets.dist
#+boomer
#display_name=boomer
#color=0000ff
#+slave2
(2) /usr/local/smokeping/htdocs/smokeping.cgi
首先,cp smokeping.cgi.dist smokeping.cgi //生成smokeping.cgi
#!/usr/bin/speedy -w
use lib qw(/usr/local/rrdtool/lib/perl);
use lib qw(/usr/local/smokeping/lib);
Smokeping::cgi("/usr/local/smokeping/etc/config.dist");
(3) /usr/local/smokeping/bin/smokeping.dist
#!/usr/bin/perl -w
use lib qw(/usr/local/rrdtool/lib/perl);
use lib qw(/usr/local/smokeping/lib);
Smokeping::main("/usr/local/smokeping/etc/config.dist");
(4) 启动smokeping
/usr/local/smokeping/bin/smokeping.dist start
(5) 建立启动脚本文件
参照:http://oss.oetiker.ch/smokeping/pub/contrib/smokeping-start-script
(6) 配置apache/conf/httpd.conf
<VirtualHost *:80>
DocumentRoot /usr/local/smokeping
ServerName smokeping.sso.cn
AddHandler cgi-script .cgi
<Directory "/usr/local/smokeping/htdocs/">
AllowOverride None
Options ExecCGI Indexes
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/ping-error_log
CustomLog logs/ping-access_log common
</VirtualHost>
(7) 安装完成,可以通过如下链接看到效果:
http://smokeping.sso.cn/htdocs/smokeping.cgi
参考:
http://oss.oetiker.ch/smokeping/
/usr/local/smokeping/htdocs/doc/smokeping_config.html
/usr/local/smokeping/doc/examples/
附:config.dist
*** General ***
owner = Peter Random
contact =
mailhost = my.mail.host
#sendmail = /usr/lib/sendmail
imgcache = /usr/local/smokeping/cache
imgurl = ../cache
datadir = /usr/local/smokeping/var
piddir = /usr/local/smokeping/var
cgiurl = http://smokeing.titan24.com/htdocs/smokeping.cgi
smokemail = /usr/local/smokeping/etc/smokemail.dist
tmail = /usr/local/smokeping/etc/tmail.dist
# 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
*** Alerts ***
to =
from =
+someloss
type = loss
# in percent
pattern = >0%,*12*,>0%,*12*,>0%
comment = loss 3 times in a row
*** Database ***
step = 300
pings = 20
# consfn mrhb steps total
AVERAGE 0.5 1 1008
AVERAGE 0.5 12 4320
MIN 0.5 12 4320
MAX 0.5 12 4320
AVERAGE 0.5 144 720
MAX 0.5 144 720
MIN 0.5 144 720
*** Presentation ***
template = /usr/local/smokeping/etc/basepage.html.dist
+ charts
menu = Charts
title = The most interesting destinations
++ stddev
sorter = StdDev(entries=>4)
title = Top Standard Deviation
menu = Std Deviation
format = Stdandard Deviation %f
++ max
sorter = Max(entries=>5)
title = Top Max Roundtrip Time
menu = by Max
format = Max Roundtrip Time %f seconds
++ loss
sorter = Loss(entries=>5)
title = Top Packet Loss
menu = Loss
format = Packets Lost %f
++ median
sorter = Median(entries=>5)
title = Top Median Roundtrip Time
menu = by Median
format = Median RTT %f seconds
+ overview
width = 600
height = 50
range = 10h
+ detail
width = 600
height = 200
unison_tolerance = 2
"Last 3 Hours" 3h
"Last 30 Hours" 30h
"Last 10 Days" 10d
"Last 400 Days" 400d
*** Probes ***
+ FPing
binary = /usr/sbin/fping
#*** Slaves ***
#secrets=/home/oetiker/checkouts/smokeping/trunk/software/etc/smokeping_secrets.dist
#+boomer
#display_name=boomer
#color=0000ff
#+slave2
*** Targets ***
probe = FPing
menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of xxx Company. \
Here you will learn all about the latency of our network.
+ CNC
menu = CNC
title = CNC
++ xizang
menu = xizang
title = xizang
host = 221.13.80.14
++ shanxi_wt
menu = shanxi
title = shanxi_wt
host = 221.11.66.1
++ beijing
menu = beijing
title = beijing
host = 202.99.57.149
++ tianjin
menu = tianjin
title = tianjin
host = 218.69.32.6
++ shijiazhuang
menu = shijiazhuang
title = shijiazhuang
host = 202.99.160.234
++ shanxi
menu = shanxi
title = shanxi
host = 218.26.125.150
++ neimenggu
menu = neimenggu
title = neimenggu
host = 202.99.226.58
++ heilongjiang
menu = heilongjiang
title = heilongjiang
host = 61.138.38.114
++ jilin
menu = jilin
title = jilin
host = 125.32.127.14
++ liaoning
menu = liaoning
title = liaoning
host = 218.61.254.174
++ shandong
menu = shandong
title = shandong
host = 60.215.136.234
++ henan
menu = henan
title = henan
host = 61.168.254.26
+ TELCOM
menu = telcom
title = telcom
++ beijing_dx
menu = beijing_dx
title = beijing_dx
host = 218.30.66.57
++ shanghai_dx
menu = shanghai_dx
title = shanghai_dx
host = 202.101.63.193
++ jiangsu_dx
menu = jiangsu_dx
title = jiangsu_dx
host = 61.147.37.1
++ zhejiang_dx
menu = zhejiang_dx
title = zhejiang_dx
host = 220.191.129.118
++ anhui_dx
menu = anhui_dx
title = anhui_dx
host = 61.190.251.38
++ wenzhou_dx
menu = wenzhou_dx
title = wenzhou_dx
host = 202.97.40.86
++ jiangxi_dx
menu = jiangxi_dx
title = jiangxi_dx
host = 220.177.252.94
++ hubei_dx
menu = hubei_dx
title = hubei_dx
host = 221.232.254.62
++ hunan_dx
menu = hunan_dx
title = hunan_dx
host = 61.137.2.14
++ guangdong_dx
menu = guangdong_dx
title = guangdong_dx
host = 61.144.3.13
++ hainan_dx
menu = hainan_dx
title = hainan_dx
host = 59.50.32.70
++ guangxi_dx
menu = guangxi_dx
title = guangxi_dx
host = 218.65.136.2
++ chongqing_dx
menu = chongqing_dx
title = chongqing_dx
host = 219.153.16.97
++ sichuan_dx
menu = sichuan_dx
title = sichuan_dx
host = 218.6.196.70
++ guizhou_dx
menu = guizhou_dx
title = guizhou_dx
host = 219.151.0.142
++ yunnan_dx
menu = yunnan_dx
title = yunnan_dx
host = 222.221.1.30
.
分享到:
相关推荐
CentOS 7 上安装 Smokeping 的详细指导 Smokeping 是一个基于 Linux 的网络延迟监控工具,可以对网络中的设备和服务器进行延迟监控,以便于网络管理员更好地管理和维护网络。CentOS 7 是一个流行的 Linux 发行版,...
《CentOS7环境下自动化安装Smokeping的详细指南》 在运维工作中,监控系统性能和网络状态至关重要,而Smokeping就是这样一款强大的网络延迟和可用性监控工具。本文将详细介绍如何在CentOS7系统上使用自动化脚本来...
下面将详细介绍在 CentOS 6.x 系统上如何安装和配置 Smokeping。 #### 一、系统更新及时间同步 在安装 Smokeping 之前,首先需要确保系统的更新和时间同步。 1. **系统更新**: ```bash yum -y update ``` 2. ...
在本文中,我们将深入探讨如何在 CentOS 5.5 x64 系统上安装 Smokeping,这是一个强大的网络延迟和可用性监控工具。首先,我们需要确保系统的 yum 源是最新且可靠的,因此我们将配置上海交通大学提供的 CentOS 更新...
2. **Smokeping配置**: - 将`C:\smokeping\bin\smokeping`重命名为`smokeping.pl`。 - 将`C:\smokeping\bin\tSmoke`重命名为`tSmoke.pl`。 - 复制`C:\smokeping\etc\config.dist`并更名为`config`。 - 编辑`...
centos6.3安装配置smokeping2.6.8
在 CentOS 5.5 环境下安装 Smokeping 主要涉及以下步骤: 1. **前置软件需求**:确保系统已经安装了必要的开发库和软件包,如 freetype-devel、zlib-devel、libpng-devel、libart_lgpl-devel,以及 CGI 相关的 Perl...
### CentOS 5.4 下完美配置SmokePing 在本文中,我们将详细介绍如何在 CentOS 5.4 上配置 SmokePing,并确保其稳定运行。SmokePing 是一款功能强大的网络延迟监测工具,能够帮助网络管理员实时监控网络状况,对于...
在CentOS 5.4环境下安装Smokeping全手册中,首先对Smokeping进行了简介。Smokeping是由rrdtool的作者Tobi Oetiker所开发,是一款开源工具,它具有图形显示方面的优势,并且具备多种探测方式,比如fping、echoping、...
本文将详细介绍如何在 CentOS 6.5 上快速安装和配置 Smokeping 6.5。 ### **一、更新系统** 在开始安装前,确保你的 CentOS 6.5 系统是最新的。运行以下命令来更新系统包: ```bash sudo yum update -y ``` ### ...
总结起来,本文主要介绍了如何在Linux环境下搭建Cacti和Smokeping这两款开源监控系统,涵盖了从操作系统配置、依赖软件安装、SNMP配置、数据库设置到最终的服务启动和权限配置等多个方面。通过上述步骤,你可以轻松...
常见的监控方案包括Cacti、Nagios、SmokePing、Open-falcon以及Zabbix和Prometheus等。这些工具各有特点,适用于不同的监控需求。例如,Cacti以绘图著称,能够生成美观的图表来展示网络流量等数据;Nagios则因其高度...
- **监控服务器**:如smokeping的安装和使用,用于网络延迟和丢包率监控。 - **网络管理系统**:jffnms和cacti等工具的使用,提供网络性能可视化监控。 - **局域网架设**:涉及网络设备连接、VLAN划分、路由配置...