ngxtop is a command-line tool that provides real-time metrics for nginx servers by parsing access logs.
The tool solves the problem of understanding what is happening on an nginx server at a given moment. It works by parsing your nginx access log file and outputting top-like metrics similar to the Unix top command. The tool automatically attempts to detect the correct location and format of your nginx access log, so it can run with minimal configuration. It supports multiple log formats including the combined and common formats, and can even parse Apache common access logs and Caddy JSON access logs. You can customize queries to examine different variables, group results, filter records, and apply aggregation functions like sum, avg, min, and max.
ngxtop is designed for short-period troubleshooting and real-time monitoring rather than long-running collection or integration with external monitoring systems. It suits developers and operators who need to quickly diagnose what is happening on their nginx server in the moment. The README explicitly recommends considering alternatives like Luameter if you need persistent monitoring or integration with graphing systems. The tool is flexible enough to work beyond just nginx, allowing you to specify custom log formats and parse logs from other web servers.
The project maintains support for both Python 2 and Python 3. Development activity is sparse, with infrequent commits and minimal recent updates to the codebase. The tool remains functional for its intended use case of ad-hoc nginx log analysis but shows limited ongoing maintenance or feature development.