This section describes tasks for confirming proper installation of the VMware K4M Installation.
Verification by script:
- Checks message flow to Kafka broker by publishing and subscribing to test message. For this, the script downloads a Kafka distribution under the /scripts folder and runs the console producer and consumer.
- Queries the VMware K4M http://<K4M_HOST_IP>:8083/v1/health REST endpoint to verify all services are running.
For example, if the Host IP is 10.118.233.41. Then the URL will be http://10.118.233.41:8083/v1/health.
Note: In this release, the verification script checks only one Kafka broker and VMware K4M monitors its status. This is applicable for either a single-broker or a Kafka cluster. If you are running a Kafka cluster please provide any one broker and port as mentioned in the steps below, so the script can verify connectivity to at least one broker in the cluster.
Confirms all services are installed correctly and communicate with each other including VSA Kafka broker. Monitors status of following services:
- K4M Rest Service
- KPI Engine (based on Flink)
- KPI Configuration store (MongoDB)
- Ensure Kafka broker for the VSA solution is running and accessible.
- Become k4m user by modifying the script "step-4-as-k4m.sh" by setting values for the variables shown below:
# Set to Kafka broker KAFKA_HOST=kafka_broker_ip KAFKA_PORT=kafka_broker_port KAFKA_USER=kafka_user KAFKA_PASSWORD=kafka_password # Set to Zookeeper ZOOKEEPER_HOST=zookeeper_ip ZOOKEEPER_PORT=zookeeper_portNote: Use the advertised Kafka broker IP found in your broker’s server.properties. If secured access to Kafka broker is not required, the Kafka username and password should be left blank.
- Kafka status is monitored via JMX so the Kafka broker must have JMX port enabled. This muat be done when installing Kafka and in a manner so it is permanent (for example add to .bash_profile). Refer Installing Kafka for the procedure. If not done during Kafka installation, follow the steps to enable the port and restart Kafka.
Note: Setting the JMX port is required only to monitor Kafka status and not required to run K4M. So it can be an optional step. If you skip this step you can also skip the next command.
$ export JMX_PORT=kafka_broker_jmx_port
- Only if you have completed step 2 above, then set the same JMX port from step 2 in the script "step-4-as-k4m.sh": The script creates a service entry in VMware K4M for the Kafka broker using ip, port, JMX port. VMware K4M monitors Kafka and updates the status of the service.
- Run the script "step-4-as-k4m.sh” and if everything is running correctly, screen displays:
$ ./step-4-as-k4m.sh Verifying installation of VMware K4M services.... ..... VMware K4M services readyYou can also verify that all the services are online by visiting the REST API endpoint at http://<K4M_HOST_IP>:8083/v1/health.Note: Without enabling the JMX port on the Kafka host, VMware K4M is not able to monitor Kafka. However, this does not affect the working of VMware K4M. The script reports that JMX is not enabled.