配置审核日志

时间:2019-05-20 04:47:34

标签: logging hive log4j audit apache-ranger

我试图通过独立的配置单元使用Ranger 1.2.0版本,并使用docker映像部署它们。我已在Hive组件中启用了属性,以便在apache Ranger中获取审核日志。但我在管理控制台上看不到任何日志。 apache-ranger 1.2.0有log4j2.properties文件,但是当我转到Ranger中的audit选项卡时,它将引发以下错误“找不到访问审核!”。我不确定是否未正确启用任何功能,或者是否需要添加一些内容以使护林员在log4j2上写入日志。作为POC,我尝试添加log4j属性和文件,但仍然存在相同的错误,没有运气。

任何帮助将不胜感激

name = HiveLog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.hive.log.level = INFO
property.hive.root.logger = console
property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
property.hive.log.file = hive.log
property.hive.perflogger.log.level = INFO

# list of all appenders
appenders = console

# console appender
appender.console.type = Console
appender.console.name = console
appender.console.target = SYSTEM_ERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n

# list of all loggers
loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX, PerfLogger

logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
logger.NIOServerCnxn.level = WARN

logger.ClientCnxnSocketNIO.name = org.apache.zookeeper.ClientCnxnSocketNIO
logger.ClientCnxnSocketNIO.level = WARN

logger.DataNucleus.name = DataNucleus
logger.DataNucleus.level = ERROR

logger.Datastore.name = Datastore
logger.Datastore.level = ERROR

logger.JPOX.name = JPOX
logger.JPOX.level = ERROR

logger.PerfLogger.name = org.apache.hadoop.hive.ql.log.PerfLogger
logger.PerfLogger.level = ${sys:hive.perflogger.log.level}

# root logger
rootLogger.level = ${sys:hive.log.level}
rootLogger.appenderRefs = root
rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}```

0 个答案:

没有答案