Each vendor has a slightly different connection approach
Confluent Cloud / AWS MSK
Automatic cluster discovery will initiate once an API key is provided.
Metrics will be collected via the vendor API.
Aiven
You'll need an API token, Kafka cluster connection details, and the project and service names.
Redpanda / Apache (Self-hosted)
No automatic cluster discovery. Each cluster should be added manually.
To enable metric collection in Superstream, a JMX connection must also be configured.
Superstream will fetch metrics from the /metrics endpoint, regardless of whether they are exposed by Prometheus exporters or directly from JMX sources.
To get Apache Kafka JMX port and token information, here are the key approaches:
Getting JMX Port
1. Check Kafka Server Configuration
Look in your server.properties file for JMX-related settings
Common JMX port configurations:
# Default JMX port is often 9999export JMX_PORT=9999# Or set via KAFKA_JMX_OPTSexport KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote.port=9999"
2. Check Environment Variables
echo $JMX_PORTenv|grepJMX
3. Check Running Processes
# Find Kafka process and check JMX argumentspsaux|grepkafka# Or use netstat to see what ports are listeningnetstat-tlnp|grepjava
4. Check Startup Scripts
Look in kafka-server-start.sh or similar startup scripts
Check for JMX_PORT or KAFKA_JMX_OPTS variables
Testing JMX Connection
Common Default Locations
Confluent Platform: JMX typically on port 9581-9585
If JMX isn't enabled, you'll need to configure it by adding the appropriate JMX options to your Kafka startup configuration.
Required JMX Rules/metrics
To collect detailed Kafka JMX metrics, add the following rules section to the JMX Exporter YAML configuration. These patterns match Kafka server, network, controller, log, and Java metrics, and convert them into Prometheus-compatible metrics.
Include this full rules list in the configuration to ensure comprehensive metric coverage:
These rules should be added to the JMX Exporter YAML configuration to expose comprehensive metrics for the Kafka broker, controller, network, log, and JVM.
Step 3: Verify that all discovered or added clusters are in a healthy state
When clusters are added or discovered, the system may surface warnings related to permissions or network connectivity. It’s recommended to resolve these promptly to ensure proper functionality.