Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Have VCS to send email to admin upon fault

Created: 24 Aug 2012 • Updated: 28 Aug 2012 | 9 comments
This issue has been solved. See solution.

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

 

 

Comments 9 CommentsJump to latest comment

mikebounds's picture

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.pdf) and "VCS event notification" section if want to know more about how this works.
 
Mike

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

mkruer's picture

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's picture

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

 

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

SOLUTION
mikebounds's picture

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

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

mkruer's picture

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's picture

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

 

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

mkruer's picture

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's picture

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

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

mkruer's picture

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