我正在尝试为我的家庭办公室设置 Smokeping,以解决我最近遇到的一些连接问题。理想情况下,我应该混合使用 FPing、DNS 和 Curl 监视器。 FPing 探针可以工作,但是 DNS 和 Curl 不会填充,并且 /var/log/messages 显示“没有为探针 X 定义目标,正在跳过。”
+ FPing
binary = /usr/bin/fping
+ DNS
binary = /usr/bin/dig
server = resolver.qwest.net
pings = 5
step = 120
+ Curl
binary = /usr/bin/curl
forks = 5
pings = 5
offset = 50%
timeout = 30
*** Targets ***
probe = FPing
menu = Top
title = Smokeping - Network Latency
remark = Home Office monitoring.
+ Ping
menu = Ping Monitoring
title = Ping Monitoring
++ LocalMachine
menu = Router (10.0.0.2)
title = Router (10.0.0.2)
host = 10.0.0.2
#alerts = someloss
++ SWCP
menu = members.swcp.com
title = members.swcp.com
host = members.swcp.com
+ DNS
probe = DNS
menu = DNS Monitoring
title = DNS Monitoring
++ Router
menu = Google
title = Google
lookup = www.google.com
server = resolver.qwest.net```
host
字段从您的目标文件来看,似乎没有指定任何
probe = Curl
目标,并且 DNS 探针 Router
没有指定 host
字段,而是使用 server
字段。我认为这就是导致“未定义目标”错误的原因。
这是我在自己的 Smokeping 中设置的 DNS 探测和目标的示例:
探针
+ DNS
binary = /usr/bin/dig
lookup = google.com
pings = 5
step = 300
目标
+ GoogleDNS1
menu = Google DNS 1
title = Google DNS 8.8.8.8
probe = DNS
host = 8.8.8.8
如您所见,它使用
host
而不是 server
。
一些相关文档: