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.
- Log in to the Control Center browser interface.
- In the Applications table, click Zenoss.resmgr.
-
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.
-
Click reader or writer.
You will repeat the procedure for the other service.
-
On the service details page, scroll down to the Configuration Files table and in the Actions column, click Edit.
-
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.
-
Delete the existing value.
The default value is a Go language template expression.
-
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
-
Click Save.
- At the top of the page, click Stop, and then click Start.
- 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.
- Log in to the Control Center browser interface.
- In the Applications table, click Zenoss.resmgr.
-
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.
-
Click reader or writer.
You will repeat the procedure for the other service.
-
Near the top of the service details page, click Edit Service.
-
In the Edit Service dialog box, change the value of the Startup Command field.
-
Delete the Go language template expression.
The expression is everything after start-opentsdb.sh.
-
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
-
-
Click Save Changes.
- At the top of the page, click Stop, and then click Start.
- 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.
- Log in to the Control Center master host as root, or as a user with superuser privileges.
-
Stop the Resource Manager HBase cluster.
serviced service stop HBase
-
Disable automatic start of the HBase services.
-
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.
-
Verify that each service is set to manual start.
for svc in hmaster regionserver zookeeper do serviced service list $svc | egrep '"Launch":' done
-
-
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.
-
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.
-
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": [],
-
Save the file, and then exit the text editor.
- If your version of Resource Manager includes two OpenTSDB services (reader and writer) repeat the preceding substeps for the other service.
-