Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: The support homepage carousel is not displaying. We are working toward a resolution.

Talend in the cloud API monitoring and management

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II
Contributor II

Talend in the cloud API monitoring and management

Last Update:

Feb 2, 2024 12:53:24 PM

Updated By:

Sonja_Bauernfeind

Created date:

Feb 10, 2021 8:56:33 AM

API monitoring works by periodically invoking the API from Talend Jobs and recording the response details. This article shows you one way of monitoring the API in a Microsoft Azure environment using a combination of Talend Jobs.

Sources for the project are attached in the Appendix section of this article.

Environment

This article uses the following in a Talend cloud environment:

  • Studio 7.3.1 downloaded from Talend Cloud portal
  • Talend in the cloud API Designer

Process flow

API Designer in Talend in the cloud

The first step in the process is to add a new endpoint, in this case, HTTP/health, to the API. The health check client periodically invokes the endpoint to check the health of the service instance.

0EM3p000002PFkc.png

API Services in Talend Studio

The next step adds a logic for the health endpoint in the API Services Job, along with the rest of the logic for the other endpoints. This Job gives the right message about API availability.

0EM3p000002PFly.png

Creating an API Monitor Job

The API Monitor Job, creates a client that checks the health of the API instance. The Job reads input from a file, one record at a time, and iterates for all the APIs to be validated.

You can schedule the Job from Talend Management Console at regular intervals to collect the API details. Then push the details to the Azure log workspace and later pull them into the Azure Dashboards. The Job gets the following details:

  • API name
  • API status
  • API error message
  • Timestamp of when the API detail was collected

0EM3p000002PFm3.png

Creating the source file for the API Monitor Job

The input to the Job is a list of APIs endpoints with the API name.

0EM3p000002PFmD.png

Azure Dashboard

This Job pushes the data to an Azure log analytics workspace from where queries are written, and the API Monitor dashboards are displayed in Azure Dashboard.

0EM3p000002PFmN.png

Reviewing the individual queries and reports

Report—to know the overall API health stats

Query:

// to know the overall API health 
talend_api_monitor_rek_CL 
| project API_NAME_s, API_STATUS_s, API_RETURN_CODE_d,CURRENT_TIMESTAMP_s
| summarize count() by API_STATUS_s
| render piechart

 Chart:

0EM3p000002PFmS.png

Report—to know the status report of the APIs in last 1 or 3 days

Query:

// to know the status of the API in last 1 day.
talend_api_monitor_rek_CL 
| where TimeGenerated > ago (1d)
| project  API_NAME_s, API_STATUS_s
| evaluate pivot(API_STATUS_s)
| render table

Chart:

0EM3p000002One6.png

Report—to know the error message for the unavailable API

Query:

//to know the error message for the unavailable API
talend_api_monitor_rek_CL 
|where API_RETURN_CODE_d <> 200
|project API_NAME_s, ERROR_MSG_s,p= format_datetime(TimeGenerated,'MM-dd-yyyy')
|evaluate pivot(p)
|render table

Chart:

0EM3p000002OneG.png

Appendix

Labels (1)
Version history
Last update:
‎2024-02-02 12:53 PM
Updated by: