Notifications and Remote Management
To facilitate easier management, three features are implemented:
- email notifications: the processes send both alerts and periodic summaries
- SNMP traps: the processes send SNMP messages to SNMP management software (HP OpenView, Nagios, or any other SNMP-compatible software package). The alerts are the same as email notification alerts.
- SNMP subagent: the processes can act as an AgentX subagent to an already installed SNMP agent supporting the AgentX protocol (for example, the open source net-snmp agent) and thus provide current information to the SNMP management software, showing both current status and receiving stop/pause/resume requests (not available on Windows).
The MIB file for the SNMP management software describing structure of the SNMP information provided is included in the Dbvisit Replicate distribution.
General SMTP configuration
The MAILCFG_* variables configure usual SMTP protocol settings: SMTP server hostname, port, use of SSL, username/password if required by the SMTP server, and the From: address.
If your SMTP server does not use authentication, then variables MAILCFG_AUTH_USER and MAILCFG_AUTH_PASSWD must not be set on global and on local level (*., MINE., APPLY. ...)
Email recipients are configured by:General mail configuration
Variable | Description |
---|---|
NOTIFY_SUCCESS_EMAIL | Receive heartbeat / progress emails |
NOTIFY_ALERT_EMAIL | Receive all alert emails |
NOTIFY_ALL_EMAIL | Receive all email |
Specify OFF to disable a particular group. Only if all relevant email lists (=ALL+ALERT or ALL+SUCCESS) are OFF, then no email is sent. | |
_NOTIFY_ENABLE | Set to NO to disable emailing and snmp completely |
Notifications settings
To see all Notification settings:
dbvrep> show notify
To see all mail configurations settings:
dbvrep> show mailcfg
To see which notifications are enabled/disabled on Mine:
dbvrep> notify show mine
To see which notifications are enabled/disabled on Apply:
dbvrep> notify show apply
General SNMP trap configuration
Only two variables are required: SNMP management software server name/IP (optionally specifying non-default port) and the community string ("password").
General SNMP subagent configuration
Only one variable is used: SNMP_INDEX. The data about the processes are presented as tables (one for MINE processes, one for fetchers, one for appliers), with one row for each process running on the machine. The row numbers in the tables must be static and set by the user using the SNMP_INDEX variable. (Were the numbers dynamic, the management software would mix up progress graphs/history among multiple processes.) For the customary one-replication configuration, the recommended setting is SNMP_INDEX=1.
A value of 0 disables this feature.
SNMP Dbvisit-MIB DEFINITIONS
Please see the supplied Dbvisit-MIB-SNMP.txt file for the MIB definitions for SNMP definitions.
Notification configuration
The "all-ok" emails (heartbeat and list progress) are configured by specifying list of times in 24-hour format, when the emails should be sent, e.g.:
NOTIFY_DAILY_LIST_PROGRESS_TIME24 = 0700 NOTIFY_SEND_HEARTBEAT_TIME24 = 0800:1300:1400
The checking for alerts occur every interval specified by NOTIFY_INTERVAL_BETWEEN_CHECK (e.g. 5m, or 1h25m30s) This is also the interval when the process checks whether an "all-ok" email should be sent. Thus those might lag a bit behind the specified times.. If an error condition persists for NOTIFY_EXCEEDED_CYCLE_NUM checks in a row, the email/SNMP trap is sent. Set this to more than 1 to "smooth out" short-time bursts, temporary network issues etc.
The alerts check:
- PLOG sequence difference (lag) between APPLY and MINE
- redolog sequence difference between MINE and FETCHER
- processes unreachable by their peers (this alert is not fired if all processes are down, as there is then no process to run the check)
- SCN difference between APPLY and MINE
- number of conflicts at APPLY (for each table)
- % difference of applied changes (for each table). The very percentages from LIST PROGRESS are checked.
Testing Notification
To manually send a test notification use the following command:
dbvrep> notify send heartbeat
dbvrep> notify send daily_progress
dbvrep> notify send snmp_trap
See "help notify" for more information.
Using smtp mail server with SSL connection security
Gmail can be used as the smtp mail server but it requires an SSL connection security and a username and password to establish a connection to send an email. The following is an example of the settings required to make this work:
*.MAILCFG_SMTP_SERVER = smtp.gmail.com *.MAILCFG_AUTH_USER = emaillogin@yourcompany.com *.MAILCFG_PORT = 465 *.NOTIFY_ALL_EMAIL = dba@yourcompany.com *.MAILCFG_FROM = replicate@dbvisit.com *.NOTIFY_SUCCESS_EMAIL = dba@yourcompany.com *.MAILCFG_AUTH_PASSWD = plaintextpassword *.NOTIFY_ALERT_EMAIL = OFF *.MAILCFG_USE_SSL = YES
Gmail example
(MAILCFG_SMTP_SERVER) - Specify mail (SMTP) server hostname: smtp.gmail.com (MAILCFG_USE_SSL) - Use SSL to connect to the mail server? (Yes/No) yes (MAILCFG_PORT) - Specify port for SMTP server (usually 25; for SSL, usually 465): 465 (MAILCFG_AUTH_USER) - If SMTP server requires username and password, specify the username. Specify OFF if no login is required: YOUR GMAIL USERNAME (MAILCFG_AUTH_PASSWD) - Please enter password for the SMTP user. Specify OFF if no login is required: YOUR GMAIL PASSWORD (MAILCFG_FROM) - Specify the email address to be used as 'From:' address: YOUR GMAIL EMAIL
Generic Example
Configuring email notification after the configuration of Dbvisit Replicate is a simple process and involves setting up few variables. "show notify" and "show mailcfg" will list out these variables. The first step involves setting up MAILCFG variables where you have to set following variables.
MAILCFG_SMTP_SERVER = localhost MAILCFG_AUTH_USER = OFF MAILCFG_PORT = 25 MAILCFG_FROM = nobody@example.com MAILCFG_AUTH_PASSWD = OFF MAILCFG_USE_SSL = NO
Variables are listed with their default values.
You can use "set variable" command to assign value to the variables.
Example:
dbvrep>set MAILCFG_SMTP_SERVER=smtp.xyz.com
In step 2, you have to specify the email address you want the Dbvisit Replicate to send notifications to. You have to assign a valid email address to any or all of the following variables.
NOTIFY_ALERT_EMAIL = OFF
NOTIFY_SUCCESS_EMAIL = OFF
NOTIFY_ALL_EMAIL = OFF
You can use MINE or APPLY as prefix if you want to receive only process specific alerts. By default, It takes value for both processes.
=> To receive only alert messages.
dbvrep>set NOTIFY_ALERT_EMAIL = email@domain.com
=> To receive only success messages.
dbvrep>set NOTIFY_SUCCESS_EMAIL = email@domain.com
=> To receive all messages.
dbvrep>set NOTIFY_ALL_EMAIL = email@domain.com
Use comma (,) to specify multiple email addresses.
Changes will only take effect once MINE, FETCHER (if used) and APPLY processes are restarted. It is always good practice to restart the processes after these changes. *Please check list obsolete and list transactions before shutting down.
NOTIFY SHOW
notify show process/all
Notify show command displays whether notifications are enabled/disabled for mine/apply/fetcher or all.
Example:
dbvrep> notify show MINE Notify settings for process MINE [HANG] Self-hang detection: YES [HEAR] Heartbeat: YES [PEER] Peer down: YES [ERRE] Error email: YES
NOTIFY SET
notify set process code yes|no
Notify set command is used to temporarily disable/re-enable notifications. These are the types of notifications:
Notify settings for process MINE
- [HANG] Self-hang detection: YES
- [HEAR] Heartbeat: YES
- [PEER] Peer down: YES
- [ERRE] Error email: YES
Notify settings for process APPLY
- [HANG] Self-hang detection: YES
- [SDIF] Sequence/SCN difference: YES
- [PDIF] Progress difference: YES
- [CONF] Conflict: YES
- [DAIL] Daily progress: YES
- [HEAR] Heartbeat: YES
- [PEER] Peer down: YES
- [DDLN] DDL notify: YES
- [ERRE] Error email: YES
You can enable/disable any or all of above notifications.
Example:
dbvrep> notify set mine all no Setting all set to NO dbvrep> notify show MINE Notify settings for process MINE [HANG] Self-hang detection: NO [HEAR] Heartbeat: NO [PEER] Peer down: NO [ERRE] Error email: NO dbvrep> notify set mine HANG yes Setting HANG set to YES dbvrep> notify show MINE Notify settings for process MINE [HANG] Self-hang detection: YES [HEAR] Heartbeat: NO [PEER] Peer down: NO [ERRE] Error email: NO
For issues with notifications, please see Resolving notification issues
For more information please also see our knowledge base: http://support.dbvisit.com/entries/24748863?challenge=zw8yd1pswlof0of