The Control Panel's Notification menu lets you configure the notifications for your CP. You can select the events about which to notify your users. To configure notifications for your cloud you need to:
- Enable notifications for your cloud - the configured subscriptions will send notifications only if you enable this option.
- Configure gateways - select what type of notifications you want to send: SMTP/SENDMAIL emails or internal notifications in CP.
- Add notification templates - notification templates determine the text of the messages your users will receive.
- Add custom events - you can add custom events to send notifications when you require.
- Create recipients lists - recipients lists include users whom you want to address certain notifications.
- Set up subscriptions - a subscription ties all your configurations together. After you set up subscriptions your users will start receiving notifications.
After these configurations, you can:
- Check whether your notification have been delivered - you can check whether the sent notifications have been delivered successfully.
- View internal notifications in CP - you can view internal notification in your Control Panel.
You need to have messaging permissions enabled to configure notification for the cloud. For more information, refer to List of all OnApp Permissions.
You can manage the following elements of the notifications system:
- Gateways define what type of notifications will be send: SMTP/SENDMAIL emails or internal notifications in CP.
- Notification templates determine the text of the messages your users will receive.
- External recipients are the contacts not registered in OnApp whom notification can be sent.
- Recipients lists include users whom certain notifications will be addressed.
- Subscriptions tie all your configurations together. After you set up subscriptions your users will start receiving notifications.
Enable Notifications for Your Cloud
Firstly, you need to enable notifications for your cloud. You can do this at the Configuration section. All notification sections will be available in the Control Panel if notifications are disabled for the cloud, but no notifications will be sent.
To enable notifications for your cloud:
- Go to Control Panel > Admin > Notifications > Configuration
- Move the Enable notifications slider to enable notifications. By default, this option is disabled.
- Specify the number of unread notifications to show. It is set to 5 by default.
- Specify the notification subject prefix. By default, this value is 'OnApp.'
- Click the Save Configuration button. The transaction will be scheduled to enable notifications for your cloud.
View Internal Notifications in CP
Your Notifications are displayed as a bell near your Profile icon and contain the internal notifications received by your Control Panel. These notifications are configured at Control Panel > Admin > Notifications. The notification count includes only unread notifications. You can configure the amount of unread notifications at Control Panel > Admin > Notifications > Configuration. Each of the notifications is displayed with the following details:
- Topic - the event about which the notification is sent
- Message - the message of the notification. The message of an unread notification is displayed in bold. Click the message to view its full text. The notification will include the text generated by the alert and the text from the notification template.
- Date - the time when the notification was delivered
If required, you can switch off notifications for your cloud. In this case all your configurations will be preserved, but notifications will not be sent to users. You can switch notifications back on at any time.
To enable/disable notifications for your cloud:
- Go to Control Panel > Admin > Notifications > Configuration.
- Move the Enable notifications slider to enable/disable notifications. By default, this option is disabled.
- Click the Save Configuration button. The transaction will be scheduled to disable notifications for your cloud.
Delete Notification Data
You can delete notification data, including events, deliveries and notifications for a particular period of time. To delete all notification data, you need to run the following command from the onapp user:
cd /onapp/interface RAILS_ENV=production rake messaging:clean_notification_elements[2016-09-20,2016-09-23]
Change the dates in the example above to the ones you require and separate them by comma. The notification data is deleted for the period from the first date up to and including the second date you specify.
If the deletion of notification data fails, you can run the followig command:
cd /onapp/interface RAILS_ENV=production rake messaging:fix_events_data
After running this command, you can repeat the previous step to delete notification data.