Date: 4/9/03
Document description: EMS: How to add multiple email addresses for event notification
Document id: KBRC00012166

EMS: How to add multiple email addresses for event notification DocId: KBRC00012166   Updated: 8/6/04 1:32:00 PM 

PROBLEM
How can an email address be added to allow for someone in addition to the 'root' user to be notified in the case of an event? 
RESOLUTION
Either add an email addresses one at a time, or add a single mail alias (which will allow for additions to be made outside of EMS). If you choose to use a single mail alias, prior to adding a mail alias to EMS event notification, add the mail alias. 

[optional] Add a mail alias. 
Edit /etc/mail/aliases

After “# Local aliases” add appropriate alias, for example: 
emsemail : root,jane.smith@company.com,john.doe@company.com

Run " newaliases"
If "root " is one of the users, then you will also need to insure that the "MeToo " macro in /etc/mail/sendmail.cf is uncommented and subsequently  stop and start sendmail (i.e. with " /sbin/init.d/sendmail stop" and then " /sbin/init.d/sendmail start")

Add mail address to Event Monitoring request with monconfig. 

Either enter the mail address, or the new mail alias, as the email address at appropriate prompt. See example below.

To list/show the email notifications, run '/etc/opt/resmon/lbin/moncheck'

To test: 
1) Edit configuration file /var/stm/config/tools/monitor/default_disk_em.clcfg to add a MAJOR_WARNING entry for purposes of the test. 
Above:
EQ:103:INFORMATION:TRUE:NOT_USED:ANY:1:NONE:NO_OP:NO_OP:NONE 
Add: 
EQ:103:MAJOR_WARNING:TRUE:NOT_USED:ANY:1:NONE:NO_OP:NO_OP:NONE

IMPORTANT: EMS uses the first event it finds in the file. So add the MAJOR_WARNING entry before the existing INFORMATION entry.

2) Enable EMS using monconfig: 

# echo "e;q" | /etc/opt/resmon/lbin/monconfig >/dev/null 2>&1

NOTE: this echo to monconfig will take up to a few minutes, so be patient. 
3) Send test event: 
# /opt/resmon/bin/send_test_event -v disk_em

4) After finished testing, DON’T FORGET to:

Delete the line previously added to /var/stm/config/tools/monitor/default_disk_em.clcfg

Enable EMS again (i.e. repeat step #2).

--------------------------------------------------------------------------------
Example (user input in red) 

# /etc/opt/resmon/lbin/monconfig 

==================================================================== ======== 
=================== Event Monitoring Service =================== 
=================== Monitoring Request Manager =================== 
==================================================================== ======== 

EVENT MONITORING IS CURRENTLY ENABLED. 
EMS Version : A.03.20.01 
STM Version : A.31.00 

==================================================================== ======== 
============== Monitoring Request Manager Main Menu ============== 
==================================================================== ======== 

Note: Monitoring requests let you specify the events for monitors 
to report and the notification methods to use. 

Select: 
(S)how monitoring requests configured via monconfig 
(C)heck detailed monitoring status 
(L)ist descriptions of available monitors 
(A)dd a monitoring request 
(D)elete a monitoring request 
(M)odify an existing monitoring request 
(E)nable Monitoring 
(K)ill (disable) monitoring 
(H)elp 
(Q)uit 
Enter selection: [s] a 

==================================================================== ======== 
===================== Add Monitoring Request ===================== 
==================================================================== ======== 

Start of edit configuration: 

A monitoring request consists of: 
- A list of monitors to which it applies 
- A severity range (A relational expression and a severity. For example, 
< "MAJOR WARNING" means events with severity "INFORMATION" and 
"MINOR WARNING") 
- A notification mechanism. 
Please answer the following questions to specify a monitoring request. 

Monitors to which this configuration can apply: 
1) /StorageAreaNetwork/events/SAN_Monitor 
2) /storage/events/disk_arrays/AutoRAID 
3) /storage/events/disks/default 
4) /adapters/events/FC_adapter 
5) /adapters/events/TL_adapter 
6) /system/events/core_hw 
7) /connectivity/events/hubs/FC_hub 
8) /connectivity/events/multiplexors/FC_SCSI_mux 
9) /connectivity/events/switches/FC_switch 
10) /system/events/memory 
11) /storage/events/enclosures/ses_enclosure 
12) /storage/events/tapes/SCSI_tape 
13) /system/events/ups 
14) /storage/events/disk_arrays/FC60 
15) /storage/events/disk_arrays/FW_SCSI 
16) /storage/events/disk_arrays/High_Availability 
17) /system/events/cpu/lpmc 
18) /adapters/events/scsi123_em 
19) /system/events/system_status 
Enter monitor numbers separated by commas 
{or (A)ll monitors, (Q)uit, (H)elp} [a] a 

Criteria Thresholds: 
1) INFORMATION 2) MINOR WARNING 3) MAJOR WARNING 
4) SERIOUS 5) CRITICAL 
Enter selection {or (Q)uit,(H)elp} [4] 3 

Criteria Operator: 
1) < 2) <= 3) > 4) >= 5) = 6) != 
Enter selection {or (Q)uit,(H)elp} [4] 3 

Notification Method: 
1) UDP 2) TCP 3) SNMP 4) TEXTLOG 
5) SYSLOG 6) EMAIL 7) CONSOLE 
Enter selection {or (Q)uit,(H)elp} [6] 6 

Enter email address: [root] emsemail 

User Comment: 
(C)lear (A)dd 
Enter selection {or (Q)uit,(H)elp} [c] c 

Client Configuration File: 
(C)lear 
Use Clear to use the default file. 
Enter selection {or (Q)uit,(H)elp} [c] c 

New entry: 
Send events generated by all monitors 
with severity > MAJOR WARNING to EMAIL emsemail 

Are you sure you want to keep these changes? 
{(Y)es,(N)o,(H)elp} [n] y 

Changes will take effect when the diagmond(1M) daemon discovers that 
monitoring requests have been modified. Use the 'c' command to wait for
changes to take effect.