opentsdb加kerberos认证

1.编辑启动脚本 cat start_tsdb.sh

OPENTSDB_HOME=/data/opentsdb
JVMARGS="${JVMARGS} -Djava.security.auth.login.config=${OPENTSDB_HOME}/jaas.conf  -Dzookeeper.sasl.client=false" ./tsdb tsd --config=${OPENTSDB_HOME}/opentsdb.conf  --zkquorum=IP1,IP2,IP3

2.编辑jaas.conf 配置

Client {
  com.sun.security.auth.module.Krb5LoginModule required
  useKeyTab=true
  useTicketCache=true
  keyTab="/data/username/test.keytab"
  principal="[email protected]";
};


编辑 opentsdb.conf
tsd.network.port = 14242

# Number of worker threads dedicated to Netty, defaults to # of CPUs * 2
tsd.network.worker_threads = 24
tsd.http.staticroot = /usr/share/opentsdb/static/
tsd.http.cachedir = /tmp/opentsdb
tsd.storage.hbase.zk_basedir = /hbase
tsd.core.auto_create_metrics = true
tsd.core.plugin_path = /usr/share/opentsdb/plugins


# --------- STORAGE ----------
# Whether or not to enable data compaction in HBase, default is True
#tsd.storage.enable_compaction = true

# Name of the HBase table where data points are stored, default is "tsdb"
#tsd.storage.hbase.data_table = tsdb

tsd.storage.salt.width = 1
tsd.storage.salt.buckets = 16
tsd.storage.hbase.data_table = namespace:tsdb-test
tsd.storage.hbase.uid_table = namespace:tsdb-uid-test
tsd.core.uid.random_metrics = true

tsd.storage.enable_appends = true

hbase.zookeeper.quorum=IP1,IP2,IP3
hbase.zookeeper.znode.parent=/hbase

hbase.security.auth.enable=true
hbase.security.authentication=kerberos
hbase.security.simple.username=test
hbase.kerberos.regionserver.principal=hbase/[email protected]
hbase.sasl.clientconfig=Client
tsd.http.request.enable_chunked=true
tsd.http.request.max_chunk = 65536

4.opentsdb写热点问题
Opentsdb当中,存储数据表的表名字叫做tsdb表,tsdb表的行健结构是
指标UID(指标+标签的某个组合)+ 数据生成时间(取整小时)+标签1-Key的UID+标签1-Vlaue的UID+…+标签N-Key的UID+标签N-Vlaue的UID,
所以可以根据自己的监控指标建表时预分区
 

你可能感兴趣的:(openTSDB)