第一部分 General 属于基本配置。值得注意的地方有imgcache和imgurl这两个参数,要注意一下,和apache配置相关联,如果配置不好的话,打开web的时候图片会显示不出来。
*** General ***
owner = Kevin Deng
contact = kevinadmin@sohu.com
mailhost = smtp.sohu.com
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/htdocs/img
imgurl = img
datadir = /usr/local/var/smokeping
piddir = /usr/local/var/smokeping
cgiurl = http://192.168.0.206/smokeping/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
第二部分Alerts 是属于报警配置, 这个我还没有测试过。以后再说
*** 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
pattern = ==S,>0%,>0%,>0%
comment = loss at startup
+rttdetect
type = rtt
# in milli seconds
pattern = <10,<10,<10,<10,<10,<100,>100,>100,>100
comment = routing mesed up again ?
*** Targets ***
probe = FPing
menu = 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.
####### Slaves Configure ###########
+ Slaves
menu = Slaves
title = All of the Monitor From the Slaves
++ ShanTou
menu = ShanTou
title = Host 192.168.0.208 Monitor From Slaves
slaves = st fy
host = 192.168.0.208
++ FuYong
menu = FuYong
title = Host 192.168.0.210 Monitor From Slaves
slaves = fy st
host = 192.168.0.210
######## Single Hosts Monitor Configure ########
+ Hosts
menu = Single
#parents = owner:/Test/James location:/
#title = Host in Test
title = Single Host Monitor
#++ James
#menu = James
#title =James
#alerts = someloss
#slaves = boomer slave2
#host = 192.168.0.205
++ MFS-Monitor
menu = MFS-Monitor
title = Monitor
host = 192.168.0.210
++ TaiWan
menu = TaiWan-Server
title = 229.84.216.201
host = 229.84.216.201
+ Monitor
menu = Monitor Servers
title = Monitor Server Hosts
++ ShenZhen
menu = ShenZhen
title = SZ-Cacti
host = 192.168.0.208
############# MultiHost Monitor In One Graph Configure #####
+ MultiHost
menu = Multihost
#title = James and James as seen from Boomer
title = All Host In One Graph
host = /Hosts/QQ /Hosts/MFS-Monitor /Hosts/TaiWan
Q:Slave启动的时候报错。
[iyunv@Nagios etc]# /usr/local/smokeping/bin/smokeping --master-url=http://192.168.0.206/smokeping/smokeping.cgi --cache-dir=/usr/local/smokeping/var/ --shared-secret=/usr/local/smokeping/etc/smokeping_secrets --slave-name=ShenZhen
WARNING: Opening secrets file /usr/local/etc/smokeping/slavesecrets.conf: Permission denied
ERROR: we did not get config from the master. Maybe we are not configured as a slave for any of the targets on the master ?
A:
在master上面 对slavesecrets.conf文件 执行如下命令:
chow smokeping slavesecrets.conf
Q:
[iyunv@Nagios etc]# /usr/local/smokeping/bin/smokeping --master-url=http://192.168.0.206/smokeping/smokeping.cgi --cache-dir=/usr/local/smokeping/var/ --shared-secret=/usr/local/smokeping/etc/smokeping_secrets --slave-name=ShenZhen
WARNING: Data from ShenZhen was signed with 58e8b1b17440aa40fac67161b8c7a328 which does not match our expectation
ERROR: we did not get config from the master. Maybe we are not configured as a slave for any of the targets on the master ?
A:
这个错误就是本地的密码文件配置错误,本地密码文件只保存master上面配置你这台slave的密码,只需要一个密码就可以了
Q:
[iyunv@Nagios etc]# /usr/local/smokeping/bin/smokeping --master-url=http://192.168.0.206/smokeping/smokeping.cgi --cache-dir=/usr/local/smokeping/var/ --shared-secret=/usr/local/smokeping/etc/smokeping_secrets
WARNING: No secret found for slave Nagios.kevinadmin.org
ERROR: we did not get config from the master. Maybe we are not configured as a slave for any of the targets on the master ?
A:
在master上面的密码文件里加上Nagios.kevinadmin.org及对应的密码就可以了。
Q:
[iyunv@Nagios etc]# /usr/local/smokeping/bin/smokeping --master-url=http://192.168.0.206/smokeping/smokeping.cgi --cache-dir=/usr/local/smokeping/var/ --shared-secret=/usr/local/smokeping/etc/smokeping_secrets
WARNING: I don't know the slave Nagios.kevinadmin.org ignoring it
ERROR: we did not get config from the master. Maybe we are not configured as a slave for any of the targets on the master ?
A:
这个是指在config文件里面没有定义Nagios.kevinadmin.org这个从服务器