Nav

Upload a Monitor

You can upload a suite of tests that you have written and want to run as a monitor, viewing the results the information displays in the Functional Monitoring section of Anypoint Monitoring.

Before you begin

  • Ensure that your user ID has the Monitoring Center User permission. An administrator for your organization can grant you this permission in Anypoint Access Management.

  • Write a suite of tests in the BDD test-writing language. For information about writing tests, see "API Functional Monitoring with the BAT CLI", which is linked to from the See also section at the end of this topic.

  • Determine the frequency at which you would like the monitor to endpoints in the test suite. The shortest interval is every fifteen minutes. You can also choose to run the monitor hourly, daily, weekly, or monthly. The schedule begins immediately after you upload the monitor. After you upload the monitor, you can create another schedule that is more detailed, if you prefer.

  • Determine which execution location you would like to run the monitor in.

  • If you have more than one configuration file in your test suite, determine which you plan to use for the monitor.

Procedure

To create a monitor by uploading a test suite:

  1. In the Functional Monitoring section of Anypoint Monitoring, click Upload.

  2. Upload the folder that contains your test suite.

  3. Fill in the fields with the information that you have gathered.

  4. Click Upload.

Result

The dashboard opens. The monitor is listed on the left. Beneath the name of the monitor is an indicator that explains when the current run of the monitor began. A line at the bottom of the list item shows how much time remains before the next run of the monitor. Also, the Monitored Endpoints, Tests, and Schedules sections will all be empty. After the monitor has run, the list item for the monitor will indicate whether the monitored endpoint passed or failed.

What to do next

Click the Scheduling tab to see the schedule for the monitor. The Version column in the table of schedules displays the version number 0.0.1. This number refers to the version of the test suite that you uploaded. If you ever make changes to the test suite and upload it again, the version number will be incremented. For example, the first time that you upload a changed version of the test suite, its version number will be 0.0.2. It will also have a new schedule created for it. You can either keep the original schedule for the previous version of the monitor or delete that schedule. You can also disable and enable schedules.

After the monitor runs, click the Monitored Endpoints tab to see:

  • Whether the endpoint returned the expected code, as indicated by PASSED in the first column of the table

  • Statistics about the execution of the test of the endpoint

As your monitor continues to run at the scheduled intervals, the statistics in this table are updated. They show the minimum, average, and maximum runtime for up to five executions of the test.

Click Tests to see statistics and information pertaining to the monitor. The version number shown here is 0.0.1. However, if you upload the test suite again after making changes to it, you will see here a second card of information. The version number on this card will be 0.0.2.

Every subsequent version of the test suite that you upload will have its own card and that card will show the version of the monitor. If you delete the schedule for a version of the monitor, the card for that version will no longer appear in the Tests section.

If you want to delete the monitor, delete all versions of it in the Tests section.