How Can We Help?
Ingestion APIs of Heal help you ingest Metric data from any bespoke application into the Heal system via GRPC (http2).
Ingestion APIs Listing
- Requests (Transaction) API
- KPI API
Prerequisites
- Java in environment path is set.
- Protobuf-3.6.1 is installed, if not installed already install it now.
Protocol Buffer Installation
This section will guide you in installing Protocol Buffer.
- Download protobuf-3.6.1 and copy the build to the required location.
- Extract the download.
- Navigate to the source ‘src’ folder.
- Create an output folder to store the Java code to be generated from the Protobuf.
- Execute the following command in the terminal.
For Example:
Implementation of Protobuff Message
With the assumption agent has collected the XPT Transaction details in java Map (key-value pair) format You can write a method like the following convert map data into XPT proto message format.
Method to Initialize GRPC Channel
To initialize the GRPC channel using the following method.
Input Parameters
Argument | Description | Mandatory | Predefined Values | More Info |
---|---|---|---|---|
grpcServerIp | The IP address or Hostname of the GRPC Server | Yes | – | |
grpcServerPort | Port number of the GRPC Server | Yes | – | |
isSSLEnabled | Flag to identify if the SSL is enabled on the GRPC | Yes | 0, 1 | 0= false, 1= true |
certificateFilePath | Path of the Certificate file | Yes | ||
## Method to Ingest Data to GRPC | ||||
To ingest XPT data to GRPC, you can use the following method. |
Sample
Sample Message and Response for the data ingested to GRPC is as follows.
Request
Response
Sending response code [OK] to the client
Transaction API
Transaction API lets you ingest the Request aka Transaction into the Heal via GRPC. The agent sending the data is expected to send the details as specified in the Message format below. Also, ensure the values sent to match the data type specified in the message format.
Message Format
Input Parameters
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
---|---|---|---|---|---|
agentUid | Valid agent identifier for the agent | – | – | Yes | The identifier for the agent must be present in the Heal database |
serverIp | IP Address or Hostname of the Server which serves the Request | – | – | Yes | The target server IP where the Agent is present or collects data from |
serverPort | Port number on which the Server listens | – | – | Yes | Target Server Port on which the transaction is happening |
clientIp | IP Address or Hostname of the Client which sends the Request | – | – | Yes | IP address or Hostname of the Client that is sending the requests to the server. |
clientPort | Port number from which the request is sent. | – | – | Yes | Client Server Port from where the transactions started. |
transactionType | Value of the TransactionType | – | Values defined under “enum TransactionType” | Yes | TCP & HTTP are the supported Transaction Types |
responseTime | Transactions response time as in the ResponseTime format | – | Values defined under “message ResponseTime” | Yes | cell |
txnId | Id of the transaction as in the Heal database | – | – | Yes | cell |
enum TransactionType | Contains the list of Transaction type and value for it. | – | TCP = 0; | ||
HTTP = 1; | Yes | Do not change the values. |
Message Response Time
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
---|---|---|---|---|---|
responseTimeType | Value of the ResponseTimeType | – | Values defiened under “enum ResponseTimeType” | Yes | cell |
startTimeInGMT | Start time of the transaction in GMT | – | – | Yes | Time when the request(transaction) started |
endTimeInGMT | End time of the transaction in GMT | – | – | Yes | Time when the request(transaction) ended |
responseInMicroseconds | Transaction response time in Microseconds | – | – | Yes | Response time must in Microseconds, hence the agent sending the details must send accordingly. |
responseStatusTag | Value of the ResponseStatusTag | – | Values defined under “enum ResponseStatusTag” | Yes | cell |
enum ResponseTimeType | Contains the list of Response Types and value for it. | – | RENDER = 0; | ||
DC = 1; | |||||
EUE0 = 2; | |||||
EUE1 = 3; | |||||
EUE2 = 4; | |||||
L0 = 5; | |||||
L1 = 6; | |||||
L2 = 7; | |||||
L3 = 8; | |||||
L4 = 9; | Yes | Do not change the values. | |||
enum ResponseStatusTag | Contains the list of Response tags and value for it. | – | UNKNOWN = 0; | ||
GOOD = 1; | |||||
FAIL = 2; | |||||
TIMEOUT = 3; | |||||
SLOW = 4; | Yes | Do not change the values. |
message Http
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
---|---|---|---|---|---|
url | HTTP Transaction URI | – | – | Yes | The URI of the transaction. (example: /flights/flightbooking) |
method | Value for the HTTP Transaction Method | – | Values defiened in the “enum Method” | Yes | cell |
header | HTTP Transaction Header details | – | – | Yes | |
requestBody | HTTP Transaction Request Body details | – | – | Yes | cell |
responseCode | HTTP Response Code | – | – | Yes | |
requestSizeInBytes | Size of the Request in Bytes | – | – | Yes | |
responseSizeInBytes | Size of the Response in Bytes | – | – | Yes | |
responseBody | HTTP Transaction Response Body Details | – | – | No | |
enum Method | Contains the list of HTTP Methods and its values. | – | OTHER = 0; | GET = 1; HEAD = 2; POST = 3; PUT = 4; DELETE = 5; CONNECT = 6; OPTIONS = 7; TRACE = 8; | Yes |
message Tcp
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
---|---|---|---|---|---|
requestBody | TCP Transaction Request Body details | ||||
responseBody | TCP Transaction Response Body details | ||||
requestSizeInBytes | Size of the Request in Bytes | ||||
responseSizeInBytes | Size of the Response in Bytes |
KPI API
Performance metric KPIs collected by your agent can be ingested in the Heal by KPI API. The message format for the KPI to sent by the agent is expected as follows.
Message format for KPI API
Inputs Required
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
---|---|---|---|---|---|
string agentUid | Valid agent identifier for the agent | – | – | Yes | The identifier for the agent must be present in the Heal database |
message KpiData
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
---|---|---|---|---|---|
kpiUid | Unique Identifier of KPI | – | – | Yes | KPI ID for the Heal database |
timeInGMT | Time in GMT format | – | – | Yes | The time when the KPI was collected |
kpiType | Type of the KPI | – | – | Yes | cell |
kpiName | Name of the KPI | – | – | Yes | cell |
kpiGroupName | Name of the KPI Group | – | Values as defined in enum KpiType | Yes | |
errorCode | Error code | – | Yes | Yes | Values of Error codes present in the Heal database must be used. |
isKpiGroup | Flag to know if the KPI belongs to a group | – | 0, 1 | Yes | 0 = false, 1 = true |
collectionInterval | Data collection frequency | – | – | Yes | Data collection interval configured for the KPI from Heal database |
enum KpiType | Contains the list KPI Types supported by Heal | – | Core = 0; | ||
Availability = 1; | |||||
Forensic = 2; | |||||
ConfigWatch = 3; | |||||
FileWatch = 4; | |||||
ComputedAvailability =5; | Yes | Do not change the values |
message Instance
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
---|---|---|---|---|---|
instanceId | instanceId | – | – | Yes | Instance id for the component must be obtained from Heal database |