Skip to main content

API Status Metrics

Deploy this integration to collect API status metrics of user API and send them to Logz.io.

The integration is based on a Lambda function that will be auto-deployed together with the layer LogzioLambdaExtensionLogs.

Auto-deploy the stack

To deploy this integration, click the button that matches the region you wish to deploy your stack to:

RegionDeployment
us-east-1Deploy to AWS
us-east-2Deploy to AWS
us-west-1Deploy to AWS
us-west-2Deploy to AWS
eu-central-1Deploy to AWS
eu-north-1Deploy to AWS
eu-west-1Deploy to AWS
eu-west-2Deploy to AWS
eu-west-3Deploy to AWS
sa-east-1Deploy to AWS
ap-northeast-1Deploy to AWS
ap-northeast-2Deploy to AWS
ap-northeast-3Deploy to AWS
ap-south-1Deploy to AWS
ap-southeast-1Deploy to AWS
ap-southeast-2Deploy to AWS
ca-central-1Deploy to AWS

Specify the stack details

Specify the stack details as per the table below, check the checkboxes and select Create stack.

ParameterDescriptionRequired/OptionalDefault
ApiURLYour API URL to collect status from (for example: https://example.api:1234).Required-
MethodYour API HTTP request method. Can be GET or POSTRequiredGET
ApiResponseTimeoutYour API response timeout (seconds).Required10 (seconds)
ExpectedStatusCodeThe expected HTTP response status code your API should return.Required200
ExpectedBodyThe expected HTTP response body your API should return (leave empty if your API HTTP response body is empty).Required
LogzioListenerThe Logz.io listener URL: https://<<LISTENER-HOST>>:8071 Replace <<LISTENER-HOST>> with the host for your region. The required port depends whether HTTP or HTTPS is used: HTTP = 8070, HTTPS = 8071.Requiredhttps://listener.logz.io
LogzioMetricsTokenYour Logz.io metrics shipping token:<<PROMETHEUS-METRICS-SHIPPING-TOKEN>>.Required-
LogzioLogsTokenYour Logz.io log shipping token:<<LOG-SHIPPING-TOKEN>> Replace <<LOG-SHIPPING-TOKEN>> with the token of the account you want to ship to.Required-
SchedulingIntervalThe scheduling expression that determines when and how often the Lambda function runs.Requiredrate(30 minutes)
HeadersYour API headers separated by comma and each header's key and value are separated by = (header_key_1=header_value_1,header_key_2=header_value_2).Optional-
BodyYour API HTTP request body.Optional-
BearerTokenYour API bearer token.Optional-
UsernameYour API username.Optional-
PasswordYour API password.Optional-

Run the tests

Run the ping statistics tests to generate metrics.

Check Logz.io for your metrics

Give your metrics some time to get from your system to ours, and then open Open Search Dashboards. All metrics that were sent from the Lambda function will have the prefix api_status in their name.

Install the pre-built dashboard to enhance the observability of your metrics.

To view the metrics on the main dashboard, log in to your Logz.io Metrics account, and open the Logz.io Metrics tab.