<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
For example, to track cpu % you might create a file called
graphital.d/cpu.rb and it might output (to stdout):
Graphital will prepend the $PREFIX you set in graphital.conf (by default this
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.
ruby >= 1.8.7 (probably?)
daemons gem (or bundler, which will just install the daemons gem)
git clone https://github.com/rashidkpc/graphital.git /opt/graphital
gem install daemons
Set the location of your graphital.conf in on the first line of graphital.rb:
Set your Graphite server in graphital.conf:
$HOST = 'graphite.example.com'
This will invoke graphital.rb and put it into the background.
ruby /opt/graphital/daemon.rb start