Add protobuf bindings to syspath

This commit is contained in:
Björn Busse 2020-07-01 20:01:34 +02:00
parent 28bf84fa46
commit 42fde2c6e7

View File

@ -32,6 +32,7 @@ import os
from prometheus_client import start_http_server, Summary
from prometheus_client.core import GaugeMetricFamily, REGISTRY
from prometheus_client import Gauge
#import pybase
import random
import re
import requests
@ -42,7 +43,10 @@ import sys
import time
import traceback
import xml.etree.ElementTree as et
from protobuf.ZooKeeper_pb2 import Master as pbMaster
sys.path.append('/usr/local/lib/hbase-protobuf-python')
sys.path.append('/usr/local/lib/hbase-protobuf-python/server')
sys.path.append('/usr/local/lib/hbase-protobuf-python/server/zookeeper')
from ZooKeeper_pb2 import Master as pbMaster
tmp_path = '/tmp/'
logpath = tmp_path
@ -368,6 +372,8 @@ class hbase_exporter():
prom_hbase_healthy.set(0)
return False
prom_hbase_up.set(1)
self.stale_regions_in_transition(hbase_active_master)
msg = 'hbase: {0} stale regions in transition '\
.format(self.num_regions_in_transition_stale)