Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

puppetlabs/puppetlabs-graphiteme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Graphite Me!

What does it do?

It's Yet Another simple way of putting data in to graphite.

Uses YAML, of course, as the configuration file. Runs commands, parses output, throws metrics around.

Config

--- 
:graphite: 'graphite.puppetlabs.net'
:port: 2003
:daemon: 30
:things: 
- :pairs: 
  - <%= hostname %>.pf.states: !ruby/regexp / \s+ current \s entries \s+ (\d+) \s/ix
  - <%= hostname %>.pf.memory: !ruby/regexp / \s+ memory \s+ (\d+) \s/ix
  :cmd: /usr/local/bin/sudo /sbin/pfctl -s info
- :pairs: 
  - <%= hostname %>.pf.maxstates: !ruby/regexp / ^states \s+ hard \s limit \s+ (\d+) /ix
  :cmd: /usr/local/bin/sudo /sbin/pfctl -s memory
  • graphite - hostname of your graphite/carbon server.
  • port - which side of the boat to connect to.
  • daemon - whether to daemonise and the frequency in seconds of how oft to run.
  • pid_dir - where to throw pids.
  • log_dir - where to throw logs.

This is where it gets... messy.

  • things - array of things to do things with.
  • pairs: hash of the following...
  • arrays of a hash (I wanted a tuple) metric name (with ERB for hostname) and regexp to look for.
  • cmd: command to run, of which the output you want parsed.

"Neat" huh?

About

Yet Another Simple Tool for pushing stats to graphite

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages