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

Commit d350716

Browse files
author
Chris Wiechmann
committed
Updated Docker-Base Image for Node12, some more field-mapping
1 parent a291b56 commit d350716

File tree

4 files changed

+41
-6
lines changed

4 files changed

+41
-6
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,20 @@ Make sure, the Filebeat Harvester is started on the Open-Traffic-Files:
136136
```
137137
INFO log/harvester.go:251 Harvester started for file: /var/log/work/group-2_instance-1_traffic.log
138138
```
139-
The following error means, Logstash is not running or reachable:
139+
The following error means, Logstash is not running or reachable (Or just not yet fully started):
140140
```
141141
ERROR pipeline/output.go:100 Failed to connect to backoff(async(tcp://logstash:5044)): lookup logstash on 127.0.0.11:53: no such host
142142
```
143-
General note: You don't see Filebeat telling you, when it is successfully processing your log-files. When the Harvester process is started and you don't see any errors, you can assume your files are processed.
143+
General note: You don't see Filebeat telling you, when it is successfully processing your log-files. When the Harvester process is started and you don't see any errors, you can assume your files are processed.
144+
If the Filebeat-Harvester doesn't start, you may validate that the Open-Traffic-Event log files are visible by checking the following directory within the running container:
145+
```
146+
ls -l /var/log/work
147+
-rw-rw-r--. 1 filebeat filebeat 2941509 Aug 13 12:38 group-2_instance-1_traffic.log
148+
-rw-rw-r--. 1 filebeat filebeat 20972249 Jul 7 19:32 group-2_instance-1_traffic_2020-07-07-1.log
149+
-rw-rw-r--. 1 filebeat filebeat 20972436 Jul 8 18:08 group-2_instance-1_traffic_2020-07-08-1.log
150+
-rw-rw-r--. 1 filebeat filebeat 20972005 Jul 17 07:32 group-2_instance-1_traffic_2020-07-17-1.log
151+
152+
```
144153

145154
### Check Logstash processing
146155
Logstash write to Stdout, hence you can view information just with:
@@ -165,7 +174,7 @@ When Logstash is successfully started you should see the following:
165174
[INFO ][logstash.agent ] Pipelines running {:count=>2, :running_pipelines=>[:main, :".monitoring-logstash"], :non_running_pipelines=>[]}
166175
[INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
167176
```
168-
Once, Logstash is successfully processing data, you see them flying by as JSON-Payload in the log output.
177+
169178

170179
### Check Elasticsearch processing
171180
It takes a while until Elasticsearch is finally started and reports it with the following line:
@@ -191,13 +200,24 @@ docker logs apigateway-openlogging-elk_elk-traffic-monitor-api_1_3fbba4deea37 --
191200
server started on port 8080
192201
```
193202
#### Check requests from Admin-Node-Manager
194-
When using the API-Gateway Traffic-Monitor and having the Admin-Node-Manager re-configured you see how API-Builder is processing the requests:
203+
When using the API-Gateway Traffic-Monitor to monitor requests and having the Admin-Node-Manager re-configured you should see how API-Builder is processing the requests:
195204
```
196205
Request {"method":"GET","url":"/api/elk/v1/api/router/service/instance-1/ops/search?format=json&field=leg&value=0&count=1000&ago=10m&protocol=http","headers":{"host":"localhost:8889","max-forwards":"20","via":"1.0 api-env (Gateway)","accept":"application/json","accept-language":"en-US,en;q=0.5","cookie":"cookie_pressed_153=false; t3-admin-tour-firstshow=1; VIDUSR=1584691147-TE1M3vI9BFWgkA%3d%3d; layout_type=table; portal.logintypesso=false; portal.demo=off; portal.isgridSortIgnoreCase=on; 6e7e1bb1dd446d4cd36889414ccb4cb7=8g9p3kh27t1se22lu6avkmu0a1; joomla_user_state=logged_in; 220b750abfbc8d2f2f878161bab0ab65=62gr71dkre858nc0gjldri18gt","csrf-token":"8E96374767C47BFADC9C606FF969D7CF56FB3F9523E41B34F3B3B269F7302646","referer":"https://api-env:8090/","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0","x-requested-with":"XMLHttpRequest","connection":"close","x-correlationid":"Id-fd7c745ebfaed039b2155481 1"},"remoteAddress":"::ffff:172.25.0.1","remotePort":55916}
197206
Response {"statusCode":200,"headers":{"server":"API Builder/4.25.0","request-id":"35fb859d-00b0-404b-97e6-b549db17f84c","x-xss-protection":"1; mode=block","x-frame-options":"DENY","surrogate-control":"no-store","cache-control":"no-store, no-cache, must-revalidate, proxy-revalidate","pragma":"no-cache","expires":"0","x-content-type-options":"nosniff","start-time":"1584692477587","content-type":"application/json; charset=utf-8","response-time":"408","content-md5":"e306ea2d930a3b80f0e91a29131d520b","content-length":"267","etag":"W/\"10b-2N+JsHuxDxMVKhJR1A8GuNGnKDQ\"","vary":"Accept-Encoding"}}
198207
```
208+
209+
If you do not see any requests arriving in the API builder, the ANM may not be able to reach the API builder listen socket.
210+
It is important to know that traffic information will still appear in this case, because in this case the OPSDB will be used. You should therefore check the ANM trace log.
211+
```
212+
tail -f /opt/Axway/APIM/apigateway/trace/nodemanageronapi-env_20200813000000.trc
213+
```
214+
In case you see the following message logged, please check the API-Builder process is running and reachable from the ANM.
215+
```
216+
logged Failure at 08.13.2020 05:46:09,730 with log description: Failed in calling policy shortcut
217+
```
218+
199219
#### Check queries send to ElasticSearch
200-
In oder to see the queries that are send to ElasticSearch by API-Builder you need to run the Docker-Container with `LOG_LEVEL=debug`. This gives you in the console of the API-Builder the following output:
220+
In oder to see queries that are send to ElasticSearch by API-Builder you need to run the Docker-Container with `LOG_LEVEL=debug`. You can activate debug in the docker-compose.yml. This gives you in the console of the API-Builder the following output:
201221
```
202222
Using elastic search query body: {"index":"logstash-openlog","body":{"query":{"bool":{"must":[{"range":{"timestampOriginal":{"gt":1587541496568}}},{"term":{"processInfo.serviceId":"instance-1"}}]}}},"size":"1000","sort":""}
203223
```

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ services:
9494
- elasticsearch1
9595
environment:
9696
- ELASTIC_NODE=http://elasticsearch1:9200
97+
#- LOG_LEVEL=debug
9798
ports:
9899
- 8889:8080
99100
depends_on:

elk-traffic-monitor-api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# This line defines which node.js Docker image to leverage
44
# Available versions are described at https://hub.docker.com/_/node/
5-
FROM node:8-alpine
5+
FROM node:12-alpine
66

77
# Sets the default working directory to /app which is where we copy the service files to.
88
WORKDIR /app

logstash/config/traffic_details_index_template.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,20 @@
122122
"transactionElements.leg4.duration": { "type": "integer" },
123123
"transactionElements.leg4.finalStatus": { "type": "keyword" },
124124

125+
"transactionSummary.status": {
126+
"type": "keyword"
127+
},
128+
"transactionSummary.protocol": {
129+
"type": "keyword"
130+
},
131+
"transactionSummary.protocolSrc": {
132+
"type": "integer"
133+
},
134+
135+
"transactionSummary.path": {
136+
"type": "text"
137+
},
138+
125139
"transactionSummary.serviceContext.service": {
126140
"type": "text",
127141
"fields": {

0 commit comments

Comments
 (0)