Change the name, advertised host or rack of a node
const url = 'http://localhost:8080/api/v1/nodes/example';const options = { method: 'PATCH', headers: { cookie: 'brokerium_session=<brokerium_session>', 'X-Brokerium-Request': '1', 'Content-Type': 'application/json' }, body: '{"name":"example","advertisedHost":"example","rack":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:8080/api/v1/nodes/example \ --header 'Content-Type: application/json' \ --header 'X-Brokerium-Request: 1' \ --cookie brokerium_session=<brokerium_session> \ --data '{ "name": "example", "advertisedHost": "example", "rack": "example" }'Role: operator. Give any of the fields. A changed advertised host of a node that runs
Kafka takes effect when the node is configured again (rolling restart, rolling upgrade).
Nodes of Docker clusters keep their container names as name and advertised host.
Audited as node.update.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Required on every non-GET request.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Unique among all nodes.
A DNS name (RFC 1123 labels separated by dots) or an IPv4 or IPv6 address; an empty string goes back to the host name the agent reported, which a node that runs Kafka accepts only when that name is a DNS name or an IP address.
Empty for none.
Example generated
{ "name": "example", "advertisedHost": "example", "rack": "example"}Responses
Section titled “Responses”The updated node.
object
The host name the agent reported at enrollment.
The host the listeners of the node advertise and the quorum and the server use; the reported host name by default, so it is empty only for an agent that reports none. A node whose advertised host is neither a DNS name nor an IP address cannot be chosen for a cluster.
Default broker.rack when the node joins a cluster; empty for none.
Transport of the last enrollment: mtls (client certificate) or insecure (signed messages for agents behind a TLS-terminating proxy, no certificate).
Last status reported by the agent; agents of earlier versions report fewer fields.
object
The Kafka release the agent starts.
Meta.properties of the data directory.
object
Process of the agent’s Kafka: its child, or the main process of its systemd unit; 0 when none runs.
Kafka data directory of the node, which Brokerium configures as log.dirs. Agents before 0.3.2 do not report it; their nodes get /var/lib/kafka/data.
The Kafka process the agent runs, with pid 0 when none runs. Restarts and upgrades wait for a new process and check its version. Agents before 0.3.2 do not report it.
object
Start time in Unix milliseconds; 0 when unknown.
Version of the first kafka-clients jar on the classpath, else of the first Kafka core jar; empty when the classpath names neither.
The classpath holds jars of several Kafka versions.
Account that runs the process, or its uid.
Kafka processes on the host that the agent does not run, such as the operator’s own unit of an adopted node. Steps that start Kafka on the node fail while one runs.
A Kafka broker or controller JVM (main class kafka.Kafka), read from /proc.
object
Start time in Unix milliseconds; 0 when unknown.
Version of the first kafka-clients jar on the classpath, else of the first Kafka core jar; empty when the classpath names neither.
The classpath holds jars of several Kafka versions.
Account that runs the process, or its uid.
Expiry of the current agent certificate; unknown until the agent connects.
Expiring means the certificate is close to its expiry and was not renewed; agents renew it after two thirds of its lifetime. Empty when the expiry is unknown.
Example
{ "role": "", "transport": "mtls", "certificateState": ""}Error.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}Error.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}conflict: another node has the name.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.