Usage examplesedit

Obtaining the ID, Version and health status

$ ecctl elasticsearch list --format '{{.ClusterID}} {{.PlanInfo.Current.Plan.Elasticsearch.Version}} {{.Healthy}}'
a2c4f423c1014941b75a48292264dd25 6.7.0 true
a4f29ff3ba554e69a1e1b40c3ee1b6e3 6.7.0 true
5e29960763ef496ea8cf6a5371328a6a 6.7.0 true
53023f28d68b4b329d9d913f110709d2 6.7.0 true

Since the template is executed we can also embed logic inside of the template to filter the results.

$ export EC_FORMAT='{{range .Elasticsearch.DefaultPlugins}}{{if eq . "discovery-file" }}{{$.Version}}{{end}}{{end}}'
# Since the template is executed on every item of the list, filter the empty lines to have a cleaner output.
$ ecctl stack list --format "${EC_FORMAT}" | sed '/^\s*$/d'

$ unset EC_FORMAT