@hyperwatch/hyperwatch 3.9.2 → 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 `access_watch_combined` format that extracts important HTTP headers from the request:
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 `access_watch_combined` format to take full advantage of the Hyperwatch data augmentation in the pipeline.
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 `access_watch_combined` format that extracts important HTTP headers from the request:
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 `access_watch_combined` format to take full advantage of the Hyperwatch data augmentation in the pipeline.
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 access_watch_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" "$http_x_forwarded_for"'
229
- access_log /logs/access.log access_watch_combined;
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.accessWatchCombined})
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 access_watch_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 access_watch_combined_with_x_forwarded_for;
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.hyperwatchCombined,
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.2",
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": "^3.2.0",
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",
@@ -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
- hyperwatchCombined:
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
 
@@ -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
- accessWatch:
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
 
@@ -178,6 +178,23 @@ function augment(log) {
178
178
  return hostname && hostname.endsWith('.007ac9.net')
179
179
  ? log.set('identity', 'Seekport')
180
180
  : log;
181
+ case 'Neevabot':
182
+ return hostname && hostname.endsWith('.neevabot.com')
183
+ ? log.set('identity', 'Neevabot')
184
+ : log;
185
+ case 'DataForSeoBot':
186
+ return hostname && hostname.endsWith('.dataforseo.com')
187
+ ? log.set('identity', 'DataForSeo')
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;
181
198
 
182
199
  // Per hostname + CIDR
183
200
  case 'Twitterbot':