This section describes tasks for confirming proper installation of the VMware K4M Installation.

Verification by script:
  1. 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.
  2. 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.

Prerequisites

Confirms all services are installed correctly and communicate with each other including VSA Kafka broker. Monitors status of following services:
  1. K4M Rest Service
  2. KPI Engine (based on Flink)
  3. KPI Configuration store (MongoDB)
  4. Ensure Kafka broker for the VSA solution is running and accessible.

Procedure

  1. 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_port
    Note: 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.
  2. 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
  3. 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.
    KAFKA_JMX_PORT=kafka_broker_jmx_port
  4. 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 ready
    You 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.