GithubHelp home page GithubHelp logo

jaxxstorm / graphping Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 3.0 19 KB

Ping a list of endpoints and write the results to statsd

License: MIT License

Go 100.00%
statsd ping smokeping network-monitoring network-graph network-visualization

graphping's Introduction

graphping

Description

Graphping is a tool to ping a list of endpoints and send the results to statsd

It allows you to create graphs of latency in a similar manner to smokeping

Graphping is written in Go and takes advantages of many of Go's features:

  • Built in concurrency
  • Fast
  • Easy to build/install

Usage

Graphping requires a few options to run. Here's the basic usage:

NAME:
   graph-ping - Ping a list of endpoints and send the resulting metrics to statsd

USAGE:
   main [global options] command [command options] [arguments...]

VERSION:
   0.1

AUTHOR(S):
   Lee Briggs

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --config-file value, -c value  Path to configuration file
   --statsd value, -s value       Address of statsd listener
   --verbose                      Output metrics in logs
   --help, -h                     show help
   --version, -v                  print the version

Config File

Graphping requires a config file declaring the endpoints you wish to ping. The config format is hcl meaning you can either provide a human readable HCL config file or a JSON config file. An example HCL file looks like this:

interval = 10 # A global interval. Can be overwritten per target group
prefix = "graphping" # A global prefix for statsd metrics


# Declare a target group with a name
target_group "search_engines" {
  # a custom ping interval for this group
  interval = 2
  # A prefix for the statsd metric for this group
  prefix = "search"
  # A name for the target. This becomes the statsd metric
  target "google" {
    address = "www.google.co.uk"
  }
  target "bing" {
    address = "www.bing.com"
  }
}

# You can specify multiple target groups
target_group "news_sites" {
  prefix = "uk"
  target "bbc" {
    address = "www.bbc.co.uk"
  }
}

StatsD Listenser

You need to specify the address of the statsd listener you want to send metrics to. This is in string format, including port number.

For example:

graphping -c /path/to/config/file.hcl -s 127.0.0.1:8125

Building

The project uses glide for dependencies. So:

Install it into your gopath and then run glide install

From here, you can build it:

go build main.go

Important Notes

  • I am still learning Go, so there may be some absolute nonsense in here. Pull requests are very welcome

Acknowledgements

  • Thanks to my colleague @cspargo for his initial idea and the first prototype of the code

graphping's People

Contributors

jaxxstorm avatar majormoses avatar the-allanc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphping's Issues

Docs

Need to write a readme and release

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.