1.0.2 • Published 6 years ago

clf-analyzer v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

js-standard-style

clf-analyzer

A simple Common Log Format analyzer

Run application

  • Run from source:

node index.js --help

  • Run using npx:

npx clf-analyzer --help

Usage

Options:
  --help                Show help                                      [boolean]
  --version             Show version number                            [boolean]
  --path                The path of the logfile to monitor   [string] [required]
  --interval            The interval (in seconds) to report statistics
                                                          [number] [default: 10]
  --limit               The maximum number of paths to be reported
                                                           [number] [default: 5]
  --threshold-interval  The window (in minutes) to watch for the request count
                        for alerting                       [number] [default: 2]
  --threshold-count     The number of requests that trigger the alerting
                                                         [number] [default: 200]

Testing

Run npm test

What could be improved?

  • Error handling
  • Output organization and design
  • Compare the performance of building the report once every interval (the adopted solution) or build it incrementally when we process a log line
  • More test coverage
  • Better naming (variables, functions, files)
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago