Real time Availability Monitoring
Last updated
Last updated
Temperstack offer Realtime availability monitoring (ping monitoring) along with response time trends This can be used to raise alerts on API end point availability.
Endpoint Monitoring
Temperstack availability monitoring allows you to set up ping monitoring for various endpoints. This helps you keep track of your services' availability and performance.
Headers and Parameters
You can customize the requests used for ping monitoring by modifying headers and parameters. A key point to note is that the default User-Agent in headers is "TempetstackPing", but this can be changed in the headers section if needed.
Authentication
Authentication is an optional feature that allows you to modify requests with authentication payloads. This authentication information will be added to the request header, and will be overridden if the request header already contains an authentication payload. Temperstack Synthetics supports several authentication methods:
Basic Authentication
Bearer Token Authentication
API Token Authentication
JWT Authentication (dynamic)
For static authentication methods (Basic, Bearer Token, API Token), the provided values are used consistently for each ping monitor request. JWT authentication is unique in that it dynamically generates a JSON Web Token for each request, incorporating user-provided details along with standard claims like "iat" (issued at), "exp" (expiration), and "nbf" (not before).
To add a new endpoint for monitoring, follow these steps:
Log in to the Temperstack dashboard
Navigate to Resources - Temperstack Synthetics
Click on "Add New"
Enter the Endpoint name
Select the request method from the dropdown menu:
GET: Retrieve data
POST: Submit data to be processed
PUT: Update existing resource
DELETE: Remove a resource
PATCH: Partially modify a resource
HEAD: Similar to GET but retrieves headers only
OPTIONS: Describe communication options for the target resource
Map the endpoint to a service
Enter the Endpoint URL
Specify the expected response code
Set the check interval in minutes
Define the request timeout in seconds
Choose the authentication method from the dropdown
Add request parameters (key-value pairs)
Add request headers (key-value pairs)
Specify any required response body text/JSON
There are three available methods for checking the results of the response body of a request:
To explain the following examples, let’s consider a sample endpoint that returns the following JSON upon execution:
In this method, the response body of the ping request is compared directly with the provided input JSON. For the ping to be considered successful, the response must match exactly.
If the response body field is left blank, the request is automatically considered successful, and no response body matching is performed.
This method allows partial matching of the response body. It looks for exact matches of primitive types (numbers, booleans, strings, null) and recursively checks objects and lists in the JSON structure.
Let’s assume you want to validate the sample endpoint but ignore dynamically generated fields that are not relevant to the status of the endpoint, such as "runtime"
or "timestamp"
.
Since the "state"
in "latest_run"
from the response (FAIL) does not match the expected input (SUCCESS), this ping will be marked as a failure.
This method provides the most flexibility by parsing the response body using Python's re
regex engine. The regex pattern determines whether the response is considered successful.
For example, suppose the "state" field in "latest_run" can have multiple valid values, such as ["INITIALIZING", "RUNNING", "SUCCESS", "FAIL"]. To allow all acceptable states except "FAIL"
This regex pattern allows the monitoring system to accept responses where the "state"
is "INITIALIZING"
, "RUNNING"
, or "SUCCESS"
. If the "state"
is "FAIL"
, the ping will be marked as a failure.
You can also use the Test Regex button to validate your regex before submitting it, along with a sample input. Note: The sample input is not stored.
Request Body for HTTP Methods
When using POST, PUT, or PATCH HTTP methods, you can include a request body with your request. The request body allows you to send additional data as part of your HTTP request.
Alarm Settings
Alarm on Y Failures out of X checks: This setting specifies the number of failed checks (out of a total of 5 checks) required to trigger the alarm. For example, the alarm will be triggered if there are 3 failures out of the last 5 checks. It also determines the total number of checks considered for the alarm trigger condition.
The explanation provided an example - if the setting is '2/3', it means the alarm will be raised only when at least 2 pings were down in the last 3 checks.
This allows the user to configure the alarm settings more flexibly, rather than simply triggering an alarm on the first failure. It helps to avoid false alarms caused by temporary or intermittent failures, and only raise the alarm when there is a more sustained issue with the monitored endpoint.
The goal is to strike a balance between detecting real problems early, while avoiding unnecessary alerts for transient failures that may not require immediate intervention.
Click "Save Changes"
To disable an endpoint temporarily, click the toggle button under "Actions" for the desired endpoint and turn off the toggle.
Bulk service mapping is available by selecting multiple endpoints and clicking the "Map to Service" button in the top right corner.
Response Time by Endpoint
Line graph showing response times for different service endpoints over time.
Includes options to view historical data (e.g., last 3 hours , 6 hours, 24 hours, 3 days, 7 days, 30 days).
Displays key statistics like uptime percentage and average response time.