API Stability Short-Term

The kafkaCluster() GraphQL query returns information on a Kafka cluster.

For information on Kafka, see the Kafka Configuration documentation page. You may also want to look at the Kafka Configuration reference page. For information on clusters in general, see the Cluster Management documentation page. Also, look at the LogScale Logical Architecture page in the Training section.

Syntax

Below is the syntax for the kafkaCluster() query field:

graphql
kafkaCluster: KafkaClusterDescription!

This query fiend has no input, just return values. You enter the parameters you want returned within curly-brackets. See the example here:

Show:
graphql
query {
  kafkaCluster {clusterID, nodes {
    id, host, port
  }, 
  logDirDescriptions {
    nodeID, path, error
  }}
}
Example Responses
Show:
json
{
  "data": {
    "kafkaCluster": {
      "clusterID": "ExlWrS6RT1CmbCiP2TejTQ",
      "nodes": [
        {
          "id": 0,
          "host": "localhost",
          "port": 9092
        }
      ],
      "logDirDescriptions": [
        {
          "nodeID": 0,
          "path": "/data/kafka-data",
          "error": null
        }
      ]
    }
  }
}

Given Datatypes

For the given datatype, KafkaClusterDescription, there are several parameters and sub-parameters. Below is a list of them, along with a description of each:

Table: KafkaClusterDescription

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 25, 2024
chatterTopicKafkaTopicDescriptionyes Short-TermAny chatter topic associated with the Kafka cluster. See KafkaTopicDescription.
clusterIDstringyes Short-TermThe unique identifier of the cluster.
controllerKafkaNodeyes Short-TermThe Kafka node that is the controller of the cluster. See KafkaNode.
globalEventsTopicKafkaTopicDescriptionyes Short-TermThe global Kafka events topic. See KafkaTopicDescription.
ingestTopicKafkaTopicDescriptionyes Short-TermA description of the Kafka ingest topic. See KafkaTopicDescription.
logDirDescriptions[KafkaLogDir]yes Short-TermDescriptions of the Kafka log directories. See KafkaLogDir.
nodes[KafkaNode]yes Short-TermThe list of Kafka nodes in the cluster. See KafkaNode.