@hyperwatch/hyperwatch 3.9.3 → 3.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/input.md
CHANGED
|
@@ -152,10 +152,10 @@ Hyperwatch is distributed with two Nginx formats.
|
|
|
152
152
|
- The default `combined` format:
|
|
153
153
|
`'$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent"'`
|
|
154
154
|
|
|
155
|
-
- the `
|
|
155
|
+
- the `hyperwatch_combined` format that extracts important HTTP headers from the request:
|
|
156
156
|
`'$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" "$http_accept" "$http_accept_charset" "$http_accept_encoding" "$http_accept_language" "$http_connection" "$http_dnt" "$http_from" "$http_host"'`.
|
|
157
157
|
|
|
158
|
-
If possible, we recommend you to use the `
|
|
158
|
+
If possible, we recommend you to use the `hyperwatch_combined` format to take full advantage of the Hyperwatch data augmentation in the pipeline.
|
|
159
159
|
|
|
160
160
|
### Apache
|
|
161
161
|
|
|
@@ -176,10 +176,10 @@ Hyperwatch is distributed with two Apache formats.
|
|
|
176
176
|
- The default `combined` format:
|
|
177
177
|
`'%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"'`
|
|
178
178
|
|
|
179
|
-
- the `
|
|
179
|
+
- the `hyperwatch_combined` format that extracts important HTTP headers from the request:
|
|
180
180
|
`'%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i" "%{Accept}i" "%{Accept-Charset}i" "%{Accept-Encoding}i" "%{Accept-Language}i" "%{Connection}i" "%{Dnt}i" "%{From}i" "%{Host}i"'`.
|
|
181
181
|
|
|
182
|
-
If possible, we recommend you to use the `
|
|
182
|
+
If possible, we recommend you to use the `hyperwatch_combined` format to take full advantage of the Hyperwatch data augmentation in the pipeline.
|
|
183
183
|
|
|
184
184
|
### Custom
|
|
185
185
|
|
|
@@ -225,8 +225,8 @@ npm start config/custom
|
|
|
225
225
|
For more detailed log processing, it is recommended to use the _Hyperwatch combined_ log format:
|
|
226
226
|
|
|
227
227
|
```
|
|
228
|
-
log_format
|
|
229
|
-
access_log /logs/access.log
|
|
228
|
+
log_format hyperwatch_combined '$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" "$http_accept" "$http_accept_charset" "$http_accept_encoding" "$http_accept_language" "$http_connection" "$http_dnt" "$http_from" "$http_host"'
|
|
229
|
+
access_log /logs/access.log hyperwatch_combined;
|
|
230
230
|
```
|
|
231
231
|
|
|
232
232
|
With the following configuration for Hyperwatch:
|
|
@@ -234,7 +234,7 @@ With the following configuration for Hyperwatch:
|
|
|
234
234
|
```
|
|
235
235
|
const defaultInput = input.file.create({
|
|
236
236
|
path: '/logs/access.log',
|
|
237
|
-
parse: format.nginx.parser({format: format.nginx.formats.
|
|
237
|
+
parse: format.nginx.parser({format: format.nginx.formats.hyperwatch_combined})
|
|
238
238
|
})
|
|
239
239
|
```
|
|
240
240
|
|
|
@@ -243,8 +243,8 @@ const defaultInput = input.file.create({
|
|
|
243
243
|
If behind a proxy, you might want to also report the `HTTP_X_FORWARDED_FOR` header to allow Hyperwatch to properly detect the client IP address.
|
|
244
244
|
|
|
245
245
|
```
|
|
246
|
-
log_format
|
|
247
|
-
access_log /logs/access.log
|
|
246
|
+
log_format hyperwatch_combined_with_x_forwarded_for '$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" "$http_accept" "$http_accept_charset" "$http_accept_encoding" "$http_accept_language" "$http_connection" "$http_dnt" "$http_from" "$http_host" "$http_x_forwarded_for"'
|
|
247
|
+
access_log /logs/access.log hyperwatch_combined_with_x_forwarded_for;
|
|
248
248
|
```
|
|
249
249
|
|
|
250
250
|
With the following configuration for Hyperwatch:
|
|
@@ -51,7 +51,7 @@ module.exports = function (hyperwatch) {
|
|
|
51
51
|
const syslogApacheHyperwatchCombinedInput = input.syslog.create({
|
|
52
52
|
port: 1518,
|
|
53
53
|
parse: format.apache.parser({
|
|
54
|
-
format: format.apache.formats.
|
|
54
|
+
format: format.apache.formats.hyperwatch_combined,
|
|
55
55
|
}),
|
|
56
56
|
});
|
|
57
57
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperwatch/hyperwatch",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.4",
|
|
4
4
|
"description": "Open Source HTTP Traffic Manager",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "François Hodierne <francois@hodierne.net>",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"chalk": "^4.1.0",
|
|
35
35
|
"country-code-emoji": "^2.3.0",
|
|
36
36
|
"debug": "^4.3.4",
|
|
37
|
-
"dnsbl": "^
|
|
37
|
+
"dnsbl": "^4.0.0",
|
|
38
38
|
"express": "^4.18.2",
|
|
39
39
|
"express-ws": "^5.0.2",
|
|
40
40
|
"geoip-lite": "^1.4.6",
|
package/src/format/apache.js
CHANGED
|
@@ -94,7 +94,7 @@ function parser({ format }) {
|
|
|
94
94
|
|
|
95
95
|
const formats = {
|
|
96
96
|
combined: '%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"',
|
|
97
|
-
|
|
97
|
+
hyperwatch_combined:
|
|
98
98
|
'%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i" "%{Accept}i" "%{Accept-Charset}i" "%{Accept-Encoding}i" "%{Accept-Language}i" "%{Connection}i" "%{Dnt}i" "%{From}i" "%{Host}i"',
|
|
99
99
|
};
|
|
100
100
|
|
package/src/format/nginx.js
CHANGED
|
@@ -95,9 +95,7 @@ function parser({ format = formats.combined } = {}) {
|
|
|
95
95
|
const formats = {
|
|
96
96
|
combined:
|
|
97
97
|
'$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent"',
|
|
98
|
-
|
|
99
|
-
'"$time_iso8601" "$remote_addr" "$http_host" "$request" $status "$http_user_agent" "$http_accept" "$http_accept_language" "$http_accept_charset" "$http_accept_encoding" "$http_from" "$http_dnt" "$http_connection" "$http_referer"',
|
|
100
|
-
hyperwatchCombined:
|
|
98
|
+
hyperwatch_combined:
|
|
101
99
|
'$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" "$http_accept" "$http_accept_charset" "$http_accept_encoding" "$http_accept_language" "$http_connection" "$http_dnt" "$http_from" "$http_host"',
|
|
102
100
|
};
|
|
103
101
|
|
package/src/modules/identity.js
CHANGED
|
@@ -186,6 +186,15 @@ function augment(log) {
|
|
|
186
186
|
return hostname && hostname.endsWith('.dataforseo.com')
|
|
187
187
|
? log.set('identity', 'DataForSeo')
|
|
188
188
|
: log;
|
|
189
|
+
case 'Qwantify':
|
|
190
|
+
case 'Qwantify-dev':
|
|
191
|
+
return hostname && hostname.endsWith('.qwant.com')
|
|
192
|
+
? log.set('identity', 'Qwant')
|
|
193
|
+
: log;
|
|
194
|
+
case 'InfoTigerBot':
|
|
195
|
+
return hostname && hostname.endsWith('.infotiger.com')
|
|
196
|
+
? log.set('identity', 'InfoTiger')
|
|
197
|
+
: log;
|
|
189
198
|
|
|
190
199
|
// Per hostname + CIDR
|
|
191
200
|
case 'Twitterbot':
|