I feel like I must be missing something obvious in the API Reference but can't work out how to find which node a runner is in through the API.
Thanks in advance
Hey @JamesNotJamez!
To make sure I understand your question. You are looking for an API to list all ECE runners (or instances)?
The runner is the service in charge of managing all other services that can be enabled on an ECE instance, and you can use the following API (with the relevant headers) to get a list of all the runners, the containers running in each runner, and the roles enabled.
GET /api/v1/platform/infrastructure/runners
Hi @zanbel
Maybe I didn't explain too well. What I'm looking for is to find the ece-reigon that a particular runner is in.
I had a look at the /api/v1/platform/infrastructure/runners call but while this returns lots of information on the runner it doesn't tell me what reigon/zone it's in.
Looking at the image below, I'm trying to find that woklxd00600 is in redhill-c through the API so I can use that information elsewhere in my script.
Thanks
I see. Yes, this page is rendered using a v0.1 API which is not document as it hasn't been migrated to the v1 API yet.
This is the endpoint used: GET /api/v0.1/regions/ece-region
But you should note that this will not work with basic authentication. To work around this issue you can copy the bearer token after you log in via the UI by opening the web developer tool and copy the authentication header.
And of course keep in mind this endpoint might change until it will be migrated to our v1 API endpoints. For example in newer version this view is already different.
Ah ok, thanks.
The use case of this was for master allocation of our monitoring nodes, which is running on each of the proxy nodes in a zone. ( We would of looked at the master node of the admin-console cluster and the proxy in that zone would be master )
Don't suppose there are any other examples you have of how master allocation has been done before using information available through the ECE API?
Many thanks
Not sure I follow you. Can you please elaborate on how master allocation of an Elasticsearch cluster is related to the proxy role?
In general master allocation is done so that we will always avoid a split brain scenario, which shouldn't be a problem in you case since you have 3 availability zones, although I only see one runner with an allocator role enabled. In any scenario weather you select 1, 2, or 3 AZs, ECE will know to spin a master eligible node if needed in order to avoid a split brain scenario.
My question didn't really relate to ECE itself. We are setting up monitoring of ECE and had planned to run a script on each of the proxy nodes then and had hoped to use the ECE api to elect a master node within our monitoring script. Although I've now realized the solution we had proposed wouldn't be resilient even knowing the zone of the proxy so we will look to do something ourselves.
Thanks for the help
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.