Skip to content

ippontech/goshin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goshin!

I love Riemann but I hate Riemann-tools. You too? Try Goshin!

Goshin! aims to be a drop-in alternative to Riemann-tools.

Why?

By itself, Riemann-tools does the job. The main criticism is the installation procedure

gem install riemann-tools

A pretty neat one-line installer... Cool, right? But let's take a look at the dependencies :

  • faraday: HTTP/REST API client library
  • fog: The Ruby cloud services library
  • munin-client: Munin Node client
  • Nokogiri: an HTML, XML, SAX, and Reader parser
  • trollop: a commandline option parser for Ruby that just gets out of your way
  • yajl-ruby: Ruby C bindings to the excellent Yajl JSON stream-based parser library.
  • beefcake: A sane Google Protocol Buffers library for Ruby

What's wrong? Actually nothing if you just want to push metrics from your personnal laptop. But things get worse if you have to deploy riemann-tools in a heterogeneous environment :

  • beefcake requires Ruby 1.9.3 and on some (not so) old systems no package is available without adding external packages repositories
  • yajl-ruby and Nokogiri will compile a C extension and for this will require gcc

Goshin!, a Go alternative to riemann-tools

That's our proposal : use Golang to implement a drop-in alternative to riemann-tools. Just drop one big (sic) binary on your box and launch Goshin! No external dependencies.

Goshin! tries to mimic riemann-tools metrics gathering and for now covers the following riemann-tools metric :

  • riemann-health : cpu, memory and load
  • riemann-net : network usage
  • riemann-diskstats: disk statistics

Goshin! also borrows riemann-health, riemann-net and riemann-diskstats flags.

Usage

To start gathering metrics you just have to launch Goshin! binary. By default, it will report cpu,memory,load and network metrics to a local Riemann instance.

$ ./goshin
Gare aux goriiillllleeeees!
Goshin will report each 5 seconds

It tries to support the same flags as riemann-health and riemann-net.

$ ./goshin --host=riemann.example.com

To check the available flags, check the online help

./goshin --help
Usage of ./goshin:
  -checks="cpu,load,memory,net,disk": A list of checks to run
  -config="": Path to ini config for using in go flags. May be relative to the current executable path.
  -configUpdateInterval=0: Update interval for re-reading config file set via -config flag. Zero disables config file re-reading.
  -cpu-critical=0.95: CPU critical threshold (fraction of total jiffies)
  -cpu-warning=0.9: CPU warning threshold (fraction of total jiffies)
  -devices="": Devices to monitor
  -disk-critical=0.95: Disk critical threshold (fraction of space used)
  -disk-warning=0.9: Disk warning threshold (fraction of space used)
  -dumpflags=false: Dumps values for all flags defined in the app into stdout in ini-compatible syntax and terminates the app.
  -event-host="t510i": Event hostname
  -host="localhost": Riemann host
  -ignore-devices="": Devices to ignore (default: nil)
  -ignore-interfaces="lo": Interfaces to ignore (default: lo)
  -interfaces="": Interfaces to monitor
  -interval=5: Seconds between updates
  -load-critical=8: Load critical threshold (load average / core)
  -load-warning=3: Load warning threshold (load average / core)
  -memory-critical=0.95: Memory critical threshold (fraction of RAM)
  -memory-warning=0.85: Memory warning threshold (fraction of RAM)
  -port=5555: Riemann port
  -tag="": Tag to add to events
  -ttl=10: TTL for events

You can also pass flags via an ini-style configuration file and the --config flag

$ cat goshin.ini
host=riemann.example.com
interfaces=wlan0,tun0,eth0
tag=goshin
interval=1
$ ./goshin --config goshin.ini

License

Copyright 2012-2014 Ippon Technologies and Ippon Hosting

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this application except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Goshin! a Golang alternative to riemann-tools

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages