Gem [net-ping] 使用 net-ping 搭建简易版拨测系统

wonderful60 · July 21, 2016 · 2228 hits

需求

对各主机网络的连通信以及服务端口状态做定期检测,如有异常报短信和邮件通知

具体功能

  • 实现 icmp ping
  • 实现 tcp 端口状态检查 (类似 telnet)
  • 实现 udp 端口状态检查 (类似 nc)
  • 实现 http web 服务状态检查

选择 net-ping

  • Ping::TCP
  • Ping::UDP
  • Ping::External
  • Ping::HTTP
  • Ping::ICMP
  • Ping::WMI
  • Ping::LDAP

详情: https://github.com/chernesk/net-ping/blob/master/doc/ping.txt

实现代码

https://github.com/wonderful60/simple_host_monitor

后话

楼主是 rails 新手,这次做这个简易系统主要是为了结合工作需求顺便练习一下 rails,类似需求用 zabbix 等监控系统来实现会更简单方便。

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.