Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 1.8.x

How to query the number of nodes in a cluster?

2 replies [Last post]
  • Login or register to post comments
Thu, 08/09/2012 - 12:53
b152341
Offline
Joined: 08/09/2012
Groups: None

Hey, I'm brand new to couchbase, but I was just given a task that requires interaction with a couchbase server.

Basically, I'm researching how to automate the creation of CNames from UltraDNS with the naming conventions we want. These naming conventions will use the corresponding node number of a node within a cluster.

Thus, I need a way to create a script that gets the number of nodes within a cluster(how?), and plug that into the soap request to create a new cname.

So how do I get the number of preexisting nodes within a given cluster??

Thanks ahead of time!

EDIT:

so it looks like this general command will include a list of nodes, I'm wondering if I can pull the number from this using a script of some sort.

Quote:
shell> couchbase-cli server-list -c 192.168.0.1:8091 -u Administrator -p password --output=json

Top
  • Login or register to post comments
Thu, 08/09/2012 - 21:52
mikew
Offline
Joined: 03/14/2011
Groups:

Try this:

./couchbase-cli server-list -c localhost:8091 -u Administrator -p password | wc -l

Top
  • Login or register to post comments
Mon, 08/13/2012 - 08:22
b152341
Offline
Joined: 08/09/2012
Groups: None

thank you, without the | wc -1 i was able to get a list that allowed me to pull from.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker