Notifications
Notification Concepts
This section describes Ops Center Protector's notification features.
For further information, refer to:
About notifications
Ops Center Protector supports Windows System Event Logging, email, SNMP and custom alerting mechanisms.
Whenever a log message is received from a Protector node by the logging process on the Master node, it is checked against a user defined, priority ordered list of notification conditions. Each condition in this list can issue an alert depending on whether the log message meets certain criteria and, if necessary, stop any further notifications lower down the list being triggered.
If your site needs to receive alert notifications based on some other mechanism, then you can create a custom configuration file with instructions for which script/program Ops Center Protector should run, and the arguments to pass to it.
Notifications UI Reference
This section describes the Notifications UI, accessed via the Navigation Sidebar.
For further information, refer to:
Notifications Inventory
This page lists all configured log notifications and enables you to launch the wizard to create and edit them.
Control | Description |
Configure Email Settings | Launches the Email Notifications Settings Wizard to guide you through the process. |
Edit | Enabled when only one Notification is selected. Launches the Notification Wizard to allow the settings to be edited. |
Delete | Enabled when one or more Notifications are selected. Deletes selected Notifications. |
Add | Launches the Notification Wizard to guide you through setting up a Notification. |
Notification(s) | Any number of user defined Notifications can be created. These are
displayed in the table in priority order. The table headings are as follows:
|
Email Notifications Settings Wizard
This wizard provides the options for configuring the email account to send notifications from and to.
Control | Description |
Email Account Provider | Select the account provider. Can be one of:
|
Account | Email address the notifications will be sent from. |
Host Name | Host name for the email account that the notifications will be sent from. |
Port (Optional) | The port number to use to contact the email server. |
Encryption | Select the encryption method to be used. Can be one of:
|
Authentication | Set Authentication either ON, OFF or NTLM. |
Username | Only enabled when Authentication is set to On. Enter the username of the email account being used. |
Password | Only enabled when Authentication is set to On. Enter the password of the email account being used. |
Receiver Email Address | Enter the email address of the account(s) which should be the recipients of the notifications. |
Test Email Settings | Clicking this button will send a test email based on the settings configured. If there are missing entries on the dialog then they will be highlighted. |
Notification Wizard
This wizard provides the options for configuring notifications.
Control | Description |
Name | Enter the name of the log notification. |
Control | Description |
Resource Groups | Select the resource groups to which this log notification will be allocated for the purposes of RBAC. All log notification are automatically allocated to the 'default' resource group. |
Control | Description |
Message | Enter part or all of the log message that will trigger the notification if seen in the logs. |
Category | Select the category of the log entry that will trigger the notification. |
Log ID | If the log entry has a Log ID then it can be specified here. |
Actioned By | Select the Actioned By node name from the log entry that will trigger the notification. |
Log Level | Select the level of the log entry that will trigger the notification. Logs of the specified Level and above will be matched for notification. Refer to Logs Inventory for a description of Log Levels. |
Control | Description |
Storage Serial Number | Enter the Serial Number of the storage device for which the notification will be generated. |
Pool ID | Enter the Pool ID for which the notification will be generated. |
Pool Name | Enter the Pool Name for which the notification will be generated. |
Pool Type | Enter the Pool Type for which the notification will be generated. |
Pool Capacity | Select either of the following two options:
NotePool capacity is only checked for destination pools of active replications. Checking is performed every 10 minutes. |
Control | Description |
Storage Serial Number | Enter the Serial Number of the storage device for which the notification will be generated. |
Journal ID | Enter the Journal ID for which the notification will be generated. |
Policy | Select the Hitachi Block policy name for which the notification will be generated. |
Journal Capacity | Select either of the following two options:
|
Control | Description |
Storage Serial Number | Enter the Serial Number of the storage device for which the notification will be generated. |
Policy | Select the Block UR policy name for which the notification will be generated. |
Source Node | Select the Source Node for which the notification will be generated. |
Destination Node | Select the Destination Node for which the notification will be generated. |
Live UR Network Latency | Enter the Network Latency above which the notification will be generated. A single notification is generated when this threshold is exceeded. The measurement must fall back below this threshold before another notification can be generated. |
Control | Description |
Notification Method |
This defines how the event is notified to users:
NoteAfter changing configuration files, the hub service must be restarted for the changes to take effect. Open a command prompt in the
\bin directory on the Master node type diagdata --stop hub , wait for the service to stop, then type diagdata --start |
Notification Tasks
For further information, refer to:
How to create a notification
Before you begin
If you intend to use email as the notification method, you must configure the email notification settings first. Refer to How to configure email settings for notifications.
Any message that appears in the Logs Inventory can be configured to generate a notification via email, SNMP or the System Event Log. A notification can either be created from the Notifications Inventory (in which case the notification parameters must be supplied by the user) or from the Logs Inventory (in which case the notification parameters are provided automatically from the selected log message:
Procedure
EITHER:
From the Logs Inventory select the log message that you want to be notified about by clicking the selection icon to the left of the message.
Click the Create Log Notification button at the top of the log message table.
The Notification Wizard opens and the parameters are automatically populated based on the selected log message.
OR:
Open the Notifications Inventory by clicking on Notifications in the Navigation Sidebar
Click Create New Item at the top of the notification table.
The Notification Wizard opens so that the parameters describing the log message can be entered.Select the type of message for which a notification will be generated and enter the required parameters:
- Logs - creates a notification based on a generic log message.
- Hitachi Block Device Monitoring - creates a notification based on a specific type of log message associated with Hitachi Block Storage device parameters.
Click Next, then select the Match Behaviour and Notification Method(s)
Click Finish to close the wizard and display the Notifications Inventory.
Create additional conditions by clicking Create New Item at the top of the notification table. Once you have finished creating conditions, it is recommended that you test them (see How to test a notification).
How to configure email settings for notifications
Before you begin
Set up an email account that can be used by Protector to send out notification emails. You will need to know the following details for this account:
- The email Account Provider - e.g. Google, Hotmail, etc.
- Account Name - e.g. dataprotection@company.com
- Host Name - e.g. smtp.company.com
- IP Port Number - e.g. 25 for SMTP
- Encryption Type - TLS, START_TLS or NONE
- Authentication Method - ON, OFF or NTLM
- Username
- Password
To configure the email address for Protector notifications:
Procedure
Click the Notifications option in the Navigation Sidebar to open the Notifications Inventory.
Click the Configure Email Settings button in the top right corner of the page to open the Email Notifications Settings Wizard.
Enter the details for the Sender Account and Receiver Account.
Click Test Email Settings and check that a test email is received from Protector as expected.
Click Finish to close the wizard.
How to test a notification
Before you begin
Create one or more notifications (see How to create a notification).
Use the sendlog command (see Generating log messages with sendlog) to create logs to test that a notification event handler (NEH) functions properly.
When a notification event is triggered, a log message file is created that exists for the duration of the handler execution, after which it is deleted. To view the contents of a log message file, an event handler can be created that dumps the file to standard output. In Windows the following command could be placed in a batch file that acts as the NEH:
more < %1
A log message entry will appear on the Logs Inventory with an attachment containing the above batch command, followed by the XML formatted log message that triggered it.
How to customize alert notifications
If your site must receive alert notifications based on real-time or audit log events, then you can create a custom configuration file with instructions for which script/program Ops Center Protector must run as an event handler, and the arguments to pass to it.
Custom event handlers are added to the Notification Wizard as checkboxes in the Notification Method area.
By default, all Ops Center Protector notification handler configuration files are stored relative to the installation directory:
\db\config\notification
The path to the handler executable must be relative to the \bin directory where Ops Center Protector is installed. The default locations are as follows:
For Windows:
C:\Program Files\Hitachi\Protector\bin
For Linux:
/opt/hitachi/protector/bin
The built-in Email and System Event notification methods are configured by email.cfg and systemlog.cfg and implemented by nehemail.exe and neheventlog.exe, respectively (we recommend using the prefix neh
to identify notification event handlers).
The first parameter passed to the handler is always the path to a log message file (About the notifications log message file). You can also specify your own additional arguments for Windows and Linux that are stored separately, so the same configuration file can be reused on both operating systems.
The custom hander is specified in the format shown in the following example (customeventhandler.cfg):
<cofioxmllist> <!-- text for custom notification method check box --> <item name="HandlerName" argtype="single" > <value type="string" >Custom</value> </item> <!-- default state of custom notification method check box --> <item name="Default" argtype="single" > <value type="bool" >False</value> </item> <!-- handler executable or script name --> <item name="HandlerExecutable" argtype="list" > <item name="WinExecutable" argtype="single" > <value type="string" >nehcustom.exe</value> </item> <item name="UnixExecutable" argtype="single" > <value type="string" >nehcustom</value> </item> </item> <!-- arguments 2, 3, ..., n passed to custom handler --> <item name="WinHandlerArgs" argtype="list" > <item name="HandlerArg" argtype="single" > <value type="string">windows custom arg</value> </item> </item> <item name="UnixHandlerArgs" argtype="list" > <item name="HandlerArg" argtype="single" > <value type="string">unix custom arg</value> </item> </item> </cofioxmllist>
Any text printed to the standard output device by the handler will be included as an attachment to an error log message:
handler name notifier failed. (Attachment 1) *** Attachment count 1 ***"
The exit code of the handler is ignored.
About the notifications log message file
The log message file name is passed as the first parameter to all NEH handlers. It consists of a list of value pairs named:
NotificationDetailFieldName
– a string identifying the parameter
and
NotificationDetailFieldValue
– a value for the parameter
By reading these name-value pairs, the handler is able to analyze the log entry that caused it to be invoked and respond accordingly.
Log message files have a variable number of fields and can contain additional fields, such as a
SessionID
or a
Data Source
. The following table lists common fields.
Immutable |
The log message will not be cleared when erasing the logs. |
SequenceNumber |
All logs have an ascending sequence number. |
MasterDate |
A 32 bit timestamp of when the master received the log message. |
LocalDate |
A 32 bit timestamp of when the log message was sent. |
Source |
The node from which the log message originated. |
Category |
The log message category. |
Level |
A value between 1 and 4 with 1 being Detail and 4 being Error. |
Attachments |
The text of any attachment to the log message. |
Log |
The body of the log message. |
Acked |
Indicates if the log message is acknowledged (0 or 1). |
BuildNumber |
The version of Ops Center Protector on the node that sent the log message. |