测试环境 CentOS 7.8

安装依赖包

#yum install -y open-vm-tools

#yum install -y open-vm-tools-desktop

#yum update

#yum install -y net-tools ntp ntpdate

#yum install -y rrdtool perl-rrdtool openssl-devel

#yum install -y perl-core

安装smokeping

#cd /opt

#tar zxvf smokeping-2.7.3.tar.gz

#cd smokeping-2.7.3

#cp -r thirdparty /opt/smokeping/

#./configure --prefix=/opt/smokeping

#/usr/bin/gmake install

安装fping

#cd /opt

#tar zxvf fping-5.0.tar.gz -C /opt

# ./configure --prefix=/usr/local/fping

#make && make install

安装echoping

#cd /opt

#tar zxvf echoping-6.0.2.tar.gz

#cd echoping-6.0.2

#yum install -y popt-devel

# ./configure --prefix=/usr/local/echoping --with-ssl --without-libidn

#make && make install

#yum install -y dig-utils httpd httpd_devel

#vim /etc/httpd/conf/httpd.conf

将语句改为 ServerName localhost:80

#mkdir -p /var/www/smokeping/data

#mkdir /opt/smokeping/var

#mkdir /var/www/smokeping/cache

#cp -R /opt/smokeping/htdocs/* /var/www/smokeping

#mv /var/www/smokeping/smokeping.fcgi.dist /var/www/smokeping/smokeping.fcgi

#chown -R apache:apache /var/www/smokeping

#cp /opt/smokeping/etc/config.dist /opt/smokeping/etc/config

#chmod 600 /opt/smokeping/etc/smokeping_secrets.dist

安装Authen::SASL模块

#wget http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Authen-SASL-2.12.tar.gz

#chmod a+x Authen-SASL-2.12.tar.gz

#tar zxvf Authen-SASL-2.12.tar.gz

#cd Authen-SASL-2.12

#perl Makefile.PL

#make test

#make install

修改配置文件

#vi /opt/smokeping/lib/Smokeping.pm

正文开头加入一行

use Authen::SASL;

定位到下述行 /sub sendmail

将表述改成 $smtp->auth(split(/\s*,\s*/, $cfg->{General}{mailusr}),split(/\s*,\s*/, $cfg->{General}{mailpwd}));

定位到下述行 /smokemail cgiurl

将表述改成 mailhost mailusr mailpwd

#vi /opt/smokeping/etc/config

*** General ***

owner    = domain

contact  = it@domain.com

mailhost = smtp.mxhichina.com

mailusr = it-log@domain.com

mailpwd = Genew@123

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 = /var/www/smokeping/cache

imgurl   = cache

datadir  = /var/www/smokeping/data

piddir  = /opt/smokeping/var

cgiurl   = http://10.8.1.35/smokeping.cgi

smokemail = /opt/smokeping/etc/smokemail.dist

tmail = /opt/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 = user@domain.com

from = it-log@domain.net

+hostdown

type = loss

pattern = ==0%,==0%,==0%,==U

comment = no reply

+someloss

type = loss

# in percent

pattern = >0%,*12*,>0%,*12*,>0%

comment = loss 3 times  in a row

*** Database ***

step     = 60

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 ***

charset = UTF-8

template = /opt/smokeping/etc/basepage.html.dist

htmltitle = yes

graphborders = no

+ 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

slave内容全删除

*** Probes ***

+ FPing

binary = /usr/local/sbin/fping

*** Targets ***

probe = FPing

menu = Top

title = Network Latency Grapher

remark = Hello World!

+ Test

menu = Targets

title = VPN-Link

++ xian-50M

menu = test

title = test

alerts = someloss,hostdown

host = 1.1.1.1

Multihost内容全删除

--------------------

vim /usr/lib/systemd/system/smokeping.service

[Unit]

Description=Smokeping Server

After=network.target remote-fs.target nss-lookup.target

[Service]

Type=simple

ExecStart=/opt/smokeping/bin/smokeping --nodaemon --

config=/opt/smokeping/etc/config --

logfile=/var/log/smokeping.log

[Install]

WantedBy=multi-user.target

-----------------

vim /etc/httpd/conf.d/smokeping.conf

Alias /smokeping "/var/www/smokeping"

<Directory /var/www/smokeping>

AllowOverride None

Options All

AddHandler cgi-script .fcgi .cgi

Order allow,deny

Allow from all

AuthName "Smokeping"

AuthType Basic

AuthUserFile /opt/smokeping/htdocs/htpasswd

Require valid-user

DirectoryIndex smokeping.fcgi

</Directory>

创建admin账户

htpasswd -c   /opt/smokeping/htdocs/htpasswd admin

重启服务及应用

#setenforce 0

#firewall-cmd --add-service=http

#firewall-cmd --add-service=https

#firewall-cmd --runtime-to-permanent

#setsebool -P httpd_can_network_connect 1

#systemctl start httpd && systemctl enable httpd

#systemctl start smokeping && systemctl enable smokeping

网络状态监控工具Smokeping 安装指南相关推荐

  1. 网络性能监控工具Smokeping

    什么是 Smokeping ? SmokePing 是一款监控网络状态和稳定性的开源软件(它是 RRDTool 的作者开发的),通过它可以监控如延时,丢包率,是否 BGP 多线等网络状况:smokep ...

  2. 一款监控网络状态的好工具- Smokeping

    最近工作中需要监测某个分公司到IDC机房的网络情况,到网络上找了不少软件,发现一款叫smokeping的开源软件还不错,它是rrdtool的作者制作的,在图形显示方面很漂亮,可以用来很好的检测网络状态 ...

  3. 脚本监控网络状态,输出日志并归档(V2)

    脚本监控网络状态&日志归档整理(V2) 最近为检测***环境网络状态是否稳定,没有使用监控zabbix等监控工具,为方便快捷,使用脚本实现网络监控,并输出日志归档整理,方便后续排查. 在上次基 ...

  4. shell图形化监控网络流量 网络流量的监控工具有很多,如:Mrtg、Cacti、Zabbix等等,他们都有着各自的特点,不同的侧重,只为适合不同的应用场景的各种特殊需求。除了网络流量监控工具以外,还

    网络流量的监控工具有很多,如:Mrtg.Cacti.Zabbix等等,他们都有着各自的特点,不同的侧重,只为适合不同的应用场景的各种特殊需求.除了网络流量监控工具以外,还有Nagios这样的监控主机状 ...

  5. 转: 两款优秀的服务器网络流量监控工具:Ntopng和Munin-功能强大直观

    如果发现自己的VPS服务器异常,一般地我们可以从服务器日志中来分析,看看是不是有不守"规矩"的IP来源.例如,我们可以使用服务器日志分析利器:ngxtop和GoAccess来分析统 ...

  6. mac系统状态监控工具

    iStat Menus Mac版是一款优秀的mac系统状态监控工具,能够在系统菜单栏实时监控CPU.GPU.内存.硬盘.网络.温度.电池以及系统时间等,稳定且占用资源少,可以说是装机必备的软件! iS ...

  7. 网络环境监控工具:iNet Network Scanner for Mac

    想要实时了解当前的网络环境,有没有一款好用的网络扫描工具呢?当然有!iNet Network Scanner for Mac是Mac电脑上的一款网络环境监控工具,它可以显示Mac连接到设备的所有信息. ...

  8. Linux 网络流量监控工具

    Linux 网络流量监控 Linux 网络流量监控是捕获和分析企业的 Linux 网络流量的过程. 为什么要监控 Linux 网络流量 深入了解网络流量对于测量和管理带宽使用情况非常重要.分析 Lin ...

  9. Android 判断网络状态

    网络状态如果在5.0之后有了很大的改变,比如添加权限等,如果还是使用之前的判断 返现方法过时了 下面写了2个方法包含5.0之前的写法,和5.0之后的写法 5.0之后需要在配置文件中添加 <use ...

最新文章

  1. 图解Windows下开发Objective-C程序之二 - Objective-C入门例子
  2. 【Shall脚本】定时在线备份上传
  3. 微信小程序+TP5——token令牌生成
  4. python 交易日_Python判断某天是否为A股“交易日”?
  5. 计算机网络资料篇(一)——HTTP
  6. 瑞利分布概率密度函数推导_IBL推导及实现
  7. 使用可视化SQLyog操作数据库与使用idea操作数据库的区别
  8. 泡沫下的破浪者,智能语音产品到底落地何处?
  9. Tomcat设置编码方式
  10. 【DT调研】关于BIM + GIS的相关知识了解
  11. http协议与tcp协议区别
  12. css3技巧——产品列表之鼠标滑过效果translateY(三)
  13. Python 微信公众号文章爬取 简单记录一下
  14. 指定服务器不存在或访问被拒绝访问,SQL Server不存在或访问被拒绝怎么办
  15. 湖南师范大学2018年大学生程序设计竞赛新生赛 F-小名的回答
  16. cocosCreator 全局变量(Ts版)
  17. tensorflow离线安装
  18. mysql 1033_mysql报错1033 Incorrect information in file: ‘xxx.frm’问题的解决方法
  19. Modelica示例——比较器电路
  20. Caché 23种设计模式

热门文章

  1. 正则表达式 第二篇:环视
  2. L1-008 求整数段和(Python3)
  3. python爬qq音乐热评
  4. MyBatis 分页插件
  5. 【Kevin Learn QMUI】--> QMUIViewPager
  6. 对于入门密码学的新手们的有感
  7. 新站如何推广 新站推广的基础方法
  8. 2D激光SLAM-基于PL-ICP的激光雷达里程计
  9. 小程序地图功能及腾讯位置服务SDK获取当前位置名称并显示
  10. 将“Encountered an improper argument“ 问题有效解决