Monitoring

API Monitoring

Cronitor provides fast and reliable uptime and correctness monitoring for JSON APIs. Our global healthchecks provide you with:

  • Multi-region downtime detection
  • Detailed performance measurement
  • Custom data validation
  • Configurable request intervals
  • Custom HTTP headers & cookies
  • No false alerts, we always double check

In this guide we'll create a new API monitor from the Cronitor dashboard, and we'll examine the various types of assertions that can be configured to validate your API responses.

Tip: If you are planning to create API monitors using our Monitor API, we recommend first following the directions below. Once you've created your first API monitor, click the "Monitor Detail" link on that monitor to view a JSON representation. Use this as a reference while creating your integration.

Creating an API monitor

  1. From your dashboard, click the button to create a new monitor and select "Websites & APIs > API".
  2. Select a request method and enter the URL that you want monitored. You can choose among HTTP methods like GET, POST, etc. You can also adjust the frequency and regions of the healtchecks.
  3. If your API uses the Authorization header (or a custom header) for authentication, add that to the request as well.

    Nota Bene: APIs like Stripe, Plaid and Cronitor use `Basic` authentication over HTTPS. If your API uses this same authentication mechanism, first locate your API key and append a : to it. Then use a base64 encoder to generate the encoded value. Insert that value as Basic your_base64_encoded_key

  4. Add custom assertions that will be run against your API response. These are the performance and data validations that will be run against every one of your API responses. If your API is unreachable, returns a 500 level error, or any of your assertions fail, you will be instantly alerted. See "Defining Healthcheck Assertions" below for information on the various assertions types.
  5. Configure how you want alerts to be sent. See our integration docs for a complete list of alert integrations including: Email, Slack, SMS and PagerDuty.
  6. Give the monitor a descriptive name. You can optionally add tags to help you organize your monitors.
  7. You're done! After saving the monitor healthchecks will begin within a few moments.

Defining Healthcheck Assertions

Combine multiple service health assertions with our built-in checks for total and intermittent downtime to create the right healthcheck solutions for your services. Available assertions include:

  • Max Response Time
  • Mean Response Time
  • Response code
  • Response Body
  • Response Body (JSON)

Configurable operators for these rules include eq, lt, gt, gte, lte, not, contains

Request Quotas

Healthchecks can be configured to ping your endpoint as often as once every 30 seconds, however each plan has a maximum number of allowed healthcheck requests each calendar month. If this quota cannot accommodate your use case, please reach out to support@cronitor.io for assistance.

Cronitor for Business:
3,000,000 Healthcheck requests per month

Cronitor for Teams:
1,000,000 Healthcheck requests per month

Solo Cronitor:
250,000 Healthcheck requests per month

Request Details

All health check requests will be made with the User Agent Monibot from our monitors in California, Oregon, Ohio, Virginia, Ireland and Tokyo. Outages are verified across multiple regions to determine failure scope.