Skip to content

clickhouse与ranger对接 #97

@mdianjun

Description

@mdianjun

架构:

  • 在ranger-admin界面上配置策略
  • ckman从ranger-admin上拉取策略,缓存在本地;把策略转成sql语句,发给各个ck server实例
  • ck server把审计日志导出,存到es上
  • ranger从es上拉取审计日志,展示到界面上

ckman与ranger-admin的通信方式是REST API;ranger-admin使用的是jersey框架创建的WebService,提供REST API。api文档地址:http://ranger.incubator.apache.org/apidocs/index.html

如果在ck上执行语句无权限,则query_log错误如下:

ubuntu0 :) select type,event_time,user,query,exception_code,exception from system.query_log where user='demo' order by event_time desc limit 1;\G

type:           ExceptionBeforeStart
event_time:     2021-05-14 14:58:59
user:           demo
query:          select * from demo_shard;
exception_code: 497
exception:      Code: 497, e.displayText() = DB::Exception: demo: Not enough privileges. To execute this query it's necessary to have grant SELECT(name, id, dt) ON default.demo_shard (version 21.4.4.1)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions