cancel
Showing results for 
Search instead for 
Did you mean: 

Have VCS to send email to admin upon fault

mkruer
Level 4

We a looking for a way to have VCS sends off an e-mail alert when the cluster faults to an admin. Looking at some of the previous solutions, I have come across two possible solutions.

First I need to setup the traps to detect the fault.
https://www-secure.symantec.com/connect/forums/vcs-notifierhanotify

Then I need to create a resource to send an alert.
https://www-secure.symantec.com/connect/forums/alerting-feature-applicationha

Is this correct? I might need help with finding the correct trap status for the fault alert.

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

mikebounds
Level 6
Partner Accredited

No this is wrong you need to run:

 

haconf -makerw
hares -add ntfr NotifierMngr ClusterService
hares -modify ntfr SmtpServer = mailhost
hares -modify ntfr SmtpRecipients mike@veritas.com Error
hares -modify ntfr Enabled 1
haconf -dump -makero
If you don't have a ClusterService service group then you would need to create this group first.
 
You should not edit the types.cf file - there is nothing that needs changing in here - the above commands add a resource to main.cf (which looks like resource in my last post), but if you edit main.cf, then you have to bounce VCS for it to take effect.
 
Mike

 

View solution in original post

9 REPLIES 9

mikebounds
Level 6
Partner Accredited

Sort of correct.  There are a number of ways to be sent an email:

  1. Create a resource of type NotifierMngr in the ClusterService service group and configure SmtpServer and SmtpRecipients attributes - example:
    NotifierMngr ntfr (
      SmtpServer = mailhost
      SmtpRecipients = { "mike@veritas.com" = Warning }
      )
    This is the easiest method and you can configure multiple recipients to be sent Error, Warning or Info messages and you don't require any traps.
     
  2. Create a resource of type NotifierMngr in the ClusterService service group and configure SnmpConsoles attribute to send traps to 3rd party event management software and configure event management software to send emails.  You can set up one NotifierMngr resource with both SNMP and SMTP if you want both 1 and 2 to happen.
     
  3. Use 3rd party event management software to trail log files - mainly /var/VRTSvcs/engine_A.log and configure event management software to send emails.
     
If customers have event management software then 2 and 3 are the most common approach.  For more details setting up NotifierMngr see "Setting up VCS event notification by using the Notifier
wizard" in the VCS admin manual https://sort.symantec.com/public/documents/sfha/5.1sp1/solaris/productguides/pdf/vcs_admin_51sp1_sol...) and "VCS event notification" section if want to know more about how this works.
 
Mike

mkruer
Level 4
Option 1 seems like the best option for what is required. The only requirement is to send off an e-mail when the system Faults (fails over) to backup system in the cluster. Run haconf -makerw hares -add NotifierMngr Application App_Cluster hares -modify NotifierMngr User root hares -modify NotifierMngr UseSUDash 0 hares -modify NotifierMngr Enabled 1 haconf -dump -makero in my types.cf I see this. type NotifierMngr ( static int RestartLimit = 3 static str ArgList[] = { EngineListeningPort, MessagesQueue, NotifierListeningPort, NotifierSourceIP, SnmpdTrapPort, SnmpCommunity, SnmpConsoles, SmtpServer, SmtpServerVrfyOff, SmtpServerTimeout, SmtpReturnPath, SmtpFromPath, SmtpRecipients } int EngineListeningPort = 14141 int MessagesQueue = 30 int NotifierListeningPort = 14144 str NotifierSourceIP int SnmpdTrapPort = 162 str SnmpCommunity = public str SnmpConsoles{} str SmtpServer boolean SmtpServerVrfyOff = 0 int SmtpServerTimeout = 10 str SmtpReturnPath str SmtpFromPath str SmtpRecipients{} ) Is this what I need to update? i never touched this file before I assume just edit the file and vcs will sync it up?

mikebounds
Level 6
Partner Accredited

No this is wrong you need to run:

 

haconf -makerw
hares -add ntfr NotifierMngr ClusterService
hares -modify ntfr SmtpServer = mailhost
hares -modify ntfr SmtpRecipients mike@veritas.com Error
hares -modify ntfr Enabled 1
haconf -dump -makero
If you don't have a ClusterService service group then you would need to create this group first.
 
You should not edit the types.cf file - there is nothing that needs changing in here - the above commands add a resource to main.cf (which looks like resource in my last post), but if you edit main.cf, then you have to bounce VCS for it to take effect.
 
Mike

 

mikebounds
Level 6
Partner Accredited

Slight mistate in last post and it is not working when I try to edit my post so 

 

hares -modify ntfr SmtpServer = mailhost

should not have equals so should just be:

 

hares -modify ntfr SmtpServer mailhost

Mike

mkruer
Level 4
two more questions and I think I have it. 1. Can/would you recommend I piggy back off my existing cluster service group? I am running Active/Passive at this time because the appliance doesn't support Active/Active at this time. but when the cluster faults it turns off the notifier for that box. 2. Seen this error: 2012/08/28 17:37:28 VCS WARNING V-16-1-17053 Notifier:Mail server specified does not support SMTP VRFY command. Email user cannot be verified 2012/08/28 17:38:23 VCS WARNING V-16-1-17031 Notifier:activated signal 6

mikebounds
Level 6
Partner Accredited

See answers below:

  1. You should not put the ntfr resource in an existing service group for your application - it should go in its own service group which I recommend you call ClusterService.
     
  2. You need to set SmtpServerVrfyOff to one - see extract from VCS Bundle agents guide

 

SmtpServerVrfyOff 
Set this value to 1 if your mail server does not support
SMTP VRFY command. If you set this value to 1, the
notifier does not send a SMTP VRFY request to the mail
server specified in SmtpServer attribute while sending
emails.
 
hares -modify ntfr SmtpServerVrfyOff 1

 

Mike

 

mkruer
Level 4
One last question. Is there a way to format the message better right now it throws it as one continues string without line returns and flag it as a high importance message Event Time: Tue 28 Aug 2012 06:40:25 PM UTCEntity Name: alerts Entity Type: Resource Entity Subtype: Application Entity State: Resource has faulted Traps Origin: Veritas_Cluster_Server System Name: cmsapp-49-209 Entities Container Name: CMSApp_Cluster Entities Container Type: Service Group Into Event Time: Tue 28 Aug 2012 06:40:25 PM UTC Entity Name: alerts Entity Type: Resource Entity Subtype: Application Entity State: Resource has faulted Traps Origin: Veritas_Cluster_Server System Name: app-49-209 Entities Container Name: CMSApp_Cluster Entities Container Type: Service Group

mikebounds
Level 6
Partner Accredited

The message usually get sent with line breaks, so I would guess these is some issue with your email client as for example if you view some UNIX files in notepad, they display on all one line, but display ok in WordPad.  You could try saving a message in your email client to disk and then try to open with WordPad to see if this is the issue (although this relies on your email client saving the message properly).

There are no options to specify the format of the email.

Mike

mkruer
Level 4

Yeah my e-mail client removed the line returns. Thanks for walkingme thorugh this.