Notifications [message #270121] |
Tue, 25 September 2007 15:25 |
yog_23
Messages: 79 Registered: March 2007
|
Member |
|
|
Anyone have setup custom notification?
Created OS Script as the option for notification. In the script I tried to do an XMAIL.. (lot of other things to do, its only an example).
My question is how do you pass the parameters from the OEM to the unix script executed ?
$HOST, $MESSAGE, $SEVERITY
Here is what I tried
OEM Notification method
/ora/oem00/dba/notify/emailDBA.sh $TARGET_NAME $HOST, $MESSAGE, $SEVERITY
emailDBA.sh
#!/usr/local/bin/perl
my $emsg = "Message : " . $3 . ",SEVERITY : " . $2 ;
my $esubj = "Alert from target:" . $0 . ",HOST:" . $1 ;
system("echo \"${emsg}\" | mailx -s \"${esubj}\" yog\@testserver.com
");
Thank you
Yog
|
|
|