Overview

The article covers the following topics:

  • common use cases where CloudMonix can help with monitoring and automation

  • what is needed to connect to and monitor XML or JSON endpoints

  • what metrics can be tracked, visualized and monitored

what automated actions can be executed by CloudMonix


Why use CloudMonix for API Endpoints?

Popular usages of CloudMonix include the following examples:

  • Monitoring Uptime and Availability

  • Ensuring correct responses are coming back from APIs

  • Importing custom data provided thru API endpoints for alerting, monitoring and automation signals


Configuration 

XML and JSON Endpoints monitoring can be configured by using the “Add New” button in the dashboard. 


Apart from specifying the URL for the endpoint, users can configure advanced settings, like content type, method used to retrieve data (Get, Post, Put or Delete), provide credentials required to use the API and specify custom headers.



Metrics

CloudMonix retrieves data by directly executing requests against the endpoints.


Every diagnostic data point that CloudMonix retrieves from the monitored resource is considered a metric in CloudMonix. Refer to the Metrics article to learn more about metrics in general. The metrics can be added, removed and customized in the Metrics tab in the resource configuration dialog.


Built-in Metrics 

ResourceStatus

Identifies the last state of the monitored resource. This is a critical metric that is captured for most types of resources that CloudMonix tracks. It is used for Uptime reports and should not be removed. 

  • Data Type: string

  • Possible values: Ready, Down

  • Available for JSON and XML endpoints

Statuses are determined according to the following rules:

  • Ready - successfully connected to the resource and retrieved metrics

  • Down - there was an error when trying to retrieve data from the resource


ResponseTime

Tracks the time in milliseconds that the endpoint took to respond to the last monitored request.

  • Data Type: long

  • Available for JSON and XML endpoints


UrlResponseCode

Tracks HTTP response code (as an integer value). Examples: OK = 200, Exception: 500, Unauthorized: 403, etc.

  • Data Type: int

  • Available for JSON and XML endpoints


UrlResponseText

Tracks actual the text of actual response from the monitored URL. Useful for inspection of resulting HTML/XML/JSON. This is potentially a large-size metric - use sparingly.

  • Data Type: string

  • Available for JSON and XML endpoints


UrlSslExpirationInDays

Tracks number of days before SSL certificate of the monitored URL expires.

  • Data Type: double

  • Available for JSON and XML endpoints


JsonPathItemString/XPathItemString

Allows for extraction and tracking of a single string item from returning JSON/XML.

  • Data Type: string

  • Requires specifying an XPath Query


JsonPathItemNumeric/XPathItemNumeric

Allows for extraction and tracking of a numeric item from returning JSON/XML.

  • Data Type: double

  • Requires specifying an XPath Query


JsonPathItemArray/XPathItemArray

Allows for extraction and tracking of collection of objects from returning JSON/XML.

  • Data Type: array of objects

  • Requires specifying an XPath Query


Alerts

Users can create alerts based on changes in any value tracked by CloudMonix (including custom metrics). Each resource template includes alerts which are suitable for a given resource. The predefined alerts for Endpoints are listed in the Metrics section. Refer to the Alerts article to learn more about alerts in general.


Alerts are available during the Trial period or in Professional and Ultimate plans only.



Actions and Automation 


Automation features (Actions) allow users to set up powerful reactive, proactive and scheduled actions and auto-scaling rules. CloudMonix can execute actions and scale adjustments when a specific monitoring condition occurs or according to a schedule. Refer to the Actions article to learn more.


Automation features are available during the Trial period or in the Ultimate plan only.



Built-in Actions 

WebRequestJson, WebRequestXml

Executes a specified request against a configured JSON or XML endpoint, respectively. Can be executed on schedule or according to custom criteria.

  • Requires specifying

    • request methods: GET, POST, PUT or DELETE

    • web request URL

    • optional payload