esacli notificationSettings
Use the esacli notificationSettings to set and display information indicating where Electronic Service Agent sends notifications when errors occur.
Synopsis
esacli notificationSettings [[-d [script]]
esacli notificationSettings {-t email} [–e true] {–h hostname} {–p port} [–u userid]
[–w password] {–l email-list}
esacli notificationSettings {-t SNMP} [–e true] {–h hostname} {–p port} {-c SNMP Community}
esacli notificationSettings {-a “email list”} |{-r “email list”}
Description
The esacli notificationSettings command sets and displays information indicating where Electronic Service Agent will send notifications when errors occur. This command will indicate that it completed successfully with a message: This command completed successfully. When the display option is specified, the new settings will be displayed. This command will also display the current settings when run with only the display option or no option is specified.
Options
- -d | --display
- Specifies the setting values are to be displayed.The optional script option generates this command containing all the current values, which can be used for updates. For example, to create an executable script file that you can use to specify notificationSettings values, follow these steps:
- Display the current notificationSettings values by running the following
command:
esacli notificationSettings -d
Tip: You can display the help for the notificationSettings command by running the following command:esacli help notificationSettings
. - Save the output of the notificationSettings command to a file by running the following
command:
esacli notificationSettings -d script > notifications.script
- Edit the notifications.script file to specify the wanted values.
- Change the notifications.script file to an executable script file.
- Run the notifications.script file to set the notificationSettings values on this or other systems.
- Display the current notificationSettings values by running the following
command:
- -t | --type <email|SNMP>
- Specifies which setting values are to be displayed or set. This command must be run two times for setting both the email and SNMP values.
- -e | --enable true or false
- Specifies if notification is enabled or not. The default is true.
- -h | --hostname SMTP server or SNMP network manager host
- Specifies an SMTP server hostname or a SNMP network manager host. A hostname or IP Address can be used.
- -p | --port integer between 1 and 65535
- Specifies an SMTP or SNMP server port.
- -u | --userid user
- Specifies a SMTP user account.
- -w | --password password
- Specifies an SMTP user password. The command prompts for the password if the option but not the value is provided.
- -l | --list email list
- Specifies a comma-separated list of email addresses where notifications will be sent. This list replaces any existing emails.
- -c | --community SNMP Community
- Specifies a SNMP Community where SNMP traps will be sent.
- -a | --add email address(es)
- Specifies additional comma-separated email address(es) where emails will be sent. This option is mutually exclusive of other options.
- -r | --delete email address(es)
- Specifies comma-separated email address(es) to remove from the notification list. This option is mutually exclusive of other options.
Exit status
The following table contains the codes that are returned by this command.0
: The operation completed successfully.1
: IBM® Electronic Service Agent instance is not running.10
: Unsupported option was specified. Option: {option}.13
: An invalid host name was specified for a subcommand host option.14
: A required option was not provided. Option: {option}.18
: An option was set more than once. Option: {option}.19
: An option value was not provided when required. Option: {option}.22
: An invalid email address was specified. Email: {email} for option {option}.31
: An integer value was not provided when required. Option: [name] Value: {value}.32
: An integer value was not in the valid range. Option: {option value} Range: {min-max}.42
: Invalid value {value} specified for the {option} option.45
: Mutually exclusive arguments used together.46
: Can not delete required information.55
: Option {option} is not a valid option when {option} is set to {value}.
Examples
- Lists notification settings
esacli notificationSettings -d Notification Settings Send e-mail notifications Enabled: true SMTP service name: smtp.server.com Port: 25 Userid: smtpu1 Password: ********* Addresses: user1@ibm.com, user2@ibm.com Send SNMP traps Enabled: true Target network manager host: snmp.host.com Community: snmp community Port: 162
- Set SNMP notification settings
esacli notificationSettings -t SNMP –e true –h snmp.gateway.com –p 162 –c “SNMP Community”
- Set email notification settings
esacli notificationSettings --type email --enable true --userid “smtpuser” –password “password” --hostname smtp.gateway.com --port 25 --list “email1@ibm.com,email2@ibm.com”
- Add an email recipient
esacli notificationSettings –add “email1@ibm.com”