Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
oded_mass
Participant

cluster status

How can I retrieve the cluster and members status via the REST API? 

0 Kudos
5 Replies
Chris_Atkinson
Employee Employee
Employee

oded_mass
Participant

Thanks,

Is there an option to get this information with the Management API?

If I have multiple clusters then with the giga api I have to "login" and query each one separately with its own ip address.

 

Bob_Zimmerman
Authority
Authority

There's /run-script, which you could use to run a management-side script to get the cluster status via CPRID. The API endpoint has been present since APIv1.0, but the arguments it expects have changed over time, so check the documentation for your management version.

There's also /gaia-api, which lets you run GAiA API commands through the management. It was added in APIv1.7 (R81).

oded_mass
Participant

Thanks,
I am trying to use the /web_api/gaia-api/v1.7/show-cluster-state but I do not know what should I put as the target parameter. If I use the clusters uid I get the following error:

{
    "code""err_gaia_api_login_failed",
    "message""Cannot login to the Gateway: fbe388c6-4f9c-4393-bdcc-6884f5b57800"
}
 
what should I use for the target parameter?
do I need add roles to access the cluster?
 
I have a checkpoint-host (the managment system) with uid 3d43efed-b2fc-8e42-a066-66df35e628d4
a cluster with uid fbe388c6-4f9c-4393-bdcc-6884f5b57800 (a simple-cluster)
with 2 members:
1 with uid 42540f48-92e9-4f59-b479-42f59c2315cb (cluster-member) with status ok
2 with uid 9c881373-60bb-4217-a296-5897457cb7ae (cluster-member) with status down
 
 

 

0 Kudos
Bob_Zimmerman
Authority
Authority

The cluster as a whole doesn't have an OS, it has several (one per member). It doesn't know which one you want the OS information from.

Try with one of the members' IDs. I haven't actually used that API call, so I'm not sure how it works.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events