Enabling Remote Querying
Remote Querying can be enabled for a cluster of Streams Replication Manager Service roles (Streams Replication Manager Service cluster). When this feature is enabled, the configured Streams Replication Manager Service cluster acts as a monitoring gateway and fetches metrics from other, remote Streams Replication Manager Service clusters. This enables you to monitor the replications of your whole deployment using a single Streams Replication Manager Service cluster.
You enable Remote Querying for the Streams Replication Manager Service clusters that you want to designate as monitoring gateways. Once enabled, the designated Streams Replication Manager Service cluster discovers and communicates with other, remote Streams Replication Manager Service clusters and fetches the metrics collected by the remote Streams Replication Manager Service clusters. After configuration is complete, you can use the designated Streams Replication Manager Service cluster to monitor all replications in your deployment.
Configuration is done in Cloudera Manager by providing a list of external Kafka cluster aliases in the Streams Replication Manager Service Remote Target Clusters property. These clusters must be defined in Cloudera Manager using Kafka credentials.
- If any of the Streams Replication Manager installations are located behind a proxy, complete Configuring the advertised information of the Streams Replication Manager Service role
- Define all external Kafka clusters that you want to monitor.
- External clusters are defined by creating and configuring Kafka credentials. Kafka credentials are created and configured in Cloudera Manager on the page. For more information, see Defining external Kafka clusters.
- Ensure that the Name property of each Kafka credential you create for the external Kafka clusters matches the alias set for that Kafka cluster in the configuration of that Kafka cluster’s co-located Streams Replication Manager instance. The alias can be found in the Streams Replication Manager Co-located Kafka Cluster Alias property.
- Note down the Name property of each Kafka credential you create for the external Kafka clusters. You need to provide these during configuration.
- Ensure that network connectivity and DNS resolution are established between the clusters in your deployment. Additionally, the Streams Replication Manager Service’s HTTPS port (default 6671) must have both inbound and outbound traffic enabled.
Remote Querying is enabled and configured for the selected Streams Replication Manager Service cluster. The Streams Replication Manager Service cluster discovers and then communicates with other, remote Streams Replication Manager Service clusters and fetches metrics available on the remote Streams Replication Manager Service clusters.
- If any of the remote Streams Replication Manager Services have Basic Authentication enabled, complete Configuring Basic Authentication for Remote Querying.
- Access the Replications page on the Streams Messaging Manager UI. Remote replications will be visible in the UI.
- Query metrics using the Streams Replication Manager REST API. For example:
- Go to .
- Find and open the /v2/replications endpoint.
- Click Try it out then click
Execute.
The response includes all discovered replications, replicated topics, and various other metrics. This includes replications that target remote clusters.