smokeping在centos7.3上安装部署
前期准备工作
smokeping软件包下载地址
http://oss.oetiker.ch/smokeping/pub/
实验机器环境
1 2 3 4 5 | [root@data-1-1 ~] # cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@data-1-1 ~] # uname -rm 3.10.0-514.el7.x86_64 x86_64 [root@data-1-1 ~] # |
系统环境安装一些基础工具包,可以参照http://www.cnblogs.com/nmap/p/6368157.html
安装前的准备
做好时间同步,并且关闭防火墙以及selinux
时间同步方式如下:
1 2 3 4 5 6 7 | [root@data-1-1 ~] # date 2017年 03月 07日 星期二 17:40:01 CST [root@data-1-1 ~] # ntpdate times.aliyun.com 7 Mar 09:41:20 ntpdate[5253]: step time server 120.25.115.19 offset -28729.847686 sec [root@data-1-1 ~] # date 2017年 03月 07日 星期二 09:41:27 CST [root@data-1-1 ~] # |
安装成吨的依赖包,有兴趣的可以编译安装
很多同学在装系统的时候选择包有问题,因此安装这些保证环境一致性
安装开发依赖包
1 2 3 4 5 6 7 8 9 | [root@data-1-1 ~] # yum groupinstall "Compatibility libraries" "Base" "Development tools" -y 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.aliyun.com * updates: mirrors.163.com Maybe run: yum groups mark install (see man yum) 指定组中没有可安装或升级的软件包 [root@data-1-1 ~] # |
安装smokeping依赖需要的包,smokeping服务运行需要apache展示,所以就安装了httpd相关的包
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | [root@data-1-1 ~] # 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 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.aliyun.com * updates: mirrors.163.com 软件包 4:perl-5.16.3-291.el7.x86_64 已安装并且是最新版本 软件包 perl-Net-Telnet-3.03-19.el7.noarch 已安装并且是最新版本 软件包 perl-Net-DNS-0.72-6.el7.x86_64 已安装并且是最新版本 软件包 1:perl-LDAP-0.56-5.el7.noarch 已安装并且是最新版本 软件包 perl-libwww-perl-6.05-2.el7.noarch 已安装并且是最新版本 软件包 perl-IO-Socket-SSL-1.94-5.el7.noarch 已安装并且是最新版本 软件包 perl-Socket6-0.23-15.el7.x86_64 已安装并且是最新版本 软件包 4:perl-Time-HiRes-1.9725-3.el7.x86_64 已安装并且是最新版本 软件包 perl-ExtUtils-MakeMaker-6.68-3.el7.noarch 已安装并且是最新版本 软件包 rrdtool-1.4.8-9.el7.x86_64 已安装并且是最新版本 软件包 rrdtool-perl-1.4.8-9.el7.x86_64 已安装并且是最新版本 软件包 curl-7.29.0-35.el7.centos.x86_64 已安装并且是最新版本 软件包 httpd-2.4.6-45.el7.centos.x86_64 已安装并且是最新版本 软件包 httpd-devel-2.4.6-45.el7.centos.x86_64 已安装并且是最新版本 软件包 gcc -4.8.5-11.el7.x86_64 已安装并且是最新版本 软件包 1: make -3.82-23.el7.x86_64 已安装并且是最新版本 软件包 wget-1.14-13.el7.x86_64 已安装并且是最新版本 软件包 libxml2-devel-2.9.1-6.el7_2.3.x86_64 已安装并且是最新版本 软件包 2:libpng-devel-1.5.13-7.el7_2.x86_64 已安装并且是最新版本 没有可用软件包 glib。 软件包 pango-1.36.8-2.el7.x86_64 已安装并且是最新版本 软件包 pango-devel-1.36.8-2.el7.x86_64 已安装并且是最新版本 软件包 freetype-2.4.11-12.el7.x86_64 已安装并且是最新版本 软件包 freetype-devel-2.4.11-12.el7.x86_64 已安装并且是最新版本 软件包 fontconfig-2.10.95-10.el7.x86_64 已安装并且是最新版本 软件包 cairo-1.14.2-1.el7.x86_64 已安装并且是最新版本 软件包 cairo-devel-1.14.2-1.el7.x86_64 已安装并且是最新版本 软件包 libart_lgpl-2.3.21-10.el7.x86_64 已安装并且是最新版本 软件包 libart_lgpl-devel-2.3.21-10.el7.x86_64 已安装并且是最新版本 没有可用软件包 perl-CGI-SpeedyCGI。 软件包 perl-Sys-Syslog-0.33-3.el7.x86_64 已安装并且是最新版本 软件包 popt-devel-1.13-16.el7.x86_64 已安装并且是最新版本 软件包 libidn-devel-1.28-4.el7.x86_64 已安装并且是最新版本 没有可用软件包 fping。 无须任何处理 [root@data-1-1 ~] # |
缺少一些工具包,安装epel源,这里由于是centos7的,选择centos7
1 2 3 4 5 6 7 | [root@data-1-1 ~] # rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm 获取https: //mirrors .aliyun.com /epel/epel-release-latest-7 .noarch.rpm 警告: /var/tmp/rpm-tmp .CK9rIg: 头V3 RSA /SHA256 Signature, 密钥 ID 352c64e5: NOKEY 准备中... ################################# [100%] 正在升级/安装... 1:epel-release-7-9 ################################# [100%] [root@data-1-1 ~] # |
1 2 3 4 | [root@data-1-1 ~] # tail -1 /etc/profile export LANG=en_US.UTF-8 [root@data-1-1 ~] # source /etc/profile [root@data-1-1 ~] # |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | [root@data-1-1 ~] # 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 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirror.premi.st * extras: mirrors.aliyun.com * updates: mirrors.163.com Package 4:perl-5.16.3-291.el7.x86_64 already installed and latest version Package perl-Net-Telnet-3.03-19.el7.noarch already installed and latest version Package perl-Net-DNS-0.72-6.el7.x86_64 already installed and latest version Package 1:perl-LDAP-0.56-5.el7.noarch already installed and latest version Package perl-libwww-perl-6.05-2.el7.noarch already installed and latest version Package perl-IO-Socket-SSL-1.94-5.el7.noarch already installed and latest version Package perl-Socket6-0.23-15.el7.x86_64 already installed and latest version Package 4:perl-Time-HiRes-1.9725-3.el7.x86_64 already installed and latest version Package perl-ExtUtils-MakeMaker-6.68-3.el7.noarch already installed and latest version Package rrdtool-1.4.8-9.el7.x86_64 already installed and latest version Package rrdtool-perl-1.4.8-9.el7.x86_64 already installed and latest version Package curl-7.29.0-35.el7.centos.x86_64 already installed and latest version Package httpd-2.4.6-45.el7.centos.x86_64 already installed and latest version Package httpd-devel-2.4.6-45.el7.centos.x86_64 already installed and latest version Package gcc -4.8.5-11.el7.x86_64 already installed and latest version Package 1: make -3.82-23.el7.x86_64 already installed and latest version Package wget-1.14-13.el7.x86_64 already installed and latest version Package libxml2-devel-2.9.1-6.el7_2.3.x86_64 already installed and latest version Package 2:libpng-devel-1.5.13-7.el7_2.x86_64 already installed and latest version Package 1:glib-1.2.10-41.el7.x86_64 already installed and latest version Package pango-1.36.8-2.el7.x86_64 already installed and latest version Package pango-devel-1.36.8-2.el7.x86_64 already installed and latest version Package freetype-2.4.11-12.el7.x86_64 already installed and latest version Package freetype-devel-2.4.11-12.el7.x86_64 already installed and latest version Package fontconfig-2.10.95-10.el7.x86_64 already installed and latest version Package cairo-1.14.2-1.el7.x86_64 already installed and latest version Package cairo-devel-1.14.2-1.el7.x86_64 already installed and latest version Package libart_lgpl-2.3.21-10.el7.x86_64 already installed and latest version Package libart_lgpl-devel-2.3.21-10.el7.x86_64 already installed and latest version Package perl-CGI-SpeedyCGI-2.22-16.el7.1.x86_64 already installed and latest version Package perl-Sys-Syslog-0.33-3.el7.x86_64 already installed and latest version Package popt-devel-1.13-16.el7.x86_64 already installed and latest version Package libidn-devel-1.28-4.el7.x86_64 already installed and latest version Package fping-3.10-4.el7.x86_64 already installed and latest version Nothing to do [root@data-1-1 ~] # |
smokeping安装和配置
安装smokeping-2.6.8.tar.gz
执行命令如下
1 2 3 4 5 6 7 | wget http: //oss .oetiker.ch /smokeping/pub/smokeping-2 .6.8. tar .gz tar xvf smokeping-2.6.8. tar .gz cd smokeping-2.6.8 . /setup/build-perl-modules .sh /usr/local/smokeping/thirdparty . /configure --prefix= /usr/local/smokeping /usr/bin/gmake install /usr/bin/gmake install #重要的安装来两遍 |
注意软件包的md5值为下面。注意和我的对比下
1 2 3 | [root@data-1-1 tools] # md5sum smokeping-2.6.8.tar.gz 14a968daab2d17a27d41600077e3e967 smokeping-2.6.8. tar .gz [root@data-1-1 tools] # |
上面操作最后的gmake, gmake执行两遍才成功,gmake第一遍执行报错了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | [root@data-1-1 smokeping-2.6.8] # /usr/bin/gmake install Making install in bin gmake[1]: Entering directory ` /tools/smokeping-2 .6.8 /bin ' gmake[2]: Entering directory ` /tools/smokeping-2 .6.8 /bin ' test -z "/usr/local/smokeping/bin" || /usr/bin/mkdir -p "/usr/local/smokeping/bin" /usr/bin/install -c smokeinfo smokeping smokeping_cgi tSmoke '/usr/local/smokeping/bin' /usr/bin/gmake install - exec -hook gmake[3]: Entering directory ` /tools/smokeping-2 .6.8 /bin ' [ xERL5LIB != x ] && cd "/usr/local/smokeping/bin" && /usr/bin/perl -i -p -e 's{^#!.*}{#!/usr/bin/perl}; s{.*# PERL5LIB}{use lib qw(); # PERL5LIB}' smokeinfo smokeping_config.pod around line 81: alternative text 'the master/slave mode' contains non-escaped | or / POD document had syntax errors at /usr/bin/pod2man line 69. gmake[1]: *** [smokeping_config.5] Error 255 rm Smokeping_probes_IOSPing.pod Smokeping_probes_EchoPing.pod Smokeping_probes_Radius.pod Smokeping_probes_SipSak.pod Smokeping_probes_EchoPingPlugin.pod Smokeping_probes_FPing6.pod Smokeping_probes_EchoPingIcp.pod Smokeping_probes_Curl.pod Smokeping_probes_CiscoRTTMonDNS.pod Smokeping_probes_EchoPingDNS.pod Smokeping_probes_SSH.pod Smokeping_probes_DismanPing.pod Smokeping_probes_WebProxyFilter.pod Smokeping_probes_RemoteFPing.pod Smokeping_probes_OpenSSHJunOSPing.pod Smokeping_probes_EchoPingLDAP.pod Smokeping_probes_LDAP.pod Smokeping_probes_TacacsPlus.pod Smokeping_probes_TelnetIOSPing.pod Smokeping_probes_NFSping.pod Smokeping_probes_basefork.pod Smokeping_probes_EchoPingChargen.pod Smokeping_probes_basevars.pod Smokeping_probes_EchoPingSmtp.pod Smokeping_probes_FPing.pod Smokeping_probes_FTPtransfer.pod Smokeping_probes_EchoPingHttps.pod Smokeping_probes_EchoPingDiscard.pod Smokeping_probes_AnotherSSH.pod Smokeping_probes_CiscoRTTMonEchoICMP.pod Smokeping_probes_passwordchecker.pod Smokeping_probes_base.pod Smokeping_probes_TelnetJunOSPing.pod Smokeping_probes_EchoPingHttp.pod Smokeping_probes_AnotherDNS.pod Smokeping_probes_TCPPing.pod Smokeping_probes_EchoPingWhois.pod Smokeping_probes_skel.pod Smokeping_probes_DNS.pod Smokeping_probes_CiscoRTTMonTcpConnect.pod gmake[1]: Leaving directory ` /tools/smokeping-2 .6.8 /doc ' gmake: *** [ install -recursive] Error 1 第二遍执行成 [root@data-1-1 smokeping-2.6.8] # /usr/bin/gmake install Making install in bin gmake[2]: Nothing to be done for ` install - exec -am'. test -z "/usr/local/smokeping/lib" || /usr/bin/mkdir -p "/usr/local/smokeping/lib" gmake[1]: Leaving directory ` /tools/smokeping-2 .6.8 /lib ' gmake[1]: Entering directory ` /tools/smokeping-2 .6.8' gmake[2]: Entering directory ` /tools/smokeping-2 .6.8' gmake[2]: Nothing to be done for ` install - exec -am'. gmake[2]: Nothing to be done for ` install -data-am'. gmake[2]: Leaving directory ` /tools/smokeping-2 .6.8' gmake[1]: Leaving directory ` /tools/smokeping-2 .6.8' [root@data-1-1 smokeping-2.6.8] # echo $? 0 [root@data-1-1 smokeping-2.6.8] # |
smokeping基础配置修改
命令如下
1 2 3 4 5 6 7 8 9 10 | cd /usr/local/smokeping/ mkdir cache data var touch /var/log/smokeping .log chown apache:apache cache data var chown apache:apache /var/log/smokeping .log chmod 600 /usr/local/smokeping/etc/smokeping_secrets .dist cd /usr/local/smokeping/htdocs mv smokeping.fcgi.dist smokeping.fcgi cd /usr/local/smokeping/etc mv config.dist config |
1 2 3 4 5 6 7 8 9 10 11 12 13 | [root@data-1-1 smokeping-2.6.8] # cd /usr/local/smokeping/ [root@data-1-1 smokeping] # ls bin etc htdocs lib share thirdparty [root@data-1-1 smokeping] # mkdir cache data var [root@data-1-1 smokeping] # touch /var/log/smokeping.log [root@data-1-1 smokeping] # chown apache:apache cache data var [root@data-1-1 smokeping] # chown apache:apache /var/log/smokeping.log [root@data-1-1 smokeping] # chmod 600 /usr/local/smokeping/etc/smokeping_secrets.dist [root@data-1-1 smokeping] # cd /usr/local/smokeping/htdocs [root@data-1-1 htdocs] # mv smokeping.fcgi.dist smokeping.fcgi [root@data-1-1 htdocs] # cd /usr/local/smokeping/etc [root@data-1-1 etc] # mv config.dist config [root@data-1-1 etc] # |
apache配置修改
修改主配置文件
修改主配置文件
vim /etc/httpd/conf/httpd.conf
1 | <Directory "/var/www/html" > 改成 <Directory "/usr/local/smokeping" > |
改成如下
增加somekping配置,新建一个smokeping.conf文件
1 | vim /etc/httpd/conf .d /somekping .conf |
写入如下内容
1 2 3 4 5 6 7 8 9 10 11 | 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 DirectoryIndex smokeping.fcgi < /Directory > |
检查下
1 2 3 4 5 6 7 8 9 10 11 12 13 | [root@data-1-1 etc] # cat /etc/httpd/conf.d/somekping.conf 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 DirectoryIndex smokeping.fcgi < /Directory > [root@data-1-1 etc] # |
重启apache服务
1 2 3 4 5 6 7 8 9 10 | [root@data-1-1 etc] # systemctl restart httpd [root@data-1-1 etc] # lsof -i:80 COMMAND PID USER FD TYPE DEVICE SIZE /OFF NODE NAME httpd 24029 root 4u IPv6 113762 0t0 TCP *:http (LISTEN) httpd 24030 apache 4u IPv6 113762 0t0 TCP *:http (LISTEN) httpd 24031 apache 4u IPv6 113762 0t0 TCP *:http (LISTEN) httpd 24032 apache 4u IPv6 113762 0t0 TCP *:http (LISTEN) httpd 24033 apache 4u IPv6 113762 0t0 TCP *:http (LISTEN) httpd 24034 apache 4u IPv6 113762 0t0 TCP *:http (LISTEN) [root@data-1-1 etc] # |
至此smokeping搭建完毕,不过现在还不能正常使用,因此我们需要进行配置
ping监控配置
修改smokeping配置文件
1 | vim /usr/local/smokeping/etc/config |
修改如下内容
1 2 | 把cgiurl = http: //some .url /smokeping .cgi 改成 cgiurl = http: //10 .0.1.73 /smokeping .cgi #注意10.0.1.73为本机IP请根据实际情况进行修改 |
原来是如下默认的配置
修改监控频率,ping目标的频率等
原先是如下内容
改成如下内容
删除默认的test数据,一下红框里的需要删除,在文件的末尾部分
添加如下数据并保存,以下IP地址都是各个地区的DNS服务器。有些DNS服务器做了限制无法ping通,需要替换为可以ping通的
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | + 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 有个问题需要我们注意+是第一层,++是第二层,+++ 是第三层,添加监控节点一定要按照此规范哦 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | [root@data-1-1 etc] # cat /usr/local/smokeping/etc/config *** General *** owner = Peter Random contact = some@address.nowhere mailhost = my.mail.host sendmail = /usr/sbin/sendmail # NOTE: do not put the Image Cache below cgi-bin # since all files under cgi-bin will be executed ... this is not # good for images. imgcache = /usr/local/smokeping/cache imgurl = cache datadir = /usr/local/smokeping/data piddir = /usr/local/smokeping/var cgiurl = http: //10 .0.1.73 /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 = alertee@address.somewhere from = smokealert@company.xy +someloss type = loss # in percent pattern = >0%,*12*,>0%,*12*,>0% comment = loss 3 times in a row *** Database *** step = 60 pings = 10 # 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 = Standard 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 #+ hierarchies #++ owner #title = Host Owner #++ location #title = Location *** Probes *** + FPing binary = /usr/sbin/fping *** Slaves *** secrets= /usr/local/smokeping/etc/smokeping_secrets .dist +boomer display_name=boomer color=0000ff +slave2 display_name=another color=00ff00 *** 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. + 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 [root@data-1-1 etc] # |
1 2 3 4 5 6 7 | [root@data-1-1 etc] # /usr/local/smokeping/bin/smokeping Note: logging to syslog as local0 /info . Daemonizing /usr/local/smokeping/bin/smokeping ... [root@data-1-1 etc] # ps aux | grep smoke root 24096 0.0 0.5 300356 23900 ? Ss 10:35 0:00 /usr/local/smokeping/binsmokeping [FPing] root 24098 0.0 0.0 112648 960 pts /0 S+ 10:35 0:00 grep --colour=auto smoke [root@data-1-1 etc] # |
显示乱码问题解决
需要修改配置文件里,指定字符集才能正确显示
1 | vim /usr/local/smokeping/etc/config |
安装字体包
1 2 3 4 5 6 7 8 9 10 | [root@data-1-1 etc] # yum -y install wqy-zenhei-fonts Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.163.com Package wqy-zenhei-fonts-0.9.46-11.el7.noarch already installed and latest version Nothing to do [root@data-1-1 etc] # |
修改 Graphs.pm
1 2 3 | vim /usr/local/smokeping/lib/Smokeping/Graphs .pm 在148行附近 增加这一行,注意不要缺少标点符号 '--font TITLE:20""' , |
此版本的smokeping还有一定问题,无法重启和重载
1 2 3 4 5 6 7 8 9 10 11 12 | [root@data-1-1 etc] # /usr/local/smokeping/bin/smokeping restart Note: logging to syslog as local0 /info . ERROR: I Quit! Another copy of /usr/local/smokeping/bin/smokeping (24096) seems to be running. Check /usr/local/smokeping/var/smokeping .pid [root@data-1-1 etc] # ps aux | grep smok root 24096 0.0 0.6 313224 25284 ? Ss 10:35 0:00 /usr/local/smokeping/binsmokeping [FPing] root 24337 0.0 0.0 112648 960 pts /0 S+ 10:42 0:00 grep --colour=auto smok [root@data-1-1 etc] # /usr/local/smokeping/bin/smokeping reload Note: logging to syslog as local0 /info . ERROR: I Quit! Another copy of /usr/local/smokeping/bin/smokeping (24096) seems to be running. Check /usr/local/smokeping/var/smokeping .pid [root@data-1-1 etc] # |
1 2 3 4 5 6 7 8 9 10 11 12 13 | [root@data-1-1 etc] # ps aux | grep smok root 24096 0.0 0.6 313224 25284 ? Ss 10:35 0:00 /usr/local/smokeping/bin/smokeping [FPing] root 24360 0.0 0.0 112648 956 pts /0 S+ 10:43 0:00 grep --colour=auto smok [root@data-1-1 etc] # kill -9 24096 [root@data-1-1 etc] # ps aux | grep smok root 24364 0.0 0.0 112648 956 pts /0 S+ 10:43 0:00 grep --colour=auto smok [root@data-1-1 etc] # /usr/local/smokeping/bin/smokeping Note: logging to syslog as local0 /info . Daemonizing /usr/local/smokeping/bin/smokeping ... [root@data-1-1 etc] # ps aux | grep smok root 24369 0.0 0.5 300356 23948 ? Ss 10:43 0:00 /usr/local/smokeping/bin/smokeping [FPing] root 24371 0.0 0.0 112648 960 pts /0 S+ 10:43 0:00 grep --colour=auto smok [root@data-1-1 etc] # |
实验参照链接
http://www.aclstack.com/454.html
2.6.11版本的可以参照下面链接,这里我没测试
http://ggvylf.blog.51cto.com/784661/1790207
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 聊一聊 操作系统蓝屏 c0000102 的故障分析
· SQL Server 内存占用高分析
· .NET Core GC计划阶段(plan_phase)底层原理浅谈
· .NET开发智能桌面机器人:用.NET IoT库编写驱动控制两个屏幕
· 用纯.NET开发并制作一个智能桌面机器人:从.NET IoT入门开始
· 我干了两个月的大项目,开源了!
· 推荐一款非常好用的在线 SSH 管理工具
· 聊一聊 操作系统蓝屏 c0000102 的故障分析
· 千万级的大表,如何做性能调优?
· .NET周刊【1月第1期 2025-01-05】