Hi,
I have a situation where I need to get the List of current Zookeepers and cassandra in my cluster,
As per documentation curl http://localhost:8080/v1/servers?pod=central will give me list of data stores.
Is it possible to get or parse the List seperately for zookeeper and cassandra.
We have a situation where a few nodes might not have Zookeeper and only cassandra,
Any Pointers are highly appreciated.
Regards,
Pallavi
You can either get that list from either the API that you mentioned and directly from zookeeper.
API is the easy way to get the list and status.
Is it possible to get or parse the List separately for zookeeper and Cassandra?
Yes, you can parse using a program or tool like jq, grep, shell etc.
Simple example: grep -in -e internalIP -e type test.json
5:"internalIP": "127.0.0.1", 34:"type": ["qpid-server"], 37:"internalIP": "10.0.2.15", 45:"type": ["application-datastore", "auth-datastore", "apimodel-datastore", "user-settings-datastore", "audit-datastore"], 51:"internalIP": "127.0.0.1", 80:"type": ["management-server"],
now replace type with datastore for Cassandra and zookeeper for zookeeper.
Hi ,
Can you please share one sample call for zookeeper parsing using api call.
For example I am trying to do curl -u admin@XXX.com:XXXXX "http://localhost:8080/v1/servers?pod=central®ion=dc-1" | grep -in -e internalIP -e datastore
and
curl -u admin@XXX.com:XXXXX "http://localhost:8080/v1/servers?pod=central®ion=dc-1" | grep -in -e internalIP -e zookeeper
But i dont get any response for zookeeper
also i dont see in type any values as zookeeper. Can you please help,
Regards,
Pallavi
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |