At the end of November, we’ll be migrating the Sematext Logs backend from Elasticsearch to OpenSearch

Extract metrics from synthetics HTTP monitors

September 8, 2023

By extracting numerical values from endpoints, you can effortlessly monitor and analyze data, identify emerging trends, assess performance metrics, and set up alerts. This approach enables you to receive notifications when specific conditions are met, eliminating the need for manual metric checks and resulting in significant time savings.

Check out some of the examples of extracting numerical data from a web page:

In the past, achieving this required the creation of Browser Monitors and the writing of user journey scripts to extract metrics from responses returned by the monitored endpoints. However, with the newly introduced metric extraction from HTTP monitors capability, you can now accomplish these tasks without the necessity of writing user journey scripts. Because HTTP monitors are cheaper than Browser monitors, this means extracting metrics via HTTP monitors is also going to be cheaper for you.

How to Configure HTTP Monitor to Extract Custom Metrics

Start by creating the HTTP monitor as you normally would. Inside the “Configure Response” section, select either JSON or XML, depending on the format of the HTTP response body. Additionally, you can simulate and test the extraction by manually providing the response body, as shown below

Note that “+ New JSON Path” in the screenshot above. This lets you extract multiple different metrics.

After setting up the monitor, you can view the extracted metrics from each run in the run flyout. If you configured the extraction of multiple metrics, they will all be shown here.

Additionally, you can chart these extracted metrics and add them to your Dashboards or define Alert Rules that notify you when the metric deviates from normal or a certain criteria is met based on thresholds. So you can use this to monitor e.g. product prices or competitor’s plan prices or 3rd party SLAs, etc.

For more information, please refer to Extract Custom Metrics from HTTP Monitors.