审计日志

Primeton MQ实现了审核日志记录,通过JMX或控制台管理界面进行的每个管理操作都将被记录。

通过设置com.primeton.pmq.audit系统属性打开或关闭审计日志,默认不开启,开启后对性能有一定的影响。可以通过在env启动脚本中取消注释以下行来开启审计日志:

PMQ_OPTS="$PMQ_OPTS -Dcom.primeton.pmq.audit=true"

默认情况下,审计日志存储在${PMQ_HOME}/data/audit.log中,内容的日志如下:

INFO  | anonymous called com.primeton.pmq.broker.jmx.QueueView.sendTextMessage[{"JMSType":"","JMSPriority":"4","JMSReplyTo":null,"JMSDestination":"dd","JMSDliveryMode":"2","JMSCorrelationID":null,"JSMExpiration":0}, ffff, wenyb, ****] on test-queue at 21-08-2020 16:52:30,850 | qtp934740803-43
INFO  | anonymous called com.primeton.pmq.broker.jmx.QueueView.browse[] on test-queue at 21-08-2020 16:52:39,931 | qtp934740803-57
INFO  | anonymous called com.primeton.pmq.broker.jmx.QueueView.browse[] on test-queue at 21-08-2020 16:52:58,316 | qtp934740803-51
INFO  | anonymous called com.primeton.pmq.broker.jmx.TopicView.browse[] on VirtualTopic.Mirror.test-queue at 21-08-2020 16:53:49,997 | qtp934740803-57
INFO  | anonymous called com.primeton.pmq.broker.jmx.TopicView.browse[] on PMQ.Advisory.Expired.Queue.test-queue at 21-08-2020 16:53:56,050 | qtp934740803-57
INFO  | anonymous called com.primeton.pmq.broker.jmx.TopicView.browse[] on PMQ.Advisory.Producer.Queue.test-queue at 21-08-2020 16:54:11,151 | qtp934740803-56
INFO  | anonymous called com.primeton.pmq.broker.jmx.TopicView.browse[] on PMQ.Advisory.MasterBroker at 21-08-2020 16:54:28,235 | qtp934740803-55

在此示例中,您可以看到在控制台或通过JMX采取的操作的示例条目。日志条目包含以下信息:

用户名(如果有),否则为“匿名”,默认为匿名 执行的操作,如果通过控制台执行,则在JMX情况下为方法名称和用于操作的参数

results matching ""

    No results matching ""