GithubHelp home page GithubHelp logo

abaskin / pingbeat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshuar/pingbeat

0.0 2.0 0.0 50.93 MB

Pingbeat sends ICMP packets and stores the RTT in Elasticsearch or other outputs supported by libbeat.

License: Apache License 2.0

Makefile 5.11% Go 77.57% Python 3.97% Roff 13.35%

pingbeat's Introduction

pingbeat

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.

Requirements

pingbeat has the same requirements around the Go environment as libbeat, see here.

Installation

Install and configure Go.

Clone this repo:

git clone [email protected]:joshuar/pingbeat.git

Run make install in the repo directory.

The pingbeat binary will then be available in $GOPATH/bin.

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

Usage

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 UDP 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 binary CAP_NET_RAW capability (see: capabilities; for overview of Linux capabilities). To set necessary capability, ensure that the getcap and setcap binaries are present (you might need to install relevant packages from you distribution) in your PATH, then execute the following: setcap cap_net_raw+ep <PATH> where 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 now cap_net_raw+ep capabilities set.

License

pingbeat is licensed under the Apache 2.0 license.

pingbeat's People

Contributors

davidjfelix avatar fcrisciani avatar joshuar avatar kwilczynski avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.