Skip to content

A simple ruby daemon to send host vitals to graphite

License

Notifications You must be signed in to change notification settings

mdvtlp/graphital

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graphital

<rashidkpc #logstash irc.freenode.net>

Graphital is a very (~50 lines) simple ruby daemon for shipping system vitals to Graphite. It uses a graphital.d directory and simply runs everything in it. Several examples are included (most require the 'sar' utility from the sysstat package), but its easy to write your own in your language of choice. If you w rite something particularly useful, please do share. Scripts should output in the format:
metric #

For example, to track cpu % you might create a file called graphital.d/cpu.rb and it might output (to stdout):
user 18
idle 80
iowait 2

Graphital will prepend the $PREFIX you set in graphital.conf (by default this includes hostname.chomp to prepend the hostname) and the name of the script before the first '.'. The above example might create a metric like hostname1.cpu.user. Scripts must complete in less than your specified $INTERVAL (60s by default) or they will be terminated.

Requirements

ruby >= 1.8.7 (probably?)
daemons gem (or bundler, which will just install the daemons gem)

Installation

Install:
git clone https://github.com/rashidkpc/graphital.git /opt/graphital
cd /opt/graphital
gem install daemons

Configure:
Set the location of your graphital.conf in on the first line of graphital.rb:
load '/opt/graphital/graphital.conf'

Set your Graphite server in graphital.conf:
$HOST = 'graphite.example.com'

Run:
This will invoke graphital.rb and put it into the background.
ruby /opt/graphital/daemon.rb start

About

A simple ruby daemon to send host vitals to graphite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published