4. Get started with Availability Monitoring on your application
Complete the following steps to open Availability Monitoring for your app, to create a webpage test to monitor another URL, and to set up notification alerts for your tests. In this section, you will add an additional URL for testing (in addition to the base app URL which is tested by default).
If you are using the Java Cloudant Web boilerplate in this lab, the first step in this section will provide a way to get an additional URL for testing. Otherwise, select another URL from your application based on its implementation.
- To get an attachment URL to test if you are using the Java Cloudant Web boilerplate for this lab, upload a file to the application. Then click on the file to download into the browser and copy the URL from the browser navigation field. The URL will be of the form:
- To monitor a Cloud Foundry application, click the app name in the All Applicationstable on theApps dashboard
If you do not have an app yet, create it and the application card opens automatically.
- Click the Monitoring tab. Cloud Foundry applications are automatically bound with Availability Monitoring when you click the Monitoring tab.
The Monitoring tab displays three gauges that show Average Test Availability in the last 24 hours, Current Test Status, and Usageof your current plan allocation.
- Click Add New Test to configure a monitoring test.
The main application URL is monitored by default. Any other URLs and services that you monitor can be inside or outside of Bluemix and do not need to be related to the associated Cloud Foundry application.
When you click Add New Test, the following Monitoring Setup page is displayed:
- Click Single Actionon the Monitoring Setup page, and then click Webpage on the Single Action page.
- Enter a meaningful name for your test in the Name field.
- Add a description of the purpose of your test to the Description field.
- Enter the URL of the web app that you want to test, either using the URL for a specific attachment in the Java Cloudant Web boilerplate or a URL appropriate for the specific application you are monitoring.
- Configure the warning and critical alert thresholds for your test in the Response Validation section.
- Edit the Value and Unit for each row. Response times that exceed your warning and critical thresholds trigger alerts.
- Click Verify to create your webpage test and to determine whether your test request is valid.
Availability Monitoring determines the test validity by sending a GET request to your test URL. No response validation takes place during test verification. Your validated test is displayed in the Verified Items table. You can add more URLs by repeating steps 4-9.
- To configure your test settings, clickNext.A summary of the test configuration is displayed. For example, the following message is displayed for the default settings:
Test will occur: Every 15 minutes from 3 locations simultaneously to determine if test exceeds the specified threshold.
The estimated usage and estimated number of tests per month are displayed based on your current test configuration.
- In the Settings pane, click Edit to display the current settings for your test.
You can change the interval of the tests, the testing frequency, and the locations where the tests are sent from.
- Select Simultaneous to run your test from all locations simultaneously; or select Staggered to run your test from a different selected location at each interval.
- Click Save to finish configuring your test.
- Click Finish.
The Availability Monitoring dashboard displays a summary of your total tests, a map and table that depict the frequency and location of your alerts, all synthetic tests that are associated with your app, a table of your activities, and a line graph that depicts the response time and availability of your app and other websites. You can create more tests as required.
- You can configure the monitoring feature to send notifications when an event occurs.
Use theAlert Notification service to configure your preferred communications channels and to create alert policies.
To receive email notifications of your alerts, click the Configure icon, and click Enable in the Team Notifications field. When email notifications are enabled, you can click Edit Policies to configure your alert notifications with IBM Alert Notification.
The test results are displayed after the interval that you specified in the test elapses. The default interval is 15 minutes.
You are now ready to monitor the availability of your web apps. The response time and availability information for your application, website, or REST API is displayed on a line graph along with information about recent activities and tests in the Response Time and Availability card.