You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The Knox Gateway provides a single access point for all REST interactions with Hadoop clusters. It will be valuable to monitor the access events happening in knox gateway and see if there is an anomaly and generate an alert.

EAGLE-96 

 

Apache Knox Audit Log Format

Apache Knox logs are audited in the following format by default,

 

AUDIT EVENT FORMAT
EVENT_PUBLISHING_TIME ROOT_REQUEST_ID|PARENT_REQUEST_ID|REQUEST_ID|LOGGER_NAME|TARGET_SERVICE_NAME|USER_NAME|PROXY_USER_NAME|SYSTEM_USER_NAME|ACTION|RESOURCE_TYPE|RESOURCE_NAME|OUTCOME|LOGGING_MESSAGE
The format can be modified by extending org.apache.log4j.Layout and using it in place of org.apache.hadoop.gateway.audit.log4j.layout.AuditLayout in log4j.appender.auditfile.layout property in KNOX/conf/gateway-log4j.properties

 


 

Component

Description

EVENT_PUBLISHING_TIME

Time when audit record was published.

ROOT_REQUEST_ID

The root request ID if this is a sub-request. Currently it is empty.

PARENT_REQUEST_ID

The parent request ID if this is a sub-request. Currently it is empty.

REQUEST_ID

A unique value representing the current, active request. If the current request id value is different from the current parent request id value then the current request id value is moved to the parent request id before it is replaced by the provided request id. If the root request id is not set it will be set with the first non-null value of either the parent request id or the passed request id.

LOGGER_NAME

The name of the logger

TARGET_SERVICE_NAME

Name of Hadoop service. Can be empty if audit record is not linked to any Hadoop service, for example, audit record for topology deployment.

USER_NAME

Name of user that initiated session with Knox

PROXY_USER_NAME

Mapped user name.

SYSTEM_USER_NAME

Currently is empty.

ACTION

Type of action that was executed. Following actions are defined: authentication, authorization, redeploy, deploy, undeploy, identity-mapping, dispatch, access.

RESOURCE_TYPE

Type of resource for which action was executed. Following resource types are defined: uri, topology, principal.

RESOURCE_NAME

Name of resource. For resource of type topology it is name of topology. For resource of type uri it is inbound or dispatch request path. For resource of type principal it is a name of mapped user.

OUTCOME

Action result type. Following outcomes are defined: success, failure, unavailable.

LOGGING_MESSAGE

Logging message. Contains additional tracking information.

 

References

Apache Knox User Guide

  • No labels