Parse fping output, store result in influxdb 1.2, and visualizing with grafana.
Install golang : https://golang.org/doc/install
$ sudo apt-get install fping
[influxdb]
host = "192.168.114.30"
port = "8086"
db = "fping"
measurement = "ping"
precision = "ms"
retentionpolicy = "infinite"
user = "fping"
pass = "fpingdakjwgkawjnmbjhwtuia"
[consul]
url = "http://a:a@consul1.dx/v1/catalog/nodes"
$ ./setup.sh
$ sudo systemctl status infping.service
2017/06/21 20:01:02 Connected to influxdb! (dur:1.996646ms, ver:1.2.4)
2017/06/21 20:01:02 Going to ping the following ips: [192.168.200.121 192.168.114.30]
2017/06/21 20:01:12 Node:b827eb3068d3am13k, IP:192.168.200.121, loss: 0, min: 5.83, avg: 17.3, max: 76.4
2017/06/21 20:01:12 Node:consulnode, IP:192.168.114.30, loss: 0, min: 0.47, avg: 0.59, max: 0.68
$ consul members
Node Address Status Type Build Protocol DC
consulnode 192.168.114.30:8301 alive server 0.8.3 2 dc1
b827eb3068d3am13k 192.168.200.121:8301 alive client 0.8.3 2 dc1