cancel
Showing results for 
Search instead for 
Did you mean: 

Need inputs on configuring alerts to send email upon faults

paragarw
Level 4

I am planning to setup alerts for my application to notify users upon faults.

I understand that i need to configure a NotifierMngr resourse under ClusterService. Please answer following

questions that i have for my understanding.

 

1) Should I configure a new ClusterService group or use the existing one. Currently I have following resources in my existing ClusterService group.

# hagrp -resources ClusterService
webip
csgnic

Wouldnt be a risk if Notifier resource is configured in this group itself?

If i need to configure a seperate a ClusterService, could you please guide me how do i do that using command line.

 

2)How to do give multiple severity to a single recipient. What i mean is that if i want error, severe error and warning alerts to reach my email ID, how do i configure? is below command fine

hares -modify ntfr SmtpRecipients parakh.agarwal@abc.com Error Warning SevereError

3) How to i give multiple email ID with their respective severity labels. Do i need to modify main.cf file and give email IDs semi colon seperated or is it possible through command line as well?

4) Are below commands to add Notifier resource OK?

 haconf -makerw
hares -add ntfr NotifierMngr ClusterService
hares -modify ntfr SmtpServer mailhost
hares -modify ntfr SmtpRecipients parakh.agarwal@abc.com Error Warning
hares -modify ntfr Enabled 1
haconf -dump -makero

5) is there anything that needs to be done apart from this.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified
  1. It goes into the ClusterService group by default. I have not tried to put it in its own group as I don't see the point. How would the risk be different if you have it in its own group as opposed to ClusterService?
  2. You can add multiple entries (easiest via the Java console). Other wise you'll need to use hares -modify but using a keylist / association. See the man page for details. https://sort.symantec.com/public/documents/sfha/6.0/aix/manualpages/html/man/cluster_server/html/man1m/hares.1m.html
  3. Same as point 2. Rather don't edit the main.cf unless you know what you're doing.
  4. Yes, except for this line "hares -modify ntfr SmtpRecipients parakh.agarwal@abc.com Error Warning" Refer to point 2 again.
  5. You might need to make sure your exchange server allows relay or what ever to enable the cluster to send the mail.

View solution in original post

Gaurav_S
Moderator
Moderator
   VIP    Certified

1) Should I configure a new ClusterService group or use the existing one. Currently I have following resources in my existing ClusterService group.

>>> You can use existing service group

2)How to do give multiple severity to a single recipient. What i mean is that if i want error, severe error and warning alerts to reach my email ID, how do i configure? is below command fine

>>> I ususally tried adding 1 of value, never tried adding multiple severities .. you can try adding multiple, if doesn't work, try adding 1 by 1 different severity with same email ID

hares -value ntfr SmtpRecipients mail@example.com    Warning

3) You cannot dynamically change the attributes of the NotifierMngr agent using the hares -modify command. Changes made using this command are only effective after restarting the notifier. Refer below link

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch06s02.htm

4) Looks OK

5) Hope you have taken care of dependencies, Notifier resource will depend on NIC resource

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch06s02s01.htm

 

G

View solution in original post

14 REPLIES 14

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified
  1. It goes into the ClusterService group by default. I have not tried to put it in its own group as I don't see the point. How would the risk be different if you have it in its own group as opposed to ClusterService?
  2. You can add multiple entries (easiest via the Java console). Other wise you'll need to use hares -modify but using a keylist / association. See the man page for details. https://sort.symantec.com/public/documents/sfha/6.0/aix/manualpages/html/man/cluster_server/html/man1m/hares.1m.html
  3. Same as point 2. Rather don't edit the main.cf unless you know what you're doing.
  4. Yes, except for this line "hares -modify ntfr SmtpRecipients parakh.agarwal@abc.com Error Warning" Refer to point 2 again.
  5. You might need to make sure your exchange server allows relay or what ever to enable the cluster to send the mail.

Gaurav_S
Moderator
Moderator
   VIP    Certified

1) Should I configure a new ClusterService group or use the existing one. Currently I have following resources in my existing ClusterService group.

>>> You can use existing service group

2)How to do give multiple severity to a single recipient. What i mean is that if i want error, severe error and warning alerts to reach my email ID, how do i configure? is below command fine

>>> I ususally tried adding 1 of value, never tried adding multiple severities .. you can try adding multiple, if doesn't work, try adding 1 by 1 different severity with same email ID

hares -value ntfr SmtpRecipients mail@example.com    Warning

3) You cannot dynamically change the attributes of the NotifierMngr agent using the hares -modify command. Changes made using this command are only effective after restarting the notifier. Refer below link

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch06s02.htm

4) Looks OK

5) Hope you have taken care of dependencies, Notifier resource will depend on NIC resource

https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_bundled_agents/ch06s02s01.htm

 

G

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified

Just to clarify what Guarav said in point 3. You can use hares -modify to change the values, but you'll need to offline and online the resource before the new values to effect.

 

And he spotted the linking which I missed. Use hares -link parent_res child_res to link the Notifier to your IP.

paragarw
Level 4

Thanks Riaan for your inputs.

paragarw
Level 4

@gaurav,Riaan-Thanks a lot for your feedback.

Could you please give an example on how to use keylist / association using hares for giving multiple values.

paragarw
Level 4

On emore clarification i need. for adding a resourse in an existing service group, do we need to make the resources in that service group offline first. In this case Notifier depends on NIC resource

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified

Look in the note i posted.

paragarw
Level 4

Riaan,

I dont have the access to the java console as i am doing this configuration for my client. 

Please gfve an example to how to use hares -modify  using a keylist / associatio. I went through the MAN page but couldnt understand

paragarw
Level 4

is the below command fine?

hares -modify ntfr SmtpRecipients {parakh.agarwal@abc.com Error} {xyz@abc.com Warning} {parakh.agarwal@abc.com Warning}

Gaurav_S
Moderator
Moderator
   VIP    Certified

Hello,

to add a resource in service group, you don't need to offline resources ... so if you are adding notifier to existing group, you don't need to offline any of resources in that group.

Below post will help to find commands

https://www-secure.symantec.com/connect/forums/have-vcs-send-email-admin-upon-fault

haconf -makerw
hares -add ntfr NotifierMngr ClusterService
hares -modify ntfr SmtpServer mailhost
hares -modify ntfr SmtpRecipients gaurav@veritas.com Error
hares -modify ntfr Enabled 1
haconf -dump -makero

 

I would suggest to add recipients 1 by 1 (never tried adding multiple before) . You can try command you mentioned & see if it errors

Hope this will help

 

G

 

paragarw
Level 4

If I try adding adding one by one, it'll will replace the previous value of the attribute and would not append.

As Riaan said, I need to add in key value pairs,,,but not sure of the syntx.

If some example can be given to add multiple email IDs it'll be great.

 

 

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified

Hi,

 

I tested it, you can just use

hares -modify ntfr SmtpRecipients  "someone@somewhere.com" Error "someone@somewhere.com" Info "someone@somewhere.com" Warning "someone@somewhere.com" SevereError

 

No need for key list/association.

Gaurav_S
Moderator
Moderator
   VIP    Certified

My bad ..  have you tried below ?

# hares -modify ntfr SmtpRecipients -update parakh.agarwal@abc.com Error,Warning

 

G

paragarw
Level 4

Thanks Riaan and Gaurav. It was a great help from you guys. Thanks again.