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

Commit 556b2ec

Browse files
author
Chris Wiechmann
authored
Merge pull request #17 from Axway-API-Management-Plus/project-restructure
Major refactoring
2 parents c064a83 + 44a5a46 commit 556b2ec

File tree

537 files changed

+1462
-183937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

537 files changed

+1462
-183937
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Filebeat will mount that folder into the Filebeat Docker-Container to have access to the files
22
APIGATEWAY_LOGS_FOLDER=/home/localuser/Axway-x.y.z/apigateway/logs/opentraffic
3-
APIGATEWAY_TRACES_FOLDER=/home/localuser/Axway-x.y.z/apigateway/groups/group-1/instance-1/trace
3+
APIGATEWAY_TRACES_FOLDER=/home/localuser/Axway-x.y.z/apigateway/groups/group-2/instance-1/trace
44

55
# This variable is used by the API-Builder project to locate the Elasticsearch instance
66
# Using the default docker-compose.yaml this setting is sufficient

.github/workflows/logstash.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Logstash config test
22

3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
3+
on: [push, pull_request]
84

95
jobs:
106
test-logstash:
@@ -26,4 +22,4 @@ jobs:
2622
- name: Run Logstash config tests
2723
run: |
2824
dir
29-
./logstash-filter-verifier
25+
./logstash-filter-verifier --diff-command="diff -y" --sockets ./logstash/test ./logstash/pipeline

README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Each API-Gateway instance is writing, [if configured](#enable-open-traffic-event
1313

1414
Once the data is indexed by Elasticsearch it can be used by different clients. This process allows almost realtime monitoring of incoming requests. It takes around 5 seconds until a request is available in Elasticsearch.
1515

16-
## Option 1 - Using the existing Traffic-Monitor
17-
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.
16+
## Using the existing Traffic-Monitor
17+
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](./elk-traffic-monitor-api), 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.
1919
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.
2020

@@ -23,27 +23,6 @@ Finally, the Admin-Node-Manager has to be [configured](#configure-the-admin-node
2323
API-Builder exposing Traffic-Monitor API:
2424
[![Traffic-Monitor API](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/workflows/Traffic-Monitor%20API/badge.svg)](https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/actions)
2525

26-
## Option 2 - Loginspector
27-
The Loginspector is a new separated user-interface with very basic set of functionalities. As part of the project the Loginspector is activated by default when using `docker-compose up -d`. If you don't wanna use it, it can be disabled by commenting out the following lines in the docker-compose.yml file:
28-
```yaml
29-
nginx:
30-
image: nginx:1.17.6
31-
ports:
32-
- 8888:90
33-
volumes:
34-
- ${PWD}/nginx/www:/usr/share/nginx/html
35-
- ${PWD}/nginx/conf:/etc/nginx
36-
depends_on:
37-
- elasticsearch1
38-
networks:
39-
- elastic
40-
- ingress
41-
```
42-
The Log-Inspector is accessible on the following URL: `http://hostname-to-your-docker-machine:8888/logspector.html`
43-
44-
![Log-Inspector][img5]
45-
46-
4726
## Prerequisites
4827
For a simple deployment the prerequisites are very simple as all services can be started as a Docker-Container. In order to start all components in PoC-Like-Mode you just need:
4928

configs/logstash.conf

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

docker-compose.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.7'
22
services:
33
# The core component
44
elasticsearch1:
5-
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
5+
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
66
container_name: elasticsearch1
77
environment:
88
- "ES_JAVA_OPTS=-Xms750M -Xmx750M"
@@ -19,7 +19,7 @@ services:
1919
- type: volume
2020
source: esdata1
2121
target: /usr/share/elasticsearch/data
22-
- ${PWD}/configs/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
22+
- ${PWD}/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
2323
networks:
2424
- elastic
2525
- ingress
@@ -29,7 +29,7 @@ services:
2929

3030
# This is optional, but good to have to perform manual queries and create custom dashboards
3131
kibana:
32-
image: docker.elastic.co/kibana/kibana:7.4.0
32+
image: docker.elastic.co/kibana/kibana:7.8.0
3333
container_name: kibana
3434
environment:
3535
SERVER_NAME: localhost
@@ -52,15 +52,15 @@ services:
5252

5353
# Supposed to run side-by-side with the API-Gateway to watch the Open-Traffic Event files and send event to Logstash
5454
filebeat:
55-
image: docker.elastic.co/beats/filebeat:7.4.0
55+
image: docker.elastic.co/beats/filebeat:7.8.0
5656
command: --strict.perms=false
5757
environment:
5858
- setup.kibana.host=kibana:5601
5959
- output.elasticsearch.hosts=["elasticsearch1:9200"]
6060
ports:
6161
- 9000:9000
6262
volumes:
63-
- ${PWD}/configs/filebeat.docker.yml:/usr/share/filebeat/filebeat.yml
63+
- ${PWD}/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml
6464
- ${APIGATEWAY_LOGS_FOLDER}:/var/log/work
6565
- ${APIGATEWAY_TRACES_FOLDER}:/var/log/trace
6666
- /var/lib/docker/containers:/var/lib/docker/containers:ro
@@ -70,7 +70,7 @@ services:
7070

7171
# Is receiving events from Filebeat and does pre-processing
7272
logstash:
73-
image: docker.elastic.co/logstash/logstash:7.4.0
73+
image: docker.elastic.co/logstash/logstash:7.8.0
7474
links:
7575
- elasticsearch1
7676
environment:
@@ -79,9 +79,9 @@ services:
7979
ports:
8080
- 5044:5044
8181
volumes:
82-
- ${PWD}/configs/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
83-
- ${PWD}/configs/openlog_index_template.json:/usr/share/logstash/pipeline/openlog_index_template.json
84-
command: logstash --path.config /usr/share/logstash/pipeline/logstash.conf --pipeline.batch.size 20 --pipeline.workers 1 --log.level info
82+
- ${PWD}/logstash/pipeline/pipeline.conf:/usr/share/logstash/pipeline/pipeline.conf
83+
- ${PWD}/logstash/config/traffic_details_index_template.json:/usr/share/logstash/config/traffic_details_index_template.json
84+
command: logstash --path.config /usr/share/logstash/pipeline/pipeline.conf --pipeline.batch.size 20 --pipeline.workers 1 --log.level info
8585
depends_on:
8686
- elasticsearch1
8787
networks:
@@ -101,21 +101,6 @@ services:
101101
networks:
102102
- elastic
103103

104-
# This is the Logspector Web-Application
105-
nginx:
106-
image: nginx:1.17.6
107-
ports:
108-
- 8888:90
109-
volumes:
110-
- ${PWD}/nginx/www:/usr/share/nginx/html
111-
- ${PWD}/nginx/conf:/etc/nginx
112-
depends_on:
113-
- elasticsearch1
114-
networks:
115-
- elastic
116-
- ingress
117-
118-
119104
volumes:
120105
esdata1:
121106
esdata2:
File renamed without changes.

0 commit comments

Comments
 (0)