Sha256: 0a8506ed2a0af2c854296c245eb930295401b55d06ba35438cea0d3a0e9f0b91

Contents?: true

Size: 664 Bytes

Versions: 2

Compression:

Stored size: 664 Bytes

Contents

project "Riak" do
  server "localhost"

  riak_stats = %w[
    riak_kv_vnodes_running
    vnode_gets
    vnode_puts
    cpu_nprocs
  ]
  
  http 8098 do
    get "/stats" do

      riak_stats.each do |t|
        test "#{t}" do |r|
          r.body.match /"#{t}":(\d+)/
        end
      end

      test "CPU Avg 1/5/15" do |r|
        r.body.match(/"cpu_avg1":(\d+),"cpu_avg5":(\d+),"cpu_avg15":(\d+)/).captures.join("/")
      end
    end
  end

  riak_ports = {
    epmd_port:    4369,
    handoff_port: 8099,
    pb_port:      8087,
  }

  riak_ports.each do |name, num|
    socket num do
      open? do 
        test "#{name} open?"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
auger-1.4.6 cfg_examples/riak.rb
auger-1.4.5 cfg_examples/riak.rb