Use Traceability Agent to report Gateway usage
5 minute read
Before you start
- Make sure your entitlement is correctly set up, based on your Gateway (AWS / Axway v7 / Azure). Refer to your Axway CSM for more information.
Learn how to install and set up the Traceability Agent to automatically report the Gateway usage data to Amplify platform. Gateway usage data counts all API calls going through the Gateway.
Traceability Agent overview
The Traceability Agent is attached to a Gateway and monitors the traffic crossing it. The collected traffic is reported to Amplify platform in different events:
- Usage event: reports the total number of API calls during a period of time. This feature cannot be inactivated.
- Transaction event: reports the transaction summary (API name, duration, status), and the transaction details (request/response headers from the frontend and backend of the API). If your API calls JMS endpoints, the JMS properties are also reported. To reduce the number of transactions sent to the platform, use the sampling feature.
Disabling transacation reportTo use the Traceability Agent for logging usage only, set
ta_env_vars.envfile to disable the transaction report. Restart the Traceability Agent to use the new configuration.
All outbound traffic is sent over SSL via TCP / UDP.
Open the following ports so that agents can communicate to the Amplify platform:
|US||apicentral.axway.com||184.108.40.206||443||HTTPS||API definitions, Subscription info|
|EU||central.eu-fr.axway.com||220.127.116.11||443||HTTPS||API definitions, Subscription info|
|EU/US||lighthouse.admin.axway.com||443||HTTPS||API usage event|
|US||ingestion-lumberjack.datasearch.axway.com or ingestion.datasearch.axway.com||18.104.22.168||453 or 443||TCP or HTTPS||API transaction event|
|EU||ingestion-lumberjack.visibility.eu-fr.axway.com or ingestion.visibility.eu-fr.axway.com||22.214.171.124||453 or 443||TCP or HTTPS||API transaction event|
NoteRegion column represents the region where your Amplify organization is deployed. EU means deployed in European data center and US meaning deployed in US data center. You must use the corresponding Host/Port for your agents to operate correctly.
Install Traceability Agent
To report usage to Amplify platform, the traceability Agent must be installed and connected to the Gateway to be monitored:
Install Axway CLI and Axway Central CLI
Install Axway CLI:
npm install -g axway
Install Axway Central CLI:
axway pm install @axway/axway-central-cli
Download and install OpenSSL, if not already present on the machine. This will help you generate a public/private key pair to secure the connection between Traceability Agent and Amplify platform.
More information regarding the CLI installation is available here
Authorize your CLI to use the Amplify Central APIs:
axway auth login
Install the Traceability Agent using Axway Central CLI:
axway central install agents
For usage tracking, only the Traceability Agent is required.
Answer ALL questions when prompted (environment / team / connectivity with Gateway).
CLI creates appropriate resources in Amplify platform / local files based on the answers.
CLI output next steps: copy files on the Gateway machine / start the agent.
Reporting Gateway usage event
You can view the environment in Amplify Central > Topology once the Traceability Agent is installed. The same environment is visible in Amplify platform under the Organization menu.
Once Traceability Agent starts, it detects the Gateway traffic, and begins counting the transactions. On a regular basis (default is 15 minutes), the Traceability Agent sends the usage counter to the platform.
To change the reporting interval, use the
CENTRAL_EVENTAGGREGATIONINTERVAL variable with either a second, minute or hour notation:
# report every 5 minutes expressed in second unit CENTRAL_EVENTAGGREGATIONINTERVAL=900s # report every 5 minutes expressed in minute unit CENTRAL_EVENTAGGREGATIONINTERVAL=15m # report every hour expressed in hour unit CENTRAL_EVENTAGGREGATIONINTERVAL=1h
If for any reason the usage report cannot be uploaded to Amplify platform, the data are kept in memory and will be pushed at the next trigger interval.
If the Traceability Agent is stopped while there are still remaining usage events to be sent, the report is saved on the disk where the Traceability Agent is located. The data will be sent to Amplify platform at the next Traceability Agent startup.
View the usage data from Amplify platform
Based on the frequency you choose, the Traceability Agent reports to the platform the number of transactions that happen during each period. To view the data:
- Log into the platform, select the Organization menu:
- Select the Usage menu to view the usage data:
Select a Usage data report tab:
- Monthly Usage to visualize your monthly data. Filter either by month (to get a specific month’s values), or products (if you have multiple product entitlements).
- Report History to view and download the usage report history. Filter the data per reporting period and/or per file name, environment name or status.
- Click Download to download a specific report.
The following known limitations exist in the current implementation.
NoteThe usage report is based on the transactions the Traceability Agent monitors. If the transactions are not provided by the Gateway, the usage report will be inaccurate.
Axway API Gateway
In the case of high demand, Axway recommends to turn off the trace event logging of the Gateway. In this situation, the Traceability Agent will not be able to monitor the transactions or report the corresponding traffic.
AWS API Gateway
The current solution relies on AWS Simple Queue Service to collect traffic from Cloud Watch. However, there is a limit of 10 SQS messages per client connection that can be consumed at one time. As a workaround, you can increase the number of workers (i.e., consumer clients) using the
AWS_WORKERS variable. Be aware that the number of workers is directly related to the network consumption – the more you add, the more network connections are used.
Azure API Gateway
Within Azure API Gateway, it is possible to activate the transaction sampling for Azure Monitoring (either at API level or for all APIs). Activating sampling will make the usage report inaccurate.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.