设置时间同步

[root@Linux-node1 ~]# yum install ntpdate -y
[root@Linux-node1 ~]# ntpdate times.aliyun.com

安装依赖包

[root@Linux-node1 ~]# yum groupinstall “Compatibility libraries” “Base” “Development tools” -y

[root@Linux-node1 ~]# yum install -y perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-IO-Socket-SSL perl-Socket6 perl-Time-HiRes perl-ExtUtils-MakeMaker rrdtool rrdtool-perl curl 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 perl-CGI-SpeedyCGI perl-Sys-Syslog popt-devel libidn-devel fping

安装smokeping源码包

**养成良好习惯将源码包下载到一个专用的目录存放

[root@Linux-node1 ~]# cd /home/

[root@Linux-node1 home]# wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.9.tar.gz

[root@Linux-node1 home]# tar xf smokeping-2.6.9.tar.gz

 

[root@Linux-node1 home]# cd smokeping-2.6.9
[root@Linux-node1 smokeping-2.6.9]# ./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty

[root@Linux-node1 smokeping-2.6.9]# ./configure –prefix=/usr/local/smokeping

[root@Linux-node1 smokeping-2.6.9]# iptables -L

[root@Linux-node1 smokeping-2.6.9]# iptables -F

[root@Linux-node1 smokeping-2.6.9]# make && make install

[root@Linux-node1 smokeping-2.6.9]# cd /usr/local/smokeping/htdocs/

[root@Linux-node1 htdocs]# mv smokeping.fcgi.dist smokeping.fcgi
[root@Linux-node1 htdocs]# mv /usr/local/smokeping/etc/config.dist /usr/local/smokeping/etc/config

 

修改smokeping配置文件

[root@Linux-node1 htdocs]# vim /usr/local/smokeping/etc/config

sed -i ‘s#cgiurl = http://some.url/smokeping.cgi#cgiurl = http://172.16.1.10/smokeping.cgi#g’ /usr/local/smokeping/etc/config

[root@Linux-node1 htdocs]# sed -i ‘s#300#60#g’ /usr/local/smokeping/etc/config
[root@Linux-node1 htdocs]# sed -i ‘s#20#60#g’ /usr/local/smokeping/etc/config

[root@Linux-node1 htdocs]# vim /usr/local/smokeping/etc/config

添加字符集

*** Presentation ***

charset = utf-8

[root@Linux-node1 htdocs]# chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist

设置新密码

[root@Linux-node1 htdocs]# htpasswd -c /usr/local/smokeping/htdocs/htpasswd darker
New password:
Re-type new password:
Adding password for user darker
[root@Linux-node1 htdocs]#

wget –limit-rate 500k http://www.fping.org/dist/fping-3.8.tar.gz
ls
tar zxvf fping-3.8.tar.gz && cd fping-3.8.tar.gz.1
echo $?
tar zxvf fping-3.8.tar.gz.1 && cd fping-3.8.tar.gz.1
echo $?
cd fping-3.8
ls
./configure && make && make install
echo $?

which fping

[root@Linux-node1 fping-3.8]# vim /usr/local/smokeping/etc/config

添加以下内容:到行尾

+ Other

menu = 三大网络监控

title = 监控统计

++ dianxin

menu = 电信网络监控

title = 电信网络监控列表

+++ dianxin-bj

menu = 北京电信

title = 北京电信

alerts = someloss

host = 202.96.199.133

+++ dianxin-hlj

menu = 黑龙江电信

title = 黑龙江电信

alerts = someloss

host = 219.147.198.242

+++ dianxin-tj

menu = 天津电信

title = 天津电信

alerts = someloss

host = 219.150.32.132

+++ dianxin-sc

menu = 四川电信

title = 四川电信

alerts = someloss

host = 61.139.2.69

+++ dianxin-sh

menu = 上海电信

title = 上海电信

alerts = someloss

host = 116.228.111.118

+++ dianxin-gz

menu = 广东电信

title = 广东电信

alerts = someloss

host = 113.111.211.22

++ liantong

menu = 联通网络监控

title = 联通网络监控列表

+++ liantong-bj

menu = 北京联通

title = 北京联通

alerts = someloss

host = 61.135.169.121

+++ liantong-hlj

menu = 黑龙江联通

title = 黑龙江联通

alerts = someloss

host = 202.97.224.69

+++ liantong-tj

menu = 天津联通

title = 天津联通

alerts = someloss

host = 202.99.96.68

+++ liantong-sc

menu = 四川联通

title = 四川联通

alerts = someloss

host = 119.6.6.6

+++ liantong-sh

menu = 上海联通

title = 上海联通

alerts = someloss

host = 210.22.84.3

+++ liantong-gz

menu = 广东联通

title = 广东联通

alerts = someloss

host = 221.5.88.88

++ yidong

menu = 移动网络监控

title = 移动网络监控列表

+++ yidong-bj

menu = 北京移动

title = 北京移动

alerts = someloss

host = 221.130.33.52

+++ yidong-hlj

menu = 黑龙江移动

title = 黑龙江移动

alerts = someloss

host = 211.137.241.35

+++ yidong-tj

menu = 天津移动

title = 天津移动

alerts = someloss

host = 211.137.160.5

+++ yidong-sc

menu = 四川移动

title = 四川移动

alerts = someloss

host = 218.201.4.3

+++ yidong-sh

menu = 上海移动

title = 上海移动

alerts = someloss

host = 117.131.19.23

+++ yidong-gz

menu = 广东移动

title = 广东移动

alerts = someloss

host = 211.136.192.6

 

/usr/local/smokeping/bin/smokeping

http://172.16.1.10/smokeping?target=Other

打赏作者

Leave a Reply

Your email address will not be published.