
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@amilabs/nginx-logs-replay
Advanced tools
Replay nginx-like logs into a test HTTP server for stress testing
Replay nginx-like logs into a test HTTP server for stress testing.
npm i -g @amilabs/nginx-logs-replay
Usage of nginx-replay:
Options:
-f, --filePath <path> path of the nginx logs file
-p, --prefix <url> url for sending requests
-r, --ratio <number> acceleration / deceleration rate of sending requests, eg: 2, 0.5 (default: "1")
--format <string> format of the nginx log (default: "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\"")
--formatTime <string> format of the nginx time (default: "DD/MMM/YYYY:HH:mm:ss Z")
--startTimestamp <number> start replaying logs from this timestamp (default: "0")
-d --debug show debug messages in console (default: false)
-l, --logFile <path> save results to the logs file (default: "")
-t, --timeout <int> timeout fo the requests
--username <string> username for basic auth
--password <string> password for basic auth
--scaleMode experimental mode for the changing requests order (default: false)
--skipSleep remove pauses between requests. Attention: will ddos your server (default: false)
--skipSsl skip ssl errors (default: false)
--datesFormat <string> format of dates to display in logs (regarding Moment.js parsing format) (default: "DD-MM-YYYY:HH:mm:ss")
-s, --stats show stats of the requests (default: false)
--deleteQueryStats [strings...] delete some query for calculating stats, eg: "page limit size" (default: "")
--statsOnlyPath keep only endpoints for showing stats (default: false)
--filterOnly [strings...] filter logs for replaying, eg: "/test data .php" (default: [])
--filterSkip [strings...] skip logs for replaying, eg: "/test data .php" (default: [])
--hideStatsLimit <int> limit number of stats (default: "0")
-h, --help display help for command
# Replay access log
nginx-replay -f nginx-acces.log -p localhost -d -l out.log -s
Log is 5 spaces separated values:
replay-status original-status start-time-at-log replay-start-time duration url
403 200 22-04-2021:03:46:32 26-04-2021:03:59:29 0.32 /enpoint?page=1
Calculated list of top urls. You can hide some rare requests by passing hideStatsLimit option. Also you can remove some or all query by passing deleteQueryStats or statsOnlyPath options.
Some useful information and statistic about requests, rps, errors end etc.
FAQs
Replay nginx-like logs into a test HTTP server for stress testing
We found that @amilabs/nginx-logs-replay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.