17. Alerts, Notifications and Reporting

Configuring alerts and integrating N2WS with 3rd party monitoring and reporting solutions. Using Amazon Simple Notification Service (SNS) and push alerts. The daily summary, raw reporting data, and usage/audit reports.

N2WS manages the backup operations of your EC2 servers. In order to notify you when something is wrong and to integrate with your other cloud operations, N2WS allows sending alerts, notifications and even raw reporting data. So, if you have a network operations center (NOC), are using external monitoring tools or just want an email to be sent to the system administrator whenever a failure occurs, N2WS has an answer for that.


Alerts are notifications about issues in your N2WS backup solution. Whenever a policy fails, in backup or DR, an alert is issued so you will know this policy is not functioning properly. Later, when the policy succeeds, the alert is turned off or deleted, so you will know that the issue is resolved. Alerts can be issued for failures in backup and DR, as well as general system issues like license expiration (for relevant installations).

Pull Alerts

If you wish to integrate N2WS with 3rd party monitoring solutions, N2WS allows API access to pull alerts out of N2WS. A monitoring solution can call this API to check if N2WS has alerts. When calling this API, the caller receives the current alerts in JSON format. The call is an HTTPS call, and if you configured N2WS server to use an alternate port (not 443), you will need to use that port for this API call as well. N2WS requires an authentication key from the caller. Every N2WS user can define such a key to get the relevant alerts. The root user can also get relevant alerts from other managed users, but not from independent users.

Figure 17‑1

To configure an API call:

  1. At the bottom of the main screen, click the Configure API Authentication Key link.

In the popup screen, select Enable or Disable in the API Access list.

To generate an authentication key, click new authentication key (see Figure 17‑1).

To overwrite any key in the Authentication Key box, click new authentication key.

After enabling and setting the key, you can use the API call to get all alerts:


A simple example of Python is:


Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32

Type “help”, “copyright”, “credits” or “license” for more information.

>>> import urllib2, json

>>> server_address = ‘ec2-54-228-126-14.compute-1.amazonaws.com’

>>> server_port = 443

>>> authkey = ‘afb488681baf0132fe190315e87731f883a7dac548c08cf58ba0baddc7006132a


>>> url = ‘https://%s:%d/agentapi/get_cpm_alerts/’ % (server_address, server_port)

>>> url


>>> request = urllib2.Request (url)

>>> request.add_header(“Authorization”, authkey)

>>> handle = urllib2.urlopen (request)

>>> answer = json.load (handle)

>>> handle.close ()

>>> answer

[{u’category’: u’Backup’, u’message_body’: u’Policy win_server (user: root, account: main) – backup that started at 07/20/2013 09:00:00 AM failed. Last successful backup was at 07/20/2013 08:00:00 AM’, u’severity’: u’E’, u’title’: u’Policy win_server Backup Failure’, u’alert_time’: u’2013-07-20 06:00:03′, u’policy’: {u’name’: u’win_server’}}, {u’category’: u’Backup’, u’message_body’: u’Policy web_servers (user: root, account: main) – backup that started at 07/20/2013 09:20:03 AM failed. Last successful backup was at 07/20/2013 08:30:00 AM’, u’severity’:u’E’, u’title’: u’Policy web_servers Backup Failure’, u’alert_time’: u’2013-07-20 06:22:12′, u’policy’: {u’name’: u’web_servers’}}]


The JSON response is a list of alert objects, each containing the following fields:




alert_time (time of the last failure)



Using SNS

N2WS can also push alerts to notify you of any malfunction or issue via SNS. To use it, your account needs to have SNS enabled. SNS can send push requests via email, HTTP/S, SQS, and depending on location, SMS.

With SNS you create a topic, and for each topic there can be multiple subscribers and multiple protocols. Every time a notification is published to a topic, all subscribers get notified. For more information about SNS, see https://aws.amazon.com/sns/.

N2WS can create the SNS topic for you and subscribe the user email defined in the configuration phase. To add subscribers, go to the SNS Dashboard in the AWS Management console), add a recipient, and choose a protocol (SMS, HTTP, etc.), A link to this console is in the N2WS’ notifications screen.

For the small volume of SNS messages N2WS uses, there is usually no cost or it is negligible. For SNS pricing see https://aws.amazon.com/sns/pricing/.

Configuring SNS

To configure N2WS for SNS, click the Notifications button at the top of any screen.

Figure 17‑2

The Notifications screen appears as shown in Figure 17‑2.

To use SNS:

You will need to enter AWS account credentials for the SNS service.

There is one notifications configuration per user, but there can be multiple AWS accounts (where applicable).

SNS credentials are not tied to any of the backed-up AWS accounts. You can choose a region, and enter credentials, which can be regular credentials, IAM user (see section 16.3). To use the N2WS Server instance’s IAM role (only for the root user), type use_iam_role for both access and secret keys.

If you are the root (main) user, you can choose whether to include or exclude alerts about managed users (see section 18.2).

Root/admin users, and independent users who oversee managed users, can also configure a managed user to receive alerts directly by selecting the user in the User list and setting the notification properties described in sections 17.4 and 17.5.

SNS is used both for push alerts and for sending a daily summary.

Push Alerts

Push alerts use SNS to send notifications about malfunctions and issues in N2WS’ operation.

To enable push alerts:

  1. Set Alerts to Enabled.

Either paste in the topic’s ARN that you copied from the SNS tab of the AWS Management Console, or request N2WS to create the topic for you and add the user’s email as a recipient (optional).

Each recipient will receive a message requesting subscription confirmation before receiving alerts.

Daily Summary

Daily summary is a message that is sent once a day, summarizing all current alerts in the system. It can be configured instead of, or in addition to, regular alerts. It can be useful for several reasons:

  • If you are experiencing issues frequently it sometimes reduces noise to get a daily summary. Furthermore, since backup is the second line of defense, some people feel they do not need to get an instant message on every backup issue that occurs.
  • Even if there are no issues, a daily summary is a reminder that all is ok. If something happens and N2WS crashed altogether, and your monitoring solution did not report it, you will notice daily summaries will stop.
  • The Daily summary contains a list of policies which are disabled and policies that do not have schedules assigned to them. Although neither is an error, sometimes someone can accidentally leave a policy disabled or without a schedule and not realize that it is not working.

C:\Users\Janet\Documents\ScreenHunter\ScreenHunter_1296 Mar. 22 15.31.jpg

Figure 17‑3

While configuring SNS, as shown in Figure 17‑3, you can also configure the Daily Summary.

To configure the Daily Summary:

  1. In the Notification Settings screen, select Enabled in the Daily Summary list.

Use one of following options for defining the Daily Summary topic:

If you have Alerts configured and you want to use the same SNS topic for summaries, select the same topic as alerts check box.

To create a new topic, select the Create new topic check box, and complete the next screen.

Type or paste an ARN in the Summary Topic box.

There is an advantage of using a separate topic since sometimes you want different recipients: It makes sense for a system admin to get alerts by SNS, but to get the daily summary by email only. The display name of the topic also appears in the message (in emails it appears as the sender name), so with separate topics it is easier to distinguish alerts.

To add a recipient, select the Add user email as recipient check box, and complete the next screen.

In the Send Daily Summary at lists, select the hour and minutes to send the notification.

Raw Reporting Data

You can download two raw data reports in CSV format (Comma Separated Values). These reports are for the logged-in user. For the root user, they will include also data of other managed users. These reports include all the records in the database; you can filter or create graphic reports from them by loading them to a spreadsheet or reporting tool. The two reports combined give a complete picture of backups and snapshots taken by N2WS.

To download the CSV reports, click the backup view report or snapshot view report link at the bottom of N2WS’s main screen. These reports are also available in the Reports page. See section 17.9.

Backup View CSV Report

This report will have a record for each backup (similar to the backup monitor) with details for each of the backups:

  • Backup ID – A unique numerical ID representing the backup.
  • Account – Name of the AWS account if the system has multiple users and the user downloading the report is root.
  • AWS Account Number –ID of the AWS account.
  • Policy – Name of the policy.
  • Status – Status of the backup, same is in the backup monitor.
  • DR Status – Status of DR, same as in the backup monitor.
  • Start Time – Time the backup started.
  • End Time – Time the backup ended.
  • Is RetryYes if this backup was a retry after failure, otherwise no.
  • Marked for DeletionYes if this backup was marked for deletion. If yes, the backup no longer appears in the backup monitor and is not recoverable.

Snapshot View CSV Report

This report will have a record for each EBS or RDS snapshot in the database:

  • Backup ID – ID of the backup the snapshot belongs to. Matches the same snapshots in the previous report.
  • Account – Name of the AWS account.
  • AWS Account Number – Number of the AWS account
  • Policy – Name of the policy.
  • Status – Backup status of success or failure.
  • Region – AWS region.
  • Type – Type of snapshot: EBS, RDS or EBS Copy, which is a DR copied snapshot.
  • Volume/DB/Cluster – AWS ID of the backed up EBS volume, RDS database, or cluster.
  • Volume/DB/Cluster Name – Name of backed up volume, database, or cluster.
  • Instance – If this snapshot belongs to a backed up EC2 instance, the value will be the AWS ID of that instance, otherwise it will contain the string: None.
  • Instance Name – Name of instance.
  • Snapshot ID – AWS ID of the snapshot.
  • SucceededYes or No.
  • Start Time – Time the snapshot started.
  • End Time – Time the snapshot ended.
  • Deleted At – Time of deletion, or N/A, if the snapshot was not deleted yet.

Keeping Records after Deletion

By default, when a backup is marked for deletion, it will be deleted right away from the N2WS database, and therefore not appear in the reports. There are exceptions, such as if N2WS could not delete all the snapshots in a backup (e.g. a snapshot is included in an AMI and cannot be deleted). Sometimes you need to save records for a period of time after they were marked for deletion for compliance, such as General Certificate of Conformity (GCC). To keep records after deletion, see section 9.4.

Usage Reports

In addition to the raw reports, you can also download CSV usage reports. A usage report for a user will give the number of AWS accounts, instance and non-instance storage this user is using. This can be helpful for inter-user accounting.

For each user, in the bottom ribbon, there is a link usage report (current user).

For the root user, in the bottom ribbon, there is also a link usage report (all users) which will give all the breakdown of usage between all the users on the N2WS server.

Protected and Unprotected Resources Reports

The protected and unprotected resources reports provide information about the AWS resources with and without backup protection. In the bottom ribbon of the main screen, the unprotected resources report (all users) is available for admin/root users and the unprotected resources report (current user) for other users.

AWS resources that are tagged with key:’cpm backup’, value:’no-backup’ will be ignored. Also see section 14.1.5.

Protected Resources

The protected resources report contains information about the AWS resources with backup policies.

User Name (on all users reports)

ID for the resource

AWS resource name




The protected resources report is available immediately for the current user or all users depending on the account type.

The protected resources report is also available as a Scheduled Report. See section 17.9.

Unprotected Resources

The unprotected resources report contains information about the AWS resources that do not have backup policies.

Resource Type

Name of resource

Resource ID





Count of number of unprotected resources per resource type.

To create the unprotected resources report:

  1. Click the unprotected resources report (current user/all users) link in the Reports column of the Accounts management screen or at the bottom of the main screen.

In the Notifications management screen, click the View Alerts to check if the report has completed.

If completed, click the download last unprotected resource report link at the bottom of the main screen.

Check for the report in your Downloads folder.

Reports Page

As part of the N2W Software plan of moving toward a robust reporting module, version 2.6.0 has a new Reports interface accessible from the Reports button on the main page.

As before, all reports, except for the Audit Report, are available by clicking the links on the main page. The reports will be available in your Downloads folder. Reports are for the logged-in user. For the root user, the reports will also include the data of other managed users.

Scheduled Reports

Scheduled Reports allow you to create a schedule for each report. In order to receive a Scheduled Report, configure at least one recipient email address and the SES service for that email (see section 18.7).

You can run reports outside of a schedule and create ad hoc reports for download:

In the Scheduled Reports tab, Run Now generates a defined Scheduled Report and sends emails to its recipients.

In the Immediate Report Generation tab, you can define a new report for immediate download.

See section 17.9.3.

By default, the Reports page opens with a list for all reports which have been scheduled. To narrow the list, use the search box, or the filters for report type, user, and schedule.

Filters are available based on the chosen Report Type. Depending on the report, you can filter the results as follows:

Audit – Filter for User and From/To Date/Time

Backups – Filter for Account and From/To Date/Time

Protected Resources Report – Filter for User and Account

Resource Control Operation Report – Filer for Account and From/To Date/Time

Snapshots – Filter for Account and From/To Date/Time

Usage – Filter for User and From/To Date/Time – The default is a summary report; select the Detailed checkbox for a detailed report.

Defining a Scheduled Report

Reports are run according to their defined schedule and immediately with the Run Now button. Schedules reports must include at least one email recipient.

To create a scheduled report:

  1. Click the Scheduled Reports tab and then + New.

Enter a name for the new report and select the Report Type.

By default, the report is enabled. To disable the Schedule Report, clear the Enabled check box.

In the Schedules list, select one or more schedules. To create or edit a schedule, see section 4.1.

Note: You can create a Scheduled Report without a schedule and edit the report later after creating the schedule.

In the Recipients box, enter the email address of recipients, separated by a semi-colon (‘;’).

Select from the filters presented for the Report Type.

In the Include Records From Last boxes, you can select the number (first list) of Days, Weeks, or Months (last list) to include in the report. The default is all available records.

In the Description box, enter an optional informative description.

Click Save.

Running Reports outside their Schedule

To run a Scheduled Report and send emails to its recipients immediately:

In the Scheduled Reports tab, select the report in the list and click Run Now.

To define a new report and download it immediately:

  1. Select the Immediate Report Generation tab.

Select a Report Type and one or more filters depending on the Type selected, as listed above in section 17.9.1.

  1. To filter by date and time, click the calendar icons and select the From and To date and time values.

Click Generate Report.

The output will be downloaded by your browser.

Examples of AWS Alerts

AWS uses SNS to provide a number of N2WS alert services by subscription.

Subscription Confirmation Alert

After subscribing to CPM Alerts in AWS, you will receive an email with a confirmation link:

Click the Confirm subscription link. You will receive a subscription confirmation email:

Daily Summary Alert

Following is an example of a CPM Daily Summary where all AWS functions were OK:

Unprotected Resources Alert

Following is an example of an alert that the unprotected resources report is available:

Share this post →

Share on twitter
Share on linkedin
Share on facebook
Share on email

Limited Time Offer:

Activate a free trial of N2WS —and get $250

Try N2WS Backup & Recovery today —and we'll give you $250 in AWS credits.

*All new active trials will receive $250 in AWS credits for a limited time!