api check overview - rigor monitoring

30
Getting Started and Best Practices Rigor Monitoring – API Check

Upload: anthony-ferrari

Post on 11-Apr-2017

154 views

Category:

Software


1 download

TRANSCRIPT

Getting Started and Best Practices

Rigor Monitoring – API Check

Agenda

Introductions

Overview Of Rigor & Performance

What Can I Test with API Check?

API Check Introduction

In-App Overview

Deep Dive Into API Check

Appendix

Monitor

Alert

Trend

Optimize

Rigor’s Value

What is Rigor?

Advanced web performance monitoring tool that provides real–time data on how sites are performing and diagnoses issues that cause poor performance.

What Can I Test with API Check?

• Availability and performance of individual API endpoints • Verify your API endpoints are returning the correct data

and response codes• Transactional API workflows with variables and dynamic

data inputs• Trigger alerts based on any part of an HTTP request or

response

API Check Introduction

API Checks provide a flexible way to check the functionality and performance of API endpoints.

API Check Steps• Request – makes a HTTP request to some endpoint and collects data

from that interaction• Assert – makes an assertion on two values• Save – A ‘Save’ step stores some data to be reused later in the check• Extract – This step extracts data out of some formatted data (JSON)

In-App Overview

Deep Dive Into API Check

Request Step

Makes a HTTP request to some endpoint and collects data from that interaction. All HTTP requests are configured within request steps.

Request Methods:• GET• HEAD• POST (can send post data)• PUT (can send post data)• DELETE

Headers – A ‘Request’ can have multiple headersFailures – Non-200 level response codes do not automatically fail a request step*

* Requests are only considered failures when the request/response cycle cannot be completed. Use ‘Assert’ step to validate response code.

Step Type

HTTP MethodEndpoint

Request Header (name/value)

Assert Step

Makes an assertion on two values. To make an assertion, supply two parameters along with the comparison that you would like to perform between the two.

Comparisons – We currently support 2 types of comparisons: string and numeric.

Failures – An ‘Assert’ step will fail if the assertion is false when the step is run.

Step Type

Parameter 1

Parameter 2

Comparison

Save Step

Stores some data to be reused later in the check. To save data, supply the source and the name of the custom variable to save to.

Source – can be selected from the presets, including response headers, or by providing a custom value.

Failures – A ‘Save’ step never fails.

Step Type

Source

Custom Variable Name

Value

Custom Variable Reference

Extract Step

This step extracts data out of some formatted data. Right now, Rigor’s API Check only supports JSON data.

To extract data, supply 3 things:1. Source containing the JSON2. JSONPath expression to

extract out the data3. Custom variable name

Failures – A JSON extraction will fail if there is not a single result.

A result is a JSON Primitive.

Note: this means that the step will pass if the extraction returns a single JSON object or array.

Step Type

Data Format (JSON only)

Custom Variable Name

Source

Custom Variable Reference

JSONPath Expression

API Check allows variables in most fields. A variable consists of two parts, the namespace and the variable name. To use a variable in a step, surround the variable with {{ and }}.

Variables

API Check has 3 different variable types:• Built-in variables – initialized at the beginning of the check before any

steps have run. These variables remain constant within a run but will change between runs.

• Request variables – updated after every request step.• Custom variables – are created by the user.

Built-In Variables

Request Variables

Custom Variables

API Check – Performance History

API Check – Failed Run

Date, Time, Location, IP Address

Alert DescriptionWho was notified?

Response Time

Nslookup

Traceroute

API Check – Failed Run (continued)

cURL Request Output

Request Headers Response Body

Response Headers

API Check – Resources

Technical ResourcesRigor Knowledge Base• http://help.rigor.com/api-check/

JSONPath Introduction• http://goessner.net/articles/JsonPath/

JSONPath Expression Tester• https://jsonpath.curiousconcept.com/

API Background InformationWhat is an API? A Brief Intro• http://rigor.com/blog/2016/05/what-is-an-api-a-

brief-intro

Why Monitoring APIs is Important• http://rigor.com/blog/2016/07/why-monitoring-

apis-is-important

Best Practices for Monitoring an API• http://rigor.com/blog/2016/07/best-practices-

monitoring-an-api

Additional Information and Helpful Resources

Appendix

Help Resources

Rigor Knowledge Base• http://help.rigor.com

Rigor Support Channel• In App: Intercom widget• Email: [email protected]

Rigor Blog• http://rigor.com/blog

ALERTs Overview

How can you be alerted in Rigor?• Email, Phone Call, Text (SMS),

Custom Webhook

What information is contained in a Rigor alert?• Check Name (hyperlinked to check

in Rigor)• Cause of failure• Who was notified• Time & Location of failure• Link to related run and check history

Reports Overview

Configured to deliver via email on schedule (weekly)• Table with performance data• Check names link to app• Link to Custom Report

Performance metrics included:• Uptime• Load Time• Failure Count