Skip to content

Commit 7c4c13b

Browse files
authored
Update docs for release v2.0 (#38)
1 parent 712cf7f commit 7c4c13b

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.md

+20-9
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Monitor the incoming and outgoing traffic metrics in realtime for `NGINX`.
44

55
**Now accounting module supports both HTTP and STREAM subsystems**
66

7-
Realtime traffic and status code monitor solution for NGINX,
8-
need less memory and cpu than realtime log analyzing solutions.
7+
A realtime traffic and status code monitor solution for NGINX,
8+
which needs less memory and cpu than other realtime log analyzing solutions.
99
Useful for traffic accounting based on NGINX config logic (by location / server / user-defined-variables).
1010

1111
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FLax%2Ftraffic-accounting-nginx-module.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FLax%2Ftraffic-accounting-nginx-module?ref=badge_shield)
@@ -16,16 +16,16 @@ Realtime log analysis solutions,
1616
which requires multiple machines for storage and analysis,
1717
are too heavy for application monitoring.
1818

19-
An cost-effective solution is needed to monitor the traffic metrics/status of application requests.
20-
That solution should be accurate, sensitive, robust, light weight enough, and not affected by traffic peaks.
19+
An cost-effective solution is in need to monitor the traffic metrics/status of application requests.
20+
This solution should be accurate, sensitive, robust, light weight enough, and not affected by traffic peaks.
2121

2222
## How it works?
2323

24-
The module keeps in its context a list of **metrics** identified by `accounting_id`.
24+
This module keeps a list of **metrics** identified by `accounting_id` in its context.
2525

2626
When a new **request** hits the server, the module will try to find its `accounting_id`, calculate statistics, and **aggregate** them into the corresponding metrics by `accounting_id`.
2727

28-
For every period (defined by `interval`), a timer event is triggered, those metrics are rotated and exported to log files or sent to remote log servers.
28+
For each time period (defined by `interval`), a timer event is triggered, those metrics are rotated and exported to log files or sent to remote log servers.
2929

3030

3131
---
@@ -39,7 +39,6 @@ Add following lines at the beginning of `nginx.conf`:
3939

4040
```
4141
load_module modules/ngx_http_accounting_module.so;
42-
load_module modules/ngx_stream_accounting_module.so;
4342
```
4443

4544
Reload nginx config with `nginx -s reload`. *Done!*
@@ -226,10 +225,20 @@ git clone https://github.com/Lax/traffic-accounting-nginx-module.git
226225
227226
# to build as `static` module
228227
./configure --prefix=/opt/nginx --with-stream --add-module=traffic-accounting-nginx-module
228+
make && make install
229+
230+
229231
# to build as `dynamic` module
232+
# both HTTP and STREAM module, target module file name is ngx_http_accounting_module.so
230233
./configure --prefix=/opt/nginx --with-stream --add-dynamic-module=traffic-accounting-nginx-module
231234
232-
make && make install
235+
# only HTTP module, target module file name is ngx_http_accounting_module.so
236+
#./configure --prefix=/opt/nginx --add-dynamic-module=traffic-accounting-nginx-module
237+
238+
# only STREAM module, target module file name is ngx_stream_accounting_module.so
239+
#./configure --prefix=/opt/nginx --without-http --add-dynamic-module=traffic-accounting-nginx-module
240+
241+
make modules
233242
```
234243

235244
### Step 2 (dynamic module only)
@@ -238,7 +247,9 @@ Add the following lines at the beginning of `nginx.conf`:
238247

239248
```
240249
load_module modules/ngx_http_accounting_module.so;
241-
load_module modules/ngx_stream_accounting_module.so;
250+
251+
# for STREAM only build
252+
#load_module modules/ngx_stream_accounting_module.so;
242253
```
243254

244255
### Step 3

0 commit comments

Comments
 (0)