Download the PHP package pantheon-systems/terminus-site-debug without Composer
On this page you can find all versions of the php package pantheon-systems/terminus-site-debug. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pantheon-systems/terminus-site-debug
More information about pantheon-systems/terminus-site-debug
Files in pantheon-systems/terminus-site-debug
Package terminus-site-debug
Short Description Get server logs on all appservers in a specific environment.
License
Informations about the package terminus-site-debug
Logs Parser
A Terminus plugin that:
- download site logs from a specific environment of a Pantheon sites
- parse the logs for debugging purposes
This will also pull logs on an environment with multiple containers.
Learn more about Terminus and Terminus Plugins at: https://pantheon.io/docs/terminus/plugins/
Examples
Download all logs from dev
.
Only download nginx-access.log and nginx-error.log logs.
Exclude nginx-access.log and nginx-error.log from download.
Parsing Nginx Access Logs
Search nginx-access logs with 301 status code via PHP.
Show how many times the IP visited the site.
Top response by HTTP status.
Top 403 requests
Top 404 requests
Top PHP 404 requests.
Top PHP 404 requests in full details.
Top 502 requests
Top IPs accessing 502.
To get 502 URIs run this command first: terminus logs:parse:nginx-access site_name.env --grouped-by=502
Count the request that hits the appserver per second.
Top request methods.
Parsing Nginx Error Logs
Search nginx-error.log for access forbidden error.
Search nginx-error.log for SSL_shutdown error.
Search nginx-error.log for "worker_connections" error.
This error means that the site has no enough PHP workers. Consider upgrading to a higher plan to add more appservers.
To get the latest entries.
You can adjust the results by passing a numeric value to --filter
which has a default value of 10
.
Parsing PHP Error Logs
Search for the latest entries.
Search php-error logs with 301 "Uncaught PHP Exception" error.
Search to all the logs.
Parsing PHP Slow Logs
Search for the latest entries.
Top functions by number of times they called.
Slow requests grouped by minute
Parsing MySQL Slow Log
Display everything.
Count of queries based on their time of execution.
Display only the first N queries in the output. Sort output by count i.e. number of times query found in mysqld-slow-query.log.
This queries might be a good option for caching the result.
Display only the first N queries in the output.
Top queries which returned maximum rows.
Logs listing
To list all the log files.
Support
This plugin is not working on Windows environment. You may want to Dockerized your Terminus to use this kind of plugin that uses nix commands to parse the logs.
Installation
For help installing, see Manage Plugins
To install this in Terminus 3, run this command:
Credits
- To https://github.com/jfussion for the idea and initial codebase.