2012、09、04
修改了之前的文档,之前用的是apache做web服务器,可以在多次安装后发现个别情况会出现环境搭建完成后,访问smokeping页面是500内部错误。这次我换成了IIS+FCGI做web服务器,这样一来在windows平台上应该是不会有疑难杂症了。
文档下载地址 http://115.com/file/bed1wl9l
PS:由于115关闭了大众分享功能,现在需要下载别人分享的文件需要加主人为好友才能下载,所以需要这个文档的朋友请加我115好友,在下载页面就有我的账号。
以下为word粘贴上来的。
Smokeping2.6.8 For Windows With IIS FCGI
一、 软件准备
二、 软件安装
2.安装RRDtool for windows ,解压后运行install.cmd 默认安装就行.
#install 1
C:\smokeping\bin\tSmoke 改名为 tSmoke.pl
复制C:\cmokeping\etc\config.dist 并改名为 config
改为my $cfgfile = "C:\smokeping\etc\config ";
(line 16): use Sys::Syslog qw(:DEFAULT setlogsock); into #use Sys::Syslog qw(:DEFAULT setlogsock);
(line 31): $ENV{LC_NUMERIC}='C'; into #$ENV{LC_NUMERIC}='C';
(line 32-61): 注释掉程序if (setlocale(LC_NUMERIC,"") ne "C")
(line 4211): daemonize_me $cfg->{General}{piddir}."/smokeping.pid"; into #daemonize_me $cfg->{General}{piddir}."/smokeping.pid";
第21行 my $cfg = (shift @ARGV) || "$FindBin::Bin/../etc/config";
修改为 my $cfg = (shift @ARGV) || "c:/smokeping/etc/config.dist";(这里跟c:/smokeping/bin/smokeping.pl里面的使用的不是同一个config文件)
E) 创建文件夹 c:\smokeping\www\simg c:\smokeping\var
F) 编辑C:\smokeping\etc\config(For c:/smokeping/bin/smokeping.pl) 和C:\smokeping\etc\config.dist(for c:/wamp/cgi/smokeping.pl)
*** General ***
mailhost = smtp.qq.com
# 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.
datadir = \smokeping/var # designate implicitly c:\smokeping\var (for c:/smokeping/bin/smokeping.pl )
datadir = c:/smokeping/var # designate implicitly c:\smokeping\var (For c:/wamp/cgi/smokeping.pl)
cgiurl = http://127.0.0.1/cgi-bin/smokeping.pl
# specify this to get syslog logging
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no
*** Alerts ***
to = [email protected]
from = [email protected]
type = loss
# in percent
pattern = >0%,*12*,>0%,*12*,>0%
comment = loss 3 times in a row
*** Database ***
# 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 = gb2312
+ 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
#*** Slaves ***
*** 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.
menu = IDC Network
title = All IDC Networkinfo
menu = 河南电信
title = HeNan Tel
host = 219.150.150.150
menu = 奇爱365影视
title = 奇爱365影视连接信息
host = www.qiai365.com.
在此站点创建虚拟目录
ERROR: Cannot parse DS in 'DEF:ping1=c:/smokeping/var/LuoYangIDC/UnkownServer.rrd:ping1:AVERAGE'
修改/wamp/cgi/smokeping.pl 查找my $cfg = (shift @ARGV) || "c:/smokeping/etc/config";修改为my $cfg = (shift @ARGV) || "c:/smokeping/etc/config.dist";然后把c:/smokeping/etc/config复制一份重命名为config.dist ,修改config.dist里面datadir = c:/smokeping/var # designate implicitly c:\smokeping\var 把 红色部分修改为\smokeping/var