[ZBXNEXT-7060] REST API for Zabbix Server nodes in HA Created: 2021 Nov 17  Updated: 2022 Sep 16

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: 6.0.0alpha6
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Edgar Akhmetshin Assignee: Andris Zeila
Resolution: Unresolved Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Provide REST API for:
1. Load balancers to get Active/Standby nodes, for example HTTP checks are not possible currently: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html or with PCS/Corosync/Pacemaker it's not possible to find which node is active without log parsing or it's not possible to get node id for further processing;

2. Statistics related to the cluster itself.

For example:

$ curl -s http://localhost:10053/server | jq .
{
  "state": "running",
  "postmaster_start_time": "2019-09-24 09:22:32.555 CEST",
  "role": "master",
  "server_version": 6.0.66,
  "cluster_unlocked": false,
  "nodes": {
    "node1": node_id,
    "node2": node_id,
}

Main idea - provide interface for tools used within clouds or dynamic environments with LB tools.



 Comments   
Comment by Dennis Whitney [ 2022 Sep 16 ]

I ran into this need today when one of our HA nodes crashed. Since we run web and server on the same node the when the load balancer routed to the failed node the web interface stated that server was down, even though one of the HA nodes was up and active.

 

With that said, the "work around" is to make sure the web config settings ZBX_SERVER_HOST, and ZBX_SERVER_PORT are blank. Then whatever web server your load balancer routes traffic to will then connect to the correct active server.

 

It would be much nicer to have more control because in this case we're basically load balancing twice. Since we're using a load balancer and not using some kind of failover technology.

Generated at Sat May 31 03:48:25 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.