Skip to content

Optional: Configuring an external HBase

Resource Manager can be configured to use an external HBase cluster, rather than the cluster that is included in the application.

If you do not already have an external HBase cluster, there is no need to create one. The procedures in this section are for customers who wish to use an existing HBase cluster for Resource Manager data.

The version of HBase installed in your external HBase cluster must be compatible with the version of OpenTSDB used by the Resource Manager application. The minimum supported version of HBase is 0.92.

Perform the procedures in the following sections in order.

Configuring OpenTSDB for an external HBase cluster

To perform this procedure, install and start Resource Manager.

This procedure configures OpenTSDB to use an external HBase cluster, rather than the HBase cluster that is included in the Resource Manager application.

  1. Log in to the Control Center browser interface.
  2. In the Applications table, click Zenoss.resmgr.
  3. Scroll down to the Services table and locate the OpenTSDB services reader and writer.

    If you do not see reader and writer, expand the OpenTSDB service node.

  4. Click reader or writer.

    You will repeat the procedure for the other service.

  5. On the service details page, scroll down to the Configuration Files table and in the Actions column, click Edit.

  6. In the Edit Configuration dialog box, replace the value of the tsd.storage.hbase.zk_quorum key with the ZooKeeper quorum of the external HBase cluster.

    1. Delete the existing value.

      The default value is a Go language template expression.

    2. Specify the ZooKeeper quorum of the external HBase cluster.

      To specify a ZooKeeper quorum, create a comma-separated list of all quorum members. Specify each member of the quorum with a hostname or IP address, the colon character (:), and then the port number on which the ZooKeeper service is listening.

      Note: If you use hostnames, the Control Center master host must be able to resolve them to IPv4 addresses, either through a nameserver on the network or through entries in /etc/hosts.

      The following example shows the correct syntax for a 3-member ZooKeeper quorum:

      zk-1.example.com:2181,zk-2.example.com:2181,zk-3.example.com:2181
      
    3. Click Save.

    4. At the top of the page, click Stop, and then click Start.
    5. For the other OpenTSDB service (reader or writer), repeat the preceding steps.

Configuring the OpenTSDB service startup command

This procedure configures the OpenTSDB service to use the external HBase cluster on startup.

  1. Log in to the Control Center browser interface.
  2. In the Applications table, click Zenoss.resmgr.
  3. Scroll down to the Services table and locate the OpenTSDB services reader and writer.

    If you do not see reader and writer, expand the OpenTSDB service node.

  4. Click reader or writer.

    You will repeat the procedure for the other service.

  5. Near the top of the service details page, click Edit Service.

  6. In the Edit Service dialog box, change the value of the Startup Command field.

    1. Delete the Go language template expression.

      The expression is everything after start-opentsdb.sh.

    2. Specify the ZooKeeper quorum of the external HBase cluster.

      To specify a ZooKeeper quorum, create a comma-separated list of all quorum members. Specify each member of the quorum with a hostname or IP address, the colon character (:), and then the port number on which the ZooKeeper service is listening. Between start-opentsdb.sh and the ZooKeeper quorum list, include at least one empty space.

      Note: If you use hostnames, the Control Center master host must be able to resolve them to IPv4 addresses, either through a nameserver on the network or through entries in /etc/hosts.

      The following example shows the correct syntax for a 3-member ZooKeeper quorum:

      zk-1.example.com:2181,zk-2.example.com:2181,zk-3.example.com:2181
      
  7. Click Save Changes.

  8. At the top of the page, click Stop, and then click Start.
  9. For the other OpenTSDB service (reader or writer), repeat the preceding steps.

Disabling the Resource Manager HBase cluster

This procedure disables the HBase cluster that is included in the Resource Manager application.

  1. Log in to the Control Center master host as root, or as a user with superuser privileges.
  2. Stop the Resource Manager HBase cluster.

    serviced service stop HBase
    
  3. Disable automatic start of the HBase services.

    1. Change the configuration of each service.

      for svc in hmaster regionserver zookeeper
      do
         serviced service list $svc | sed -e 's/"Launch": "auto"/"Launch": "manual"/' | serviced service edit $svc
      done
      

      The serviced command displays the new configuration after each edit.

    2. Verify that each service is set to manual start.

      for svc in hmaster regionserver zookeeper
      do
         serviced service list $svc | egrep '"Launch":'
      done
      
  4. Remove the OpenTSDB prerequisite for the Resource Manager HBase cluster.

    Depending on your version of Control Center, the OpenTSDB service is either opentsdb or two separate services, reader and writer.

    1. Edit opentsdb, or one of reader or writer.

      serviced service edit reader
      

      The serviced command opens the service's configuration in the default text editor.

    2. Locate the Prereqs section, and then remove everything between the left square bracket ([) and the right square bracket (]) characters.

      The following lines show an example Prereqs section:

      "Prereqs": [
        {
          "Name": "HBase Regionservers up",
          "Script": "{{with $rss := (child (child (parent) \"HBase\")).Instances }}"
        }
      ],
      

      After editing, the section should look like the following example:

      "Prereqs": [],
      
    3. Save the file, and then exit the text editor.

    4. If your version of Resource Manager includes two OpenTSDB services (reader and writer) repeat the preceding substeps for the other service.