Skip to content

jgorset/custodian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custodian

Custodian is a lightweight resource monitor that makes it really easy and really awesome to sample metrics.

Usage

Server

Start Custodian and configure it to expose metrics on port 5100:

$ custodian --port=5100

Samplers

Custodian aggregates metrics from samplers, and ships with a whole bunch of them for popular figures like CPU, RAM and disk usage. That's interesting and all, but custom samplers are all the rage:

class RegisteredUsers < Custodian::Samplers::Sampler
  describe "Registered users"

  def self.sample
    Users.count
  end
end

Samplers are just Ruby classes that inherit from Custodian::Samplers::Sampler and implement a sample method, and you can load your own with the --samplers option.

$ custodian --samplers=~/.samplers

Clients

Unless you're crazy about JSON, you'll want to consume Custodian's API with a client. There are no clients for Custodian yet, but you should totally make one.

I love you

Johannes Gorset made this. You should tweet me if you can't get it to work. In fact, you should tweet me anyway.

About

Lightweight resource monitor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages