Managing the KSYS notifications
After you add the contact details to the KSYS configuration for the first time, you can modify it later depending on the changing requirements.
ksysmgr modify notify oldcontact=old_username newcontact=new_username
ksysmgr modify notify oldcontact=old_email_address newcontact=new_email_addressFor
example, to change the user name of John to Dave, and to change the email address, enter the
following
command:ksysmgr modify notify oldcontact=John newcontact=Dave
ksysmgr modify notify oldcontact=john@gmail.com newcontact=dave@gmail.com
To delete all the contact information for a specific user, use the following command:
ksysmgt delete notify user=usernameFor example,
ksysmgt delete notify user=JohnTo query all the registered contact details,
use the following command: ksysmgr query notify contactThe output might be
similar to the following
example:User: Mark Smith
Contact: mike@mike.com
User: joe
Contact: joe@gmail.comRunning scripts for specific events
You can create scripts for specific events. When an event occurs, you can enable the script to be run as part of the event. By using scripts, you not only get notified for a specific event, but you can also collect details about the event, take corrective actions, and handle the processes after the event completion. For more information about scripts, you can refer to the event script samples that are located in the /opt/IBM/ksys/samples/event_handler/event_script_template directory.
You must specify the full path of the script to add a script for notification configuration. When the event occurs, the KSYS subsystem validates the existence and the authorization of the scripts.
ksysmgr add notify script=script_file_path_name events=event_nameFor
example,ksysmgr add notify script=/tmp/script.sh events=HMC_DOWNksysmgr modify notify oldscript=old_script_file_path_name newscript=new_script_file_path_nameFor
example,ksysmgr modify notify oldscript=/tmp/script.sh newscript=/tmp/newscript.shksysmgr delete notify script=script_file_path_nameFor
example,ksysmgr delete notify script=/tmp/script.shksysmgr query notify scriptNotification message
HMC_DOWN event has occurred. Details are as follows:
Event: HMC_DOWN
Type: Critical Error Event
Time: Tue Jul 19 00:35:32 CDT 2016
Entity Affected: HMC
Resource Affected: vmhmc1
Description: 0000-132 Error - HMC x.x.x.x is down.
Suggestion: Please try to restart.