SmokePing 安装配置
最近发现一个比较好用的监控网络状态的软件,名叫SmokePing。于是下载下来,准备装上去看看效果。在linux下面装了半天没有装好,依赖关系太难搞了,而且配置也超难。于是转到FreeBSD下面。
cd /usr/ports/net-mgmt/smopkeping
make install clean
选择你想要装的插件fping是必须的,echoping和其它的都是可选择的。
然后ok
执行安装,大概要一个小时左右,要自行解决相关的安装包和依赖关系。(前提是FAMP环境要安装好,至少APACHE要安装配置好。因为smokeping需要用到apache及apache的一些模块)
安装和配置可以参考官网的文档,都是英文的,需要啃一下。呵呵
这里具体说一下config 这个文件的配置位置在/usr/local/etc/smokeping/目录下面
这个文件总共有几大部分
一、
*** General ***
这个是配置SmokePing的基本信息,包括一些文件的路径 联系人等等。具体如下:
owner = Kevin Deng----这个是所有者,也就是管理人员
contact=
dengxb@21mmo.com
------这个是管理员的邮箱
mailhost = mail.21mmo.com -----这个是你的邮件服务器
sendmail = /usr/sbin/sendmail----这个是发送报警用的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.
-----下面这些都是配置以web形式查看smokeping
imgcache = /usr/local/smokeping/htdocs/img
imgurl = img
datadir= /usr/local/var/smokeping
piddir= /usr/local/var/smokeping
cgiurl =
http://192.168.0.206/smokeping.cgi
smokemail = /usr/local/etc/smokeping/smokemail
tmail = /usr/local/etc/smokeping/tmail
# 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
二、
*** Alert ***
to =
alertee@address.somewhere
from =
smokealert@company.xy
这个就是报警邮箱的设置
三、
*** Database ***
step = 5----这个是每5分钟执行一次
pings = 5----这个是每次ping的次数
------重要:这两个参数必须在启动SmokePing之前设置好,如果启动之后再来修改这两个参数。那么,原来的RRD文件就必须删除,好像是这样,我还没有找到其它的方法。
# cons xff steps rows
AVERAGE0.5 1 1008
AVERAGE0.512 4320
MIN0.512 4320
MAX0.512 4320
AVERAGE0.5 144 720
MAX0.5 144 720
MIN0.5 144 720四、
*** Presentation ***
这里主要是定义你使用监控的方法,是使用fping还是echoping等,在这里定义好了之后,在后面的probes里面引用这里定义好的就可以了。这里面的参数基本上不用动,可以加语言包的设置,不过好像没有用。charset = gb2312和ping包的大小packetsize = 2000五、
*** Probes ***
A、引用上面定义好的探针。B、定义监控主机及在web上面的显示。我的配置如下:probe = FPingmenu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of ShenZhen Wang Yu Company. \
Here you will learn all about the latency of our network.
+ Test
menu = Targets
parents = owner:/Test/James location:/
title = Host in Test++ Jamesmenu = James
title =James
alerts = someloss
#slaves = boomer slave2
host = 219.84.206.211++ MultiHostmenu = Multihost
#title = James and James as seen from Boomer
title = All Host In One Graph
host = /Test/James /Test/QQ /Test/MFS-Monitor /Test/TaiWan++ QQmenu = QQ
title =
www.qq.com
host =
www.qq.com
++ MFS-Monitormenu = MFS-Monitor
title = Monitor
host = mfs.cacti.21mmo.com++ TaiWanmenu = TaiWan-Server
title = 219.84.206.211
host = 219.84.206.211+ Monitormenu = Monitor
title = Monitor Server Hosts++ ShenZhenmenu = ShenZhen
title = SZ-Cacti
host = abce.qq.com 六、
*** Slaves ***
这个是用于分布式监控的。暂时还没有测试过,等测试过后,再写上来吧。这个是比较基础的一个文档,现在这个配置还比较少,一般只能看官方文档配置了。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/83656/showart_2092875.html
页:
[1]