- low-volume, management-related activities, such as creating or deleting tenants, namespaces or topics
- high-volume activities, such as produce, consume, and acknowledge events
Enable Audit Log
To enable the Audit Log on StreamNative Private Cloud, you need to configure them on thePulsarCoordinator
CR:
PulsarBroker
CR, otherwiese the Audit Log can’t work. This issue will be fixed in Pulsar 3.2.
persistent://sn/system/audit_log_all
topic.
Because the audit logs are stored in a Pulsar topic, you should configure the cleanup and backlog policy for the namespace to avoid having the Pulsar retention policies inadvertently clean up the audit logs.
Work with audit log
You can use Pulsar clients, Pulsar CLI, Rest API, and sink connectors to process and analyze the audit events stored in the Pulsar topics.Consume the audit log topic with Pulsar clients
You can get data from the audit log topic with Pulsar clients.Consume the audit log topic with Pulsar CLI
Thepulsar-client
is also a helpful tool to get data from the audit log topic. You can use pulsar-client
for StreamNative Platform cluster and consume data from the audit log topic.
Consume the audit log topic with Rest API
StreamNative Cloud supports Rest API, which provides a RESTful interface to a Pulsar cluster. For more information, see Rest API to learn how to leverage the Rest API to consume data from the audit log topic.Sink audit log topic with connectors
If you want to integrate audit log data with your other data systems like Google BigQuery, AWS SQS, and AWS Kinesis, use a sink connector.Audit log example
Event type
Each audit log includes information about the event, event time, and permission status. The supported audit event types include:Category | Type | Event type | Description | Default value |
---|---|---|---|---|
Management | Cluster | CreateCluster | Create a Pulsar cluster. | true |
Cluster | UpdateCluster | Update Pulsar cluster information. | true | |
Cluster | DeleteCluster | Delete Pulsar cluster information. | true | |
Tenant | CreateTenant | Create a Pulsar tenant. | true | |
Tenant | UpdateTenant | Update tenant information. | true | |
Tenant | DeleteTenant | Delete a Pulsar tenant. | true | |
Namespace | CreateNamespace | Create a namespace. | true | |
Namespace | DeleteNamespace | Delete a namespace. | true | |
Topic | CreatePartitionedTopic | Create a partitioned topic. | true | |
Topic | UpdatePartitions | Update partitions for a partitioned topic. | true | |
Topic | DeletePartitionedTopic | Delete a partitioned topic. | true | |
Subscription | CreateSubscription | Create a subscription. | true | |
Subscription | DeleteSubscription | Delete a subscription. | true | |
Describe | Cluster | ListClusters | List Pulsar clusters. | false |
Cluster | GetCluster | Get cluster information. | false | |
Tenant | ListTenants | List Pulsar tenants. | false | |
Tenant | GetTenant | Get tenant information. | false | |
Namespace | ListNamespaces | List Pulsar namespaces. | false | |
Namespace | GetNamespace | Get namespace information. | false | |
Topic | ListTopics | List Pulsar topics. | false | |
Topic | ListPartitionedTopics | List partitioned Pulsar topics. | false | |
Topic | GetPartitions | Get partitions of a partitioned topic. | false | |
Subscription | ListSubscriptions | List subscriptions of a topic. | false | |
Produce | Producer | NewProducer | Create a producer to produce messages to the topic. | false |
Producer | CloseProducer | Close a producer. | false | |
Consume | Consumer | NewConsumer | Create a consumer to subscribe to the topic. | false |
Consumer | CloseConsumer | Close a consumer. | false |