You know, for pings
pingbeat sends ICMP pings to a list of targets and stores the round trip time (RTT) in Elasticsearch (or elsewhere). It uses elastic/beats/libbeat to talk to Elasticsearch and other outputs.
pingbeat has the same requirements around the Go environment as libbeat, see here.
Install and configure Go.
Clone this repo:
git clone firstname.lastname@example.org:joshuar/pingbeat.git
make install in the repo directory.
pingbeat binary will then be available in
If intending on using the Elasticsearch output, you should add a new index template using the supplied one, for example with:
curl -XPUT /_template/pingbeat -d @/path/to/pingbeat.template.json
See the example configuration file for configuring your targets and assigning an output (default output is Elasticsearch).
There is a Kibana export you can use to create some basic visulisations and a simple dashboard to explore pingbeat data.
Once you've created a configuration file you can run pingbeat with:
pingbeat -c /path/to/beat.yml
To run Pingbeat with debugging output enabled, run:
./pingbeat -c pingbeat.yml -e -d "*"
Note on privileges
In order to send regular ICMP ping packets, pingbeat needs to open raw
sockets, which can only be done with superuser privileges. So you
either need to run pingbeat with sudo or as root to send regular
pings. If you don't want to do that, set
privileged: false in your
config and run pingbeat as a regular user. It will then use a
ping to test connectivity. You may still need to adjust the
net.ipv4.ping_group_range sysctl variable to allow a regular user to
send UDP ping packets.
Alternatively, on Linux you can grant pingbeat access to raw sockets
without the need to run with sudo or as root user, by granting the
CAP_NET_RAW capability (see: capabilities;
for overview of Linux capabilities). To set necessary capability,
ensure that the
setcap binaries are present (you
might need to install relevant packages from you distribution) in
PATH, then execute the following:
setcap cap_net_raw+ep <PATH>
PATH is the location where the pingbeat binary was installed;
to verify execute the following:
getcap <PATH>. Given that everything
went well, the output from
getcap should indicate that pingbeat has
cap_net_raw+ep capabilities set.
pingbeat is licensed under the Apache 2.0 license.