Monday 30 September 2013

Monitoring Zookeeper

Option 1
  1. yum -y install git
  2. cd
  3. mkdir bin
  4. mkdir tools
  5. cd tools
  6. git clone https://github.com/phunt/zktop.git
  7. nice updatedb
  8. locate zoo.cfg
    1. jot this path down for step below
    2. let's call it "mypathtozoocfg"
    3. the name of your zk conf may vary, adjust if so
  9. cd
  10. cd bin
  11. ln -s /root/tools/zktop/zktop.py .
    1. make sure you put the '.' on the end of that command
  12. /root/bin/zktop.py --config /<mypathtozoocfg>/zoo.cfg
Option 2, by hand
  1. echo srvr | nc localhost 2181
  2. echo stat | nc localhost 2181
  3. echo cons | nc localhost 2181
  4. etc.
  5. Try: watch -d "echo stat | nc localhost 2181" 
    1. on all zk nodes 
    2. in separate terms
Break-out
  1. srvr
    1. version
    2. latencies
    3. received client requests
    4. sent client responses and notifications
    5. outstanding requests
    6. zxid, cluster id
    7. mode in cluster, leader or follower
    8. node count (?)
  2. stat
    1. similar to srvr
      1. but has actual connections listed by IP near top
Taken: http://phunt1.wordpress.com/2010/03/29/monitoring-zookeeper-3-3-even-more-cussin/

Friday 20 September 2013

Set IPs on vagrant-lxc VMs

Cross-communication is always nice.

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.define "web", primary: true do |web|
    web.vm.box = "quantal64"
    web.vm.provider :lxc do |lxc|
      lxc.customize 'network.ipv4', '10.0.3.100/32'
    end
  end

  config.vm.define "db" do |db|
    db.vm.box = "quantal64"
    db.vm.provider :lxc do |lxc|
      lxc.customize 'network.ipv4', '10.0.3.101/32'
    end
  end

end


FYI, versioning info:

vagrant -v
Vagrant 1.3.3

vagrant plugin list
vagrant-lxc (0.6.0)

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...