KBEC-00421 - How to get server status information from multiple machines within your environment

Article ID:360032820612
1 minute readKnowledge base
On this page


We have an environment with multiple CloudBees CD (CloudBees Flow) servers. How can we obtain information from these servers within an CloudBees CD (CloudBees Flow) agent instance.


After logging in using ectool from command-line, ectool saves information about the login session for further ectool invocations in a .ecsession file inside the user home directory. So if you want to send ectool API calls to different CloudBees CD (CloudBees Flow) servers you need to first login to each server separately:

ectool --server ef_server login "user_login" "user_password"

For example, I login first as admin use to one server:

ectool --server ef_server1 login "admin" "changeme"

Then login as admin user on another EF server:

ectool --server ef_server2 login "admin2" "changeme"

To get CloudBees CD (CloudBees Flow) server status information you can use the ectool getServerStatus API:

ectool getServerStatus --diagnostics 1

Please note that if you run further ectool commands without --server option, all calls will be sent to last used server (reading the above example, that would mean the last command obtained data from ef_server2). But your session with each machine is still active, so you can still send calls to the first logged server by using --server option. For example:

`java plain ectool --server ef_server1 getServerStatus --diagnostics 1 `