Skip to content

Add support for multiple nodes#95

Merged
martialblog merged 3 commits intorelease/v1-0-0from
multiple-hosts
Feb 11, 2026
Merged

Add support for multiple nodes#95
martialblog merged 3 commits intorelease/v1-0-0from
multiple-hosts

Conversation

@martialblog
Copy link
Member

This changes the --hostname flag into an array of strings so that it can be used multiple this.

It also removes the --tls and --port flag which are now included as a full URL in the --hostname.
And the CHECK_ELASTICSEARCH_HOSTNAME env variable is removed, since it was designed for a single hostname.

Some examples:

With multiple nodes:

go run main.go health -H http://localhost:9200 -H "http://localhost:9202"
[OK] - Cluster eventdb-cluster is green 
| status=0 nodes=3 data_nodes=3 active_primary_shards=0 active_shards=0

When one node is down (I have no indices so all is green, note the nodes=2):

go run main.go health -H http://localhost:9200 -H "http://localhost:9202"
[OK] - Cluster eventdb-cluster is green 
| status=0 nodes=2 data_nodes=2 active_primary_shards=0 active_shards=0

When no node is reachable:

go run main.go health -H http://localhost:123 -H "http://localhost:321"
[UNKNOWN] - could not fetch cluster health: No node reachable (*fmt.wrapError)

@martialblog martialblog added this to the v0.6.0 milestone Jan 22, 2026
This changes the --hostname flag into an array of strings
so that it can be used multiple this.

It also removes the --tls and --port flag which are now included
as a full URL in the --hostname
@martialblog martialblog marked this pull request as ready for review January 22, 2026 10:50
@martialblog martialblog self-assigned this Jan 22, 2026
@RincewindsHat
Copy link
Member

I do like the functionality and in general I do approve of this.
My worry now is, that those changes WILL break existing setups if the old version is already in place

@martialblog
Copy link
Member Author

Yes indeed, I will note that in the Release Notes and we should state it in the packages.

On the other side, I do think plugin is pretty feature complete after my recent changes and we could move to a 1.0.0

@martialblog martialblog changed the base branch from main to release/v1-0-0 February 11, 2026 13:13
@martialblog martialblog merged commit 37a033d into release/v1-0-0 Feb 11, 2026
2 checks passed
@martialblog martialblog deleted the multiple-hosts branch February 13, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments