-
-
Save xman1980/ca43f779ea62d19196645d2a69c4268f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from cm_api.api_client import ApiResource | |
## ** CM Connection Settings ****************************** | |
cm_host = "localhost" | |
cm_port = "7180" | |
cm_login = "admin" | |
cm_password = "admin" | |
cluster_name = "Cluster 1" | |
print "Connecting to Cloudera Manager at : http://" + cm_host + ":" + cm_port | |
api = ApiResource(server_host=cm_host, server_port=cm_port, username=cm_login, password=cm_password) | |
cluster = api.get_cluster(cluster_name) | |
for service in cluster.get_all_services(): | |
print service.type + " Service " + "(" + service.displayName + ")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment