Skip to content

Change the name, advertised host or rack of a node

PATCH
/api/v1/nodes/{id}
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.

id
required
string
X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Media typeapplication/json
object
>= 1 properties
name

Unique among all nodes.

string
/^[A-Za-z0-9._-]{1,63}$/
advertisedHost

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.

string
rack

Empty for none.

string
/^[A-Za-z0-9._-]{0,64}$/

Example generated

{
"name": "example",
"advertisedHost": "example",
"rack": "example"
}

The updated node.

Media typeapplication/json
object
id
string
name
string
clusterId
string | null
role
string
Allowed values: "" broker controller combined
kafkaNodeId
integer | null
hostname

The host name the agent reported at enrollment.

string
advertisedHost

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.

string
rack

Default broker.rack when the node joins a cluster; empty for none.

string
agentVersion
string
transport

Transport of the last enrollment: mtls (client certificate) or insecure (signed messages for agents behind a TLS-terminating proxy, no certificate).

string
Allowed values: mtls insecure
status

Last status reported by the agent; agents of earlier versions report fewer fields.

object
running
boolean
activeVersion

The Kafka release the agent starts.

string
installedVersions
Array<string> | null
meta

Meta.properties of the data directory.

object
clusterId
string
nodeId
integer
directoryId
string
formatted
boolean
dataBytes
integer format: int64
diskFreeBytes
integer format: int64
hostname
string
pid

Process of the agent’s Kafka: its child, or the main process of its systemd unit; 0 when none runs.

integer format: int64
lastExit
string
processRoles
string
javaVersion
string
adopted
boolean
kafkaDataDir

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.

string
kafkaProcess

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
pid
integer format: int64
startTimeMs

Start time in Unix milliseconds; 0 when unknown.

integer format: int64
version

Version of the first kafka-clients jar on the classpath, else of the first Kafka core jar; empty when the classpath names neither.

string
mixedVersions

The classpath holds jars of several Kafka versions.

boolean
user

Account that runs the process, or its uid.

string
foreignKafka

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.

Array<object>

A Kafka broker or controller JVM (main class kafka.Kafka), read from /proc.

object
pid
integer format: int64
startTimeMs

Start time in Unix milliseconds; 0 when unknown.

integer format: int64
version

Version of the first kafka-clients jar on the classpath, else of the first Kafka core jar; empty when the classpath names neither.

string
mixedVersions

The classpath holds jars of several Kafka versions.

boolean
user

Account that runs the process, or its uid.

string
labels
object | null
providerRef
string
lastSeenAt
string | null format: date-time
createdAt
string format: date-time
connected
boolean
certNotAfter

Expiry of the current agent certificate; unknown until the agent connects.

string | null format: date-time
certificateState

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.

string
Allowed values: "" ok expiring expired

Example

{
"role": "",
"transport": "mtls",
"certificateState": ""
}

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

conflict: another node has the name.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

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.