Changes

stoney backup: Notification Overview

3,236 bytes added, 14:12, 27 June 2014
/* Graphical */
= Tasks =
== Quota ==
If the used quota in percentage is bigger than the threshold, the appropriate error message is sent (see [[#Who_will_receive_notification_mails | who will be informed]]). The threshold is variable value which is read from the accounts backend (LDAP directory) entry. (The reseller and/or the customer can change the threshold for the given account using the [[stoney_backup:_Self-Service#Modify_backup_account | selfcare web-interface ]] (not implemented yet).) The script [[stoney_backup:_Service_Software#writeAccountSize.pl | writeAccountSize.pl]] (see [[#Source Code]]) is responsible for this task.
== Schedule ==
Each (more or less up-to-date) backup client (developed by [http://www.stepping-stone.ch stepping stone GmbH]]) uploads scheduling information to the server when backing up a computer. According to the scheduling information, the server can check if a backup was executed at the correct time or not. If not an appropriate error message is sent (see [[#Who_will_receive_notification_mails | who will be informed]]). (The reseller and/or customer can define after how many not executed backups he or she wants to be informed using the [[stoney_backup:_Self-Service#Modify_backup_account | selfcare web-interface ]] (not implemented yet).)
The script [[stoney_backup:_Service_Software#scheduleWarning.pl | scheduleWarning.pl]] (see [[#Source Code]]) is responsible for this task.
== Unsuccessful ==
Each (more or less up-to-date) backup client (developed by [http://www.stepping-stone.ch stepping stone GmbH]]) uploads the status of the backup to the server after backing up a computer. According to this status information, the server can check if the last backup was successful. If not an appropriate error message is sent (see [[#Who_will_receive_notification_mails | who will be informed]]). (The reseller and/or customer can define after how many not successful backups he or she wants to be informed using the [[stoney_backup:_Self-Service#Modify_backup_account | selfcare web-interface ]] (not implemented yet).) The script [[stoney_backup:_Service_Software#scheduleWarning.pl | scheduleWarning.pl]] (see [[#Source Code]]) is responsible for this task.
= Who will receive notification mails =
#* Read the attibute <code>mail</code> from the persons bachend (LDAP directory) entry retrieved form the previous serach
#* Send the mail to all (the attribute <code>mail</code> is multivalued, see [[stoney_backup:_OpenLDAP_directory_data_organisation#Backup_Account_Example | OpenLDAP directory data organisation]]) addresses specified in the attribute <code>mail</code>
(The reseller and/or customer can define the values of <code>sstBackupWarningOn</code>, <code>sstNotificationWarningMedium</code> and <code>mail</code> using the [[stoney_backup:_Self-Service#Modify_backup_account | selfcare web-interface ]] (not implemented yet).)
== Reseller ==
# Check if the reseller wants to be informed
#* If the given problem (see [[#Tasks]]) is part of the attribute <code>sstNotificationWarning</code> in the resellers notification-settings backend (LDAP directory) entry, the reseller has to be informed.
#* If the given problem (see [[#Tasks]]) is not part of the attribute <code>sstNotificationWarning</code> in the resellers notification-settings backend (LDAP directory) entry, the reseller does not have to be informed.
# Send the notification mail (reseller version) to all (the attribute <code>sstMailTo</code> is multivalued, see [[stoney_backup:_OpenLDAP_directory_data_organisation#Backup_Reseller_Backup_Notification_Settings | OpenLDAP directory data organisation]]) addresses specified in the attribute <code>sstMailTo</code>
 
== Graphical ==
[[File:Notification-receiver-workflow.png|650px|thumbnail|none|Figure 1: Who will receive notification mails]]
 
= Template distribution =
As the templates should be editable for resellers, they are stored on the server which is running the selfcare web interface. On a default stoney cloud setup this will be the [[Primary-Master-Node | primary master node]]. However as described on the [[stoney_cloud:_Notification_Architecture#File_System | notification architecture page]], the templates need to be present on server where the notification process takes place. As we do not have shared storage resources for the primary master node and VMs, the solution is to regularly (once a day) copy the templates from the primary master node to where they should go (for example the backup server):
/etc/cron.d/distribute-templates
<pre>
# Distribute selfcare templates
00 04 * * * /root/distributeTemplates.sh | logger -t distributeTemplates
</pre>
/root/distributeTemplates.sh
<source lang="bash">
#!/bin/bash
 
readonly backup_server="<Server>"
readonly username="<user>"
readonly identity_file=/root/.ssh/id_rsa_demo
readonly themes_source_directory=/var/www/selfcare/htdocs/themes/
readonly themes_destination_directory=/var/www/selfcare/htdocs/themes/
readonly files_from="/root/distribute_backup_templates.txt";
rsync -vrlt --delete -e "ssh -i ${identity_file}" --files-from ${files_from} ${themes_source_directory} ${username}@${backup_server}:${themes_destination_directory}
</source>
/root/distribute_backup_templates.txt
<pre>
<reseller1-themes-direcory>/templates/services/<servce>/
<reseller2-themes-direcory>/templates/services/<servce>/
</pre>
For example:
<pre>
selfcare.reseller.org/templates/services/backup/
selfcare.another-reseller.org/templates/services/backup/
</pre>
= Source Code =
The source code is located in our GitHub Repository:
SLB, editor, reviewer
3,368
edits