Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit c4f50c4

Browse files
author
Chris Wiechmann
committed
Code-Clean-Up and documentation
1 parent 325fb6b commit c4f50c4

File tree

8 files changed

+22
-79
lines changed

8 files changed

+22
-79
lines changed

.github/workflows/traffic-monitor-api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
strategy:
2323
matrix:
24-
node-version: [10.x, 12.x]
24+
node-version: [12.x]
2525

2626
steps:
2727
- uses: actions/checkout@v2

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Once the data is indexed by Elasticsearch it can be used by different clients. T
1616
## Option 1 - Using the existing Traffic-Monitor
1717
One option is to use the existing API-Gateway Traffic-Monitor. That means, you use the same tooling as of today, but the underlying implementation of the Traffic-Monitor API is now pointing to Elasticsearch instead of the internal OPSDB hosted by each API-Gateway instance. This improves performance damatically, as Elasticsearch can scale across multiple machines if required and other dashboards can be created for instance with Kibana.
1818
The glue between Elasticsearch and the API-Gateway Traffic-Monitor is an API-Builder project, that is exposing the same Traffic-Monitor API, but it is implemented using Elasticsearch instead of the OPSDB. The API-Builder is available as a ready to use Docker-Image and preconfigured in the docker-compose file.
19+
Optionally you can import the API-Builder API into your API-Management system to apply additional security and by that secure access to your Elasticsearch instance.
20+
1921
Finally, the Admin-Node-Manager has to be configured to use the API-Builder API instead of the internal implementation.
2022

2123
API-Builder exposing Traffic-Monitor API:
@@ -108,11 +110,15 @@ docker-compose up -d
108110
````
109111
Of course, the components can also run on different machines or on a Docker-Orchestration framework such as Kubernetes.
110112
111-
## Stop cluster
113+
### Stop cluster
112114
````
113115
docker-compose down
114116
````
115117
118+
### Import API-Builder Traffic-Monitor API
119+
To secure access to your Elasticsearch instance you can import the API Builder REST-API into your API-Manager. You can access the Swagger/OpenAPI definition here:
120+
http://docker-host:8889/apidoc/swagger.json?endpoints/trafficMonitorApi
121+
116122
## Troubleshooting
117123
#### Check processes/containers are running
118124
From within the folder where the docker-compose.yml file is located execute:

elk-traffic-monitor-api/apis/testapi.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

elk-traffic-monitor-api/conf/greetflow.default.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

elk-traffic-monitor-api/endpoints/monitoringApiApi.json renamed to elk-traffic-monitor-api/endpoints/trafficMonitorApi.json

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "Monitoring API API",
5-
"version": "1.0"
4+
"title": "Traffic Monitor API",
5+
"version": "1.0",
6+
"description": "This API is defining a subset of the Axway API-Gateway Admin-Node-Manager API ([Official Docs](http://apidocs.axway.com/swagger-ui/index.html?productname=apigateway&productversion=7.7.0&filename=api-gateway-swagger.json)) with the purpose to replace the implementation with an Elasticsearch datasource instead of the API-Gateway internal OPSDB.",
7+
"license": {
8+
"name": "Apache 2.0"
9+
},
10+
"contact": {
11+
"name": "Chris Wiechmann",
12+
"email": "[email protected]"
13+
}
614
},
715
"host": "example.com",
816
"paths": {
@@ -54,9 +62,11 @@
5462
"type": "string"
5563
}
5664
],
57-
"x-flow": "monitoringApiApi-getRouterServiceOpsSearchByServiceID"
65+
"summary": "Seach requests to build Traffic-Overview table",
66+
"description": "This endpoint is used by the API-Gateway Traffic-Monitor to search for processed requests and create the Requests-Table.",
67+
"operationId": "search",
68+
"x-flow": "trafficMonitorApi-search"
5869
},
59-
"x-flow": "monitoringApiApi-getRouterServiceOpsSearchByServiceID",
6070
"parameters": [
6171
{
6272
"name": "serviceID",
@@ -65,33 +75,6 @@
6575
"required": true
6676
}
6777
]
68-
},
69-
"/router/service/{serviceID}/ops/stream/{correlationId}/*circuitpath": {
70-
"get": {
71-
"responses": {
72-
"200": {
73-
"description": "",
74-
"schema": {
75-
"type": "object",
76-
"properties": {}
77-
}
78-
}
79-
}
80-
},
81-
"parameters": [
82-
{
83-
"name": "serviceID",
84-
"in": "path",
85-
"type": "string",
86-
"required": true
87-
},
88-
{
89-
"name": "correlationId",
90-
"in": "path",
91-
"type": "string",
92-
"required": true
93-
}
94-
]
9578
}
9679
},
9780
"basePath": "/elk/v1/api"

elk-traffic-monitor-api/models/testuser.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

elk-traffic-monitor-api/schemas/greeting.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)