AdminTask 对象的 AuditNotificationCommands 命令组

可以使用 Jython 脚本语言,通过 wsadmin 工具来管理安全性审计系统。使用 AuditNotificationCommands 组中的命令和参数来配置及管理审计通知和审计通知监视器。

注: 本主题引用了一个或多个应用程序服务器日志文件。作为另一种建议采用的方法,您可以在分布式系统和 IBM® i 系统上配置服务器以使用高性能可扩展日志记录 (HPEL) 记录和跟踪基础结构,而不使用 SystemOut.logSystemErr.logtrace.logactivity.log 文件。您还可以将 HPEL 与本机 z/OS® 日志记录设施结合使用。如果要使用 HPEL,那么可从服务器概要文件 bin 目录使用 LogViewer 命令行工具来访问所有日志和跟踪信息。有关使用 HPEL 的更多信息,请参阅有关使用 HPEL 对应用程序进行故障诊断的信息。

createAuditNotification

createAuditNotification 命令会在 audit.xml 配置文件中创建审计通知对象。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-notificationName
指定要分配给审计通知对象的唯一名称。(字符串,必需)
-logToSystemOut
指定系统是否将通知记录到 SystemOut.log 文件。(布尔值,必需)
-sendEmail
指定是否要发送安全性审计子系统故障通知电子邮件。(布尔值,必需)

可选参数

-emailList
指定电子邮件列表以发送安全性审计子系统故障通知。(字符串,可选)
-emailFormat
指定电子邮件格式。指定 HTML(表示 HTML 格式)或 TEXT(表示文本格式)。(字符串,可选)

返回值

此命令会返回新审计通知对象的缩短引用标识,如以下样本输出所示:
WSNotification_1184690835390

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.createAuditNotification('[-notificationName mynotification -logToSystemOut 
    true -sendEmail true -emailList admin@mycompany.com(smtp-server.mycompany.com) 
    -emailFormat HTML]')
  • 使用 Jython 列表:
    AdminTask.createAuditNotification(['-notificationName', 'mynotification', '-logToSystemOut',
    'true', '-sendEmail', 'true', '-emailList', 'admin@mycompany.com(smtp-server.mycompany.com)',
    '-emailFormat', 'HTML'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.createAuditNotification('-interactive')

createAuditNotificationMonitor

createAuditNotificationMonitor 命令会为安全性审计系统创建审计通知监视器对象。此对象会监视安全性审计子系统是否可能发生故障。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-monitorName
指定审计通知监视对象的唯一名称。(字符串,必需)
-notificationRef
指定审计通知对象的引用标识。(字符串,必需)
-enable
指定是否要启用审计通知监视器。(布尔值,必需)

返回值

此命令会返回审计通知监视器的缩短格式引用标识,如以下样本输出所示:
AuditNotificationMonitor_1184695615171

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.createAuditNotificationMonitor('-monitorName mymonitor -notificationRef 
    WSNotification_1184690835390 -enable true')
  • 使用 Jython 列表:
    AdminTask.createAuditNotificationMonitor(['-monitorName', 'mymonitor', '-notificationRef',
    'WSNotification_1184690835390', '-enable', 'true'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.createAuditNotificationMonitor('-interactive')

deleteAuditNotification

deleteAuditNotification 命令会从 audit.xml 配置文件中删除审计通知对象。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-notificationRef
指定要删除的审计通知对象的引用标识。(字符串,必需)

返回值

如果系统从 audit.xml 配置文件中成功删除审计通知对象,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.deleteAuditNotification('-notificationRef WSNotification_1184690835390')
  • 使用 Jython 列表:
    AdminTask.deleteAuditNotification(['-notificationRef', 'WSNotification_1184690835390'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.deleteAuditNotification('-interactive')

deleteAuditNotificationMonitorByName

deleteAuditNotificationMonitorByName 命令会删除用户通过唯一名称来指定的审计通知监视器。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-monitorName
指定要删除的审计通知监视器的唯一名称。(字符串,必需)

返回值

如果系统从配置中成功删除审计通知监视器,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.deleteAuditNotificationMonitor('-monitorName mymonitor')
  • 使用 Jython 列表:
    AdminTask.deleteAuditNotificationMonitor(['-monitorName', 'mymonitor'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.deleteAuditNotificationMonitor('-interactive')

deleteAuditNotificationMonitorByRef

deleteAuditNotificationMonitorByRef 命令会删除用户通过引用标识来指定的审计通知监视器。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-monitorRef
指定要删除的审计通知监视器对象的引用标识。(字符串,必需)

返回值

如果系统成功删除相关审计通知监视器,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.deleteAuditNotificationMonitor('-monitorRef 
    AuditNotificationMonitor_1184695615171')
  • 使用 Jython 列表:
    AdminTask.deleteAuditNotificationMonitor(['-monitorRef', 
    'AuditNotificationMonitor_1184695615171'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.deleteAuditNotificationMonitor('-interactive')

getAuditNotification

getAuditNotification 命令会检索相关审计通知对象的属性。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

必需参数

-notificationRef
指定相关审计通知对象的引用标识。(字符串,必需)

返回值

此命令会返回特定审计通知对象的属性列表,如以下样本输出所示:
{{name mynotification}
{sslConfig {}}
{logToSystemOut true}
{_Websphere_Config_Data_Id cells/CHEYENNENode04Cell|audit.xml#WSNotification_1184690835390}
{emailList sweetshadow@us.ibm.com(smtp-server.us.ibm.com)}
{sendEmail true}
{_Websphere_Config_Data_Type WSNotification}
{properties {}}
{emailFormat HTML}}

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.getAuditNotification('-notificationRef WSNotification_1184690835390')
  • 使用 Jython 列表:
    AdminTask.getAuditNotification(['-notificationRef', 'WSNotification_1184690835390'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.getAuditNotification('-interactive')

getAuditNotificationMonitor

getAuditNotificationMonitor 命令会检索系统将其与相关审计通知监视器相关联的属性。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

必需参数

-monitorRef
指定相关审计通知监视器的引用标识。(字符串,必需)

返回值

此命令会返回相关审计通知监视器的属性列表,如以下样本输出所示:
{{name mymonitor}
{enabled true}
{_Websphere_Config_Data_Id cells/Node04Cell|audit.xml#AuditNotificationMonitor_1184695615171}
{_Websphere_Config_Data_Type AuditNotificationMonitor}
{wsNotification mynotification(cells/Node04Cell|audit.xml#WSNotification_1184690835390)}}

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.getAuditNotificationMonitor('-monitorRef 
    AuditNotificationMonitor_1184695615171')
  • 使用 Jython 列表:
    AdminTask.getAuditNotificationMonitor(['-monitorRef',
    'AuditNotificationMonitor_1184695615171'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.getAuditNotificationMonitor('-interactive')

getEmailList

getEmailList 命令会检索审计通知对象的电子邮件分发列表。如果未配置通知监视器,那么审计通知对象未处于活动状态,且此命令会返回空值。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

此命令会针对活动审计通知对象返回此电子邮件列表,如以下样本输出所示:
admin@mycompany.com(smtp-server.mycompany.com)

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.getEmailList()
  • 使用 Jython 列表:
    AdminTask.getEmailList()

交互方式示例用法

  • 使用 Jython:
    AdminTask.getEmailList('-interactive')

getSendEmail

如果审计子系统失败,那么 getSendEmail 命令会显示审计通知对象是否会发送电子邮件。如果未配置通知监视器,那么审计通知对象未处于活动状态,且此命令会返回空值。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

如果系统已配置为将电子邮件发送到分发列表,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.getSendEmail()
  • 使用 Jython 列表:
    AdminTask.getSendEmail()

交互方式示例用法

  • 使用 Jython:
    AdminTask.getSendEmail('-interactive')

getAuditNotificationRef

getAuditNotificationRef 命令会检索活动审计通知对象的引用标识。如果未配置通知监视器,那么审计通知对象未处于活动状态,且此命令会返回空值。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

如果审计通知对象处于活动状态,那么此命令会返回该审计通知对象的引用标识,如以下样本输出所示:
WSNotification_1184690835390

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.getAuditNotificationRef()
  • 使用 Jython 列表:
    AdminTask.getAuditNotificationRef()

交互方式示例用法

  • 使用 Jython:
    AdminTask.getAuditNotificationRef('-interactive')

getAuditNotificationName

getAuditNotificationName 命令会检索活动审计通知对象的唯一名称。如果未配置通知监视器,那么审计通知对象未处于活动状态,且此命令会返回空值。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

此命令会返回审计通知对象的唯一名称,如以下样本输出所示:
mynotification

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.getAuditNotificationName()
  • 使用 Jython 列表:
    AdminTask.getAuditNotificationName()

交互方式示例用法

  • 使用 Jython:
    AdminTask.getAuditNotificationName('-interactive')

isSendEmailEnabled

isSendEmailEnabled 命令会确定系统是否已配置为在安全性审计子系统失败时发送电子邮件。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

如果已启用电子邮件通知,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.isSendEmailEnabled()
  • 使用 Jython 列表:
    AdminTask.isSendEmailEnabled()

交互方式示例用法

  • 使用 Jython:
    AdminTask.isSendEmailEnabled('-interactive')

isAuditNotificationEnabled

isAuditNotificationEnabled 命令会确定是否已启用安全性审计系统通知。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

如果已启用安全性审计系统通知,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.isAuditNotificationEnabled()
  • 使用 Jython 列表:
    AdminTask.isAuditNotificationEnabled()

交互方式示例用法

  • 使用 Jython:
    AdminTask.isAuditNotificationEnabled()

listAuditNotifications

listAuditNotifications 命令会检索 audit.xml 文件中所配置的每个审计通知对象的属性。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

此命令会返回每个已配置的审计通知对象的属性列表,如以下样本输出所示:
{{name mynotification}
{sslConfig {}}
{logToSystemOut true}
{_Websphere_Config_Data_Id cells/CHEYENNENode04Cell|audit.xml#WSNotification_1184690835390}
{emailList sweetshadow@us.ibm.com(smtp-server.us.ibm.com)}
{sendEmail true}
{notificationRef WSNotification_1184690835390}
{_Websphere_Config_Data_Type WSNotification}
{properties {}}
{emailFormat HTML}}

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.listAuditNotifications()
  • 使用 Jython 列表:
    AdminTask.listAuditNotifications()

交互方式示例用法

  • 使用 Jython:
    AdminTask.listAuditNotifications('-interactive')

listAuditNotificationMonitors

listAuditNotificationMonitors 命令会列出 audit.xml 文件中所配置的审计通知监视器的属性。

用户必须具有监视员管理角色才能运行此命令。

目标对象

无。

返回值

此命令会返回审计通知监视器的属性列表,如以下样本输出所示:
{{name mymonitor}
{enabled true}
{_Websphere_Config_Data_Id cells/Node04Cell|audit.xml#AuditNotificationMonitor_1184695615171}
{_Websphere_Config_Data_Type AuditNotificationMonitor}
{monitorRef AuditNotificationMonitor_1184695615171}
{wsNotification mynotification(cells/Node04Cell|audit.xml#WSNotification_1184690835390)}
{notificationRef WSNotification_1184690835390}}

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.listAuditNotificationMonitors()
  • 使用 Jython 列表:
    AdminTask.listAuditNotificationMonitors()

交互方式示例用法

  • 使用 Jython:
    AdminTask.listAuditNotificationMonitors('-interactive'b)

modifyAuditNotification

modifyAuditNotification 命令会编辑 audit.xml 配置文件中的审计通知对象。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-notificationRef
指定要编辑的审计通知对象的引用标识。(字符串,必需)

可选参数

-logToSystemOut
指定是否将通知记录到 SystemOut.log 文件。(布尔值,可选)
-sendEmail
指定是否要发送电子邮件通知。(布尔值,可选)
-emailList
指定系统将电子邮件通知发送到的分发列表电子邮件地址。(字符串,可选)
-emailFormat
指定电子邮件格式。指定 HTML(表示 HTML 格式)或 TEXT(表示文本格式)。(字符串,可选)

返回值

如果系统成功更新安全性审计系统配置,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.modifyAuditNotification('-notificationRef WSNotification_1184690835390 
    -logToSystemOut false -sendEmail true -emailList admin@mycompany.com(smtp-server.mycompany.com)
    -emailFormat TEXT')
  • 使用 Jython 列表:
    AdminTask.modifyAuditNotification(['-notificationRef', 'WSNotification_1184690835390',
    '-logToSystemOut', 'false', '-sendEmail', 'true', '-emailList',
    'admin@mycompany.com(smtp-server.mycompany.com)', '-emailFormat', 'TEXT'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.modifyAuditNotification('-interactive')

modifyAuditNotificationMonitor

modifyAuditNotificationMonitor 命令会编辑安全性审计系统的审计通知监视器配置。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-monitorRef
指定相关审计通知监视器的引用标识。(字符串,必需)

可选参数

-notificationRef
指定审计通知对象的引用标识。(字符串,可选)
-enable
指定是否要启用审计通知监视器。(布尔值,可选)

返回值

如果系统成功更新审计通知监视器配置,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.modifyAuditNotificationMonitor('-monitorRef AuditNotificationMonitor_1184695615171 
    -notificationRef WSNotification_1184690835390 -enable true')
  • 使用 Jython 列表:
    AdminTask.modifyAuditNotificationMonitor(['-monitorRef', 'AuditNotificationMonitor_1184695615171',
    '-notificationRef', 'WSNotification_1184690835390', '-enable', 'true'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.modifyAuditNotificationMonitor('-interactive')

setEmailList

setEmailList 命令会指定安全性审计子系统失败时电子邮件通知所发送到的分发列表。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-emailList
指定审计通知所发送到的电子邮件地址或电子邮件分发列表。(字符串,必需)

返回值

如果系统成功为通知对象设置电子邮件通知列表,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.setEmailList('[-emailList admin@mycompany.com(smtp-server.mycompany.com)]')
  • 使用 Jython 列表:
    AdminTask.setEmailList(['-emailList', 'admin@mycompany.com(smtp-server.mycompany.com)'])

交互方式示例用法

  • 使用 Jython 字符串:
    AdminTask.setEmailList('-interactive')

setSendEmail

setSendEmail 命令会启用或禁用安全性审计系统的电子邮件通知。

用户必须具有审计员管理角色才能运行此命令。

目标对象

无。

必需参数

-enable
指定是否允许系统通过电子邮件来发送审计通知。(布尔值,必需)

返回值

如果系统成功修改配置,那么此命令会返回值 true

批处理方式示例用法

  • 使用 Jython 字符串:
    AdminTask.setSendEmail('-enable true')
  • 使用 Jython 列表:
    AdminTask.setSendEmail(['-enable', 'true'])

交互方式示例用法

  • 使用 Jython:
    AdminTask.setSendEmail('-interactive')

指示主题类型的图标 参考主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rxml_7audit7
文件名:rxml_7audit7.html