You are on page 1of 24

Veritas Cluster Server 6.

0 for UNIX:
Install and Configure
Lesson 10: Configuring Notification
1

Lesson introduction

Lesson 1: High Availability Concepts


Lesson 2: VCS Building Blocks
Lesson 3: Preparing a Site for VCS
Lesson 4: Installing VCS
Lesson 5: VCS Operations
Lesson 6: VCS Configuration Methods
Lesson 7: Preparing Services for VCS
Lesson 8: Online Configuration
Lesson 9: Offline Configuration
Lesson 10: Configuring Notification
Lesson 11: Handling Resource Faults
Lesson 12: Intelligent Monitoring Framework
Lesson 13: Cluster Communications
Lesson 14: Data Protection using SCSI 3-Based Fencing
Lesson 15: Coordination Point Server

Lesson objectives

Topic

Objectives

Notification overview Describe how VCS provides notification.


Configuring
notification

Configure notification using the NotifierMngr


resource.

Using triggers for


notification

Use triggers to provide notification.

Notification overview
After completing this topic, you
will be able to describe how VCS
provides notification.

Notification overview
1. HAD sends a message to the notifier daemon when an

event occurs.

2. The notifier daemon:


a. Formats the event message
b. Sends an SNMP trap or e-mail message (or both) to

designated recipients

HAD
SMTP

SNMP

notifier

HAD

Replicated message queue

Notification service group


The notifier daemon is managed by a NotifierMngr type

resource.

The ClusterService group:


Contains the notifier and csgnic resources
Is configured using the CLI, GUI, or during initial configuration
Is online on one cluster node only

ClusterService
notifier
csgnic

notifier

HAD

HAD

Message severity levels

Resource state
unknown

Service group is
online

Resource has faulted


Warning

Error

Information

Concurrency violation
SevereError
HAD

SMTP

SNMP

notifier

HAD

See the VCS


Administrator's Guide for a
complete list of events.
7

Notifier and log events


engine_A.log

2011/07/06 15:19:37 VCS ERROR V-16-1-10205


Group websg is faulted on system s1

From root@s1.ourco.com Thu Jul 6 15:19:53 2011


Date: Thu, 06 Jul 2011 15:19:37 -0700
From: Notifier
Subject: VCS Error, Service group has faulted
Event Time: Thu Jul

6 15:19:37 2011

Entity Name: websg


Entity Type: Service Group
Entity Subtype: Failover
Entity State: Service group has faulted
Traps Origin: Veritas_Cluster_Server
System Name: S1
Entities Container Name: webclus
Entities Container Type: VCS

Notifier
e-mail
Information

Log file
INFO
NOTICE

Warning

WARNING

Error

ERROR

SevereError

CRITICAL

Viewing logs
Engine log location: /var/VRTSvcs/log/engine_A.log
View logs using the GUI or the hamsg command:
hamsg engine_A

Agent logs kept in /var/VRTSvcs/log


2009/05/20 16:00:09 VCS NOTICE V-16-1-11022
VCS engine (had) started
2009/05/20 16:01:27 VCS INFO V-16-1-10196
Cluster logger started
2009/05/20 16:01:31 VCS ERROR V-16-1-11309
Configuration must be ReadWrite

Unique Message
Identifier (UMI)

Most Recent

Symantec Operations Readiness Tools (SORT)

Configuring
notification
After completing this topic, you
will be able to configuring
notification using the NotifierMngr
resource.

10

Configuration methods

CLI
Use hares
command
Add resource
of
NotifierMngr
type

VOM
Veritas
Operations
Manager
go.symantec.c
om/
vom

Installer
Respond to
prompts
during
cluster
configuration

Set attributes

11

Notification configuration
Add a NotifierMngr resource to ClusterService group.
Modify the SmtpServer and SmtpRecipients attributes.
Optionally, modify ResourceOwner and GroupOwner.
Modify SnmpConsoles, if using SNMP notification.
Configure the SNMP console to receive VCS traps.

If SMTP
notification
is required
If SNMP
notification
is required

Modify any other optional attributes, as appropriate.

Add a NotifierMngr resource to


only one service group,
ClusterService.

12

The NotifierMngr resource type


Resource
definition

Value

Service group name

ClusterService

Resource name

notifier

Either SnmpConsoles
or SmtpXxx attributes
must be specified.

Resource type

NotifierMngr

Both can be specified.

Required attributes
SmtpServer

mailserver.company.co
m

SmtpRecipie
nts

gene@company.com =
Error

*Required attributes:

Restart resource if you


change attributes.

main.cf

NotifierMngr notifier (
SmtpServer = "mailserver.company.com"
SmtpRecipients = { "gene@company.com" = Error }
)

13

The ResourceOwner attribute


Provides e-mail notification for individual resources
Writes an entry in the log file
Requires notifier to be configured

engine_A.log

2011/12/03 11:23:48 VCS INFO V-16-1-10304


Resource file1 (Owner=kim, Group=websg) is
offline on s1

ResourceStateUnknow
n
Notification events

ResourceRestarting
By
Agent

ResourceMonitorTimeo ResourceWentOnlin
ut
eByItself
CLI

ResourceNotGoingOffli ResourceFaulted
ne
hares modify resource ResourceOwner kim
14

The GroupOwner attribute

Provides e-mail notification for individual service groups


Requires notifier to be configured

E-mail message

Notification events

CLI

From: Notifier
Subject: VCS Information, Service group is
online
Event Time: Wed Aug 23 18:23:09 2011
. . .
Entities Owner: chris

Concurrency
violation

Restarting

Online

Faulted and cannot


failover

Offline

Autodisabled

Switching

hagrp modify group GroupOwner chris

15

Additional recipients for notifications


Cluster attributes:
ResourceRecipients
TypeRecipients
GroupRecipients

main.cf snippet

SystemRecipients
cluster
ClusterRecipients

Values:
Fully-qualified )
e-mail addresses

vcs_cluster (
UserNames = { admin = ************ }
Administrators = { admin }
ClusterRecipients= { " janedoe@gmail.com" Error }

Severity:
SevereError, Error, Warning,
Information

16

Configuring the SNMP console


Load the MIB for VCS traps into the SNMP management
console.
For HP OpenView Network Node Manager, merge
events:
xnmevents -merge vcs_trapd

VCS SNMP configuration files:


/etc/VRTSvcs/snmp/vcs.mib
/etc/VRTSvcs/snmp/vcs_trapd

17

Using triggers for


notification
After completing this topic, you
will be able to use triggers to
provide notification.

18

Using triggers
Triggers are:

Resource keys

Scripts run by VCS when defined events occur


An alternative method of notification

RESFAULT

Useful for customizing VCS behavior in response to events

RESNOTOFF

The TriggersEnabled attribute:


Applies to resources and service groups

RESSTATECHA
NGE

Can be used to enable a resource trigger


for all resources in a service group

New

Can be localized per system

RESRESTART

RESADMINWAI
T

Service group keys


PREONLIN
E,
POSTONLI
NE,
POSTOFFLI
NE,
VIOLATION
,

19

Location of trigger scripts


Specified in TriggerPath attribute:
Service group trigger path:

$VCS_HOME

/opt/VRTSvcs

$VCS_HOME/value_of_TriggerPath/trigger_name/
Example for preonline:
TriggerPath = "bin/test/websg"
Path to trigger: $VCS_HOME/bin/test/websg/preonline/

Resource trigger path:


$VCS_HOME/value_of_TriggerPath/res_name/trigger_name/
Example for resfault set for webapache resource:
TriggerPath = "bin/test/websg/"
Path to trigger: $VCS_HOME/bin/test/websg/webapache/resfault/

If undefined, default is $VCS_HOME/bin/triggers

Backward compatible with pre-6.0 versions


20

Sample triggers
Provided for each type of trigger
Can be copied and modified
Are located in /opt/VRTSvcs/bin/sample_triggers
more /opt/VRTSvcs/bin/sample_triggers/resfault
. . .
# Usage:
# resfault <system> <resource> <oldstate>
#
# <system>: is the name of the system where resource faulted.
# <resource>: is the name of the resource that faulted.
# <oldstate>: is the previous state of the resource that
# faulted.
#
# Possible values for oldstate are ONLINE and OFFLINE.
. . .

21

Using multiple scripts for a trigger


Follows the UNIX startup script model:
rc2.d, Tnumservicename
Scripts are executed as in ascending order based on num
Example:
Multiple preonline scripts located in /path_to/preonline/
Scripts are named T01backup, T02setenv, and so on

ls
ls /opt/VRTSvcs/bin/test/websg/preonline/
/opt/VRTSvcs/bin/test/websg/preonline/
T01backup
T01backup
T02setenv
T02setenv
T03online
T03online

22

Lesson summary
Key points
You can choose from a variety of notification methods.
Customize the notification facilities to meet your specific
requirements.

Reference materials
Veritas Cluster Server Bundled Agents Reference Guide
Veritas Cluster Server Users Guide
Symantec Operations Readiness Tools

23

End of Presentation

24

You might also like