You can use the Jython scripting language to manage the security auditing system with the wsadmin tool. Use the commands and parameters in the AuditNotificationCommands group to configure and manage audit notifications and audit notification monitors.
The createAuditNotification command creates an audit notification object in the audit.xml configuration file.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Optional parameters
Return value
WSNotification_1184690835390
Batch mode example usage
AdminTask.createAuditNotification('[-notificationName mynotification -logToSystemOut true -sendEmail true -emailList admin@mycompany.com(smtp-server.mycompany.com) -emailFormat HTML]')
AdminTask.createAuditNotification(['-notificationName', 'mynotification', '-logToSystemOut', 'true', '-sendEmail', 'true', '-emailList', 'admin@mycompany.com(smtp-server.mycompany.com)', '-emailFormat', 'HTML'])
Interactive mode example usage
AdminTask.createAuditNotification('-interactive')
The createAuditNotificationMonitor command creates an audit notification monitor object for the security auditing system. This object monitors the security auditing subsystem for possible failure.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Return value
AuditNotificationMonitor_1184695615171
Batch mode example usage
AdminTask.createAuditNotificationMonitor('-monitorName mymonitor -notificationRef WSNotification_1184690835390 -enable true')
AdminTask.createAuditNotificationMonitor(['-monitorName', 'mymonitor', '-notificationRef', 'WSNotification_1184690835390', '-enable', 'true'])
Interactive mode example usage
AdminTask.createAuditNotificationMonitor('-interactive')
The deleteAuditNotification command deletes an audit notification object from the audit.xml configuration file.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Return value
The command returns a value of true if the system successfully deletes the audit notification object from the audit.xml configuration file.
Batch mode example usage
AdminTask.deleteAuditNotification('-notificationRef WSNotification_1184690835390')
AdminTask.deleteAuditNotification(['-notificationRef', 'WSNotification_1184690835390'])
Interactive mode example usage
AdminTask.deleteAuditNotification('-interactive')
The deleteAuditNotificationMonitorByName command deletes the audit notification monitor that the user specifies with the unique name.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Return value
The command returns a value of true if the system successfully deletes the audit notification monitor from the configuration.
Batch mode example usage
AdminTask.deleteAuditNotificationMonitor('-monitorName mymonitor')
AdminTask.deleteAuditNotificationMonitor(['-monitorName', 'mymonitor'])
Interactive mode example usage
AdminTask.deleteAuditNotificationMonitor('-interactive')
The deleteAuditNotificationMonitorByRef command deletes the audit notification monitor that the user specifies with the reference ID.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Return value
The command returns a value of true if the system successfully deletes the audit notification monitor of interest.
Batch mode example usage
AdminTask.deleteAuditNotificationMonitor('-monitorRef AuditNotificationMonitor_1184695615171')
AdminTask.deleteAuditNotificationMonitor(['-monitorRef', 'AuditNotificationMonitor_1184695615171'])
Interactive mode example usage
AdminTask.deleteAuditNotificationMonitor('-interactive')
The getAuditNotification command retrieves the attributes for an audit notification object of interest.
The user must have the monitor administrative role to run this command.
Target object
None.
Required parameters
Return value
{{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}}
Batch mode example usage
AdminTask.getAuditNotification('-notificationRef WSNotification_1184690835390')
AdminTask.getAuditNotification(['-notificationRef', 'WSNotification_1184690835390'])
Interactive mode example usage
AdminTask.getAuditNotification('-interactive')
The getAuditNotificationMonitor command retrieves the attributes that the system associates with the audit notification monitor of interest.
The user must have the monitor administrative role to run this command.
Target object
None.
Required parameters
Return value
{{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)}}
Batch mode example usage
AdminTask.getAuditNotificationMonitor('-monitorRef AuditNotificationMonitor_1184695615171')
AdminTask.getAuditNotificationMonitor(['-monitorRef', 'AuditNotificationMonitor_1184695615171'])
Interactive mode example usage
AdminTask.getAuditNotificationMonitor('-interactive')
The getEmailList command retrieves the email distribution list for the audit notification object. If the notification monitor is not configured, the audit notification object is not active and the command returns a null value.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
admin@mycompany.com(smtp-server.mycompany.com)
Batch mode example usage
AdminTask.getEmailList()
AdminTask.getEmailList()
Interactive mode example usage
AdminTask.getEmailList('-interactive')
The getSendEmail command displays whether or not the audit notification object sends an email if the audit subsystem fails. If the notification monitor is not configured, the audit notification object is not active and the command returns a null value.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
The command returns a value of true if the system is configured to send an email to the distribution list.
Batch mode example usage
AdminTask.getSendEmail()
AdminTask.getSendEmail()
Interactive mode example usage
AdminTask.getSendEmail('-interactive')
The getAuditNotificationRef command retrieves the reference ID for the active audit notification object. If the notification monitor is not configured, the audit notification object is not active and the command returns a null value.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
WSNotification_1184690835390
Batch mode example usage
AdminTask.getAuditNotificationRef()
AdminTask.getAuditNotificationRef()
Interactive mode example usage
AdminTask.getAuditNotificationRef('-interactive')
The getAuditNotificationName command retrieves the unique name for the active audit notification object. If the notification monitor is not configured, the audit notification object is not active and the command returns a null value.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
mynotification
Batch mode example usage
AdminTask.getAuditNotificationName()
AdminTask.getAuditNotificationName()
Interactive mode example usage
AdminTask.getAuditNotificationName('-interactive')
The isSendEmailEnabled command determines if the system is configured to send an email if the security auditing subsystem fails.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
The command returns a value of true if email notification is enabled.
Batch mode example usage
AdminTask.isSendEmailEnabled()
AdminTask.isSendEmailEnabled()
Interactive mode example usage
AdminTask.isSendEmailEnabled('-interactive')
The isAuditNotificationEnabled command determines whether the security auditing system notifications are enabled.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
The command returns a value of true if security auditing system notifications are enabled.
Batch mode example usage
AdminTask.isAuditNotificationEnabled()
AdminTask.isAuditNotificationEnabled()
Interactive mode example usage
AdminTask.isAuditNotificationEnabled()
The listAuditNotifications command retrieves the attributes for each audit notification object that is configured in the audit.xml file.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
{{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}}
Batch mode example usage
AdminTask.listAuditNotifications()
AdminTask.listAuditNotifications()
Interactive mode example usage
AdminTask.listAuditNotifications('-interactive')
The listAuditNotificationMonitors command lists the attributes for the audit notification monitor that is configured in the audit.xml file.
The user must have the monitor administrative role to run this command.
Target object
None.
Return value
{{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}}
Batch mode example usage
AdminTask.listAuditNotificationMonitors()
AdminTask.listAuditNotificationMonitors()
Interactive mode example usage
AdminTask.listAuditNotificationMonitors('-interactive'b)
The modifyAuditNotification command edits the audit notification object in the audit.xml configuration file.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Optional parameters
Return value
The command returns a value of true if the system successfully updates the security auditing system configuration.
Batch mode example usage
AdminTask.modifyAuditNotification('-notificationRef WSNotification_1184690835390 -logToSystemOut false -sendEmail true -emailList admin@mycompany.com(smtp-server.mycompany.com) -emailFormat TEXT')
AdminTask.modifyAuditNotification(['-notificationRef', 'WSNotification_1184690835390', '-logToSystemOut', 'false', '-sendEmail', 'true', '-emailList', 'admin@mycompany.com(smtp-server.mycompany.com)', '-emailFormat', 'TEXT'])
Interactive mode example usage
AdminTask.modifyAuditNotification('-interactive')
The modifyAuditNotificationMonitor command edits the audit notification monitor configuration for the security auditing system.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Optional parameters
Return value
The command returns a value of true if the system successfully updates the audit notification monitor configuration.
Batch mode example usage
AdminTask.modifyAuditNotificationMonitor('-monitorRef AuditNotificationMonitor_1184695615171 -notificationRef WSNotification_1184690835390 -enable true')
AdminTask.modifyAuditNotificationMonitor(['-monitorRef', 'AuditNotificationMonitor_1184695615171', '-notificationRef', 'WSNotification_1184690835390', '-enable', 'true'])
Interactive mode example usage
AdminTask.modifyAuditNotificationMonitor('-interactive')
The setEmailList command specifies the distribution list to send email notifications to if the security auditing subsystem fails.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Return value
The command returns a value of true if the system successfully sets the email notification list for the notification object.
Batch mode example usage
AdminTask.setEmailList('[-emailList admin@mycompany.com(smtp-server.mycompany.com)]')
AdminTask.setEmailList(['-emailList', 'admin@mycompany.com(smtp-server.mycompany.com)'])
Interactive mode example usage
AdminTask.setEmailList('-interactive')
The setSendEmail command enables or disables email notifications for the security auditing system.
The user must have the auditor administrative role to run this command.
Target object
None.
Required parameters
Return value
The command returns a value of true if the system successfully modifies the configuration.
Batch mode example usage
AdminTask.setSendEmail('-enable true')
AdminTask.setSendEmail(['-enable', 'true'])
Interactive mode example usage
AdminTask.setSendEmail('-interactive')