【问题标题】:How to turn on the audit logging with wsadmin script?如何使用 wsadmin 脚本打开审计日志记录?
【发布时间】:2015-06-03 20:03:08
【问题描述】:

我想使用 wsadmin 脚本打开审计日志记录。我能够像这样创建审核通知:

AdminTask.createAuditNotification('[-notificationName Log_Notification -sendEmail false -emailList -logToSystemOut true ]')

但我无法创建 auditnotification 监视器,因为它需要有 notificationRef:

AdminTask.createAuditNotificationMonitor('[-monitorName AuditMonitor -notificationRef WSNotification_1428567470299 -enable true ]')

如果我想让那个 ref (AdminTask.getAuditNotificationRef()) 把它放在一个变量中,那么它需要首先配置监视器(根据 IBM 文档)。如果我没有先配置通知监视器,那么 getAuditNotificationRef 将返回空值。但是如果我想配置监视器,我需要notificationRef :(。

对我来说有点令人困惑的东西......有人可以帮我解决这个问题吗?

谢谢

【问题讨论】:

    标签: admin websphere-8 wsadmin


    【解决方案1】:

    你看过知识中心吗?
    http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/txml_7auditnotify.html?lang=en

    这显示了以下示例:

    AdminTask.createAuditNotification('-notificationName defaultEmailNotification -logToSystemOut true -sendEmail true -emailList administrator@mycompany.com(smtp-server.mycompany.com) -emailFormat HTML')

    AdminTask.createAuditNotificationMonitor('-notificationName defaultEmailNotification -logToSystemOut true -sendEmail true -emailList administrator@mycompany.com(smtp-server.mycompany.com) -emailFormat HTML')

    AdminConfig.save()

    如您所见,不需要 -notificationRef。

    问候, 加里

    【讨论】:

      猜你喜欢
      • 2017-06-26
      • 1970-01-01
      • 1970-01-01
      • 2011-01-30
      • 1970-01-01
      • 2020-12-29
      • 2016-03-23
      • 2011-03-18
      • 1970-01-01
      相关资源
      最近更新 更多