PHPackages                             geraldvillorente/terminus-site-debug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. geraldvillorente/terminus-site-debug

ActiveTerminus-plugin

geraldvillorente/terminus-site-debug
====================================

Get server logs on all appservers in a specific environment.

1.1.2(1mo ago)123513[3 issues](https://github.com/pantheon-systems/terminus-site-debug/issues)[5 PRs](https://github.com/pantheon-systems/terminus-site-debug/pulls)PHPCI passing

Since Nov 22Pushed 2w ago8 watchersCompare

[ Source](https://github.com/pantheon-systems/terminus-site-debug)[ Packagist](https://packagist.org/packages/geraldvillorente/terminus-site-debug)[ RSS](/packages/geraldvillorente-terminus-site-debug/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (4)Versions (18)Used By (0)

Logs Parser
===========

[](#logs-parser)

[![Actively Maintained](https://camo.githubusercontent.com/2ae5ff81f271fb028d720adee6b3595770166f3707a4705a4a2a3b71c332b249/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50616e7468656f6e2d4163746976656c795f4d61696e7461696e65642d79656c6c6f773f6c6f676f3d70616e7468656f6e26636f6c6f723d464644433238)](https://pantheon.io/docs/oss-support-levels#actively-maintained-support)

[![Terminus v1.x Compatible](https://camo.githubusercontent.com/9ea8fb0893368c0b24f172cc2df676fa4bb7246d14c0377b7924a6918065be26/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7465726d696e75732d76312e782d677265656e2e737667)](https://github.com/geraldvillorente/terminus-logs/tree/1.x)

A Terminus plugin that:

- download site logs from a specific environment of a [Pantheon](https://www.pantheon.io) 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:

Examples
--------

[](#examples)

Download all logs from `dev`.

```
terminus logs:get .

```

**Only** download nginx-access.log and nginx-error.log logs.

```
terminus logs:get . --nginx-access --nginx-error

```

**Exclude** nginx-access.log and nginx-error.log from download.

```
terminus logs:get . --exclude --nginx-access --nginx-error

```

Parsing Nginx Access Logs
-------------------------

[](#parsing-nginx-access-logs)

### Search **nginx-access** logs with 301 status code via PHP.

[](#search-nginx-access-logs-with-301-status-code-via-php)

```
terminus logs:parse:nginx-access . --filter="301" --php

```

### Show how many times the IP visited the site.

[](#show-how-many-times-the-ip-visited-the-site)

```
terminus logs:parse:nginx-access . --grouped-by=ip

```

### Top response by HTTP status.

[](#top-response-by-http-status)

```
terminus logs:parse:nginx-access . --grouped-by=response-code

```

### Top 403 requests

[](#top-403-requests)

```
terminus logs:parse:nginx-access . --grouped-by=403

```

### Top 404 requests

[](#top-404-requests)

```
terminus logs:parse:nginx-access . --grouped-by=404

```

### Top PHP 404 requests.

[](#top-php-404-requests)

```
terminus logs:parse:nginx-access . --grouped-by=php-404

```

### Top PHP 404 requests in full details.

[](#top-php-404-requests-in-full-details)

```
terminus logs:parse:nginx-access . --grouped-by=php-404-detailed

```

### Top 502 requests

[](#top-502-requests)

```
terminus logs:parse:nginx-access . --grouped-by=502

```

### Top IPs accessing 502.

[](#top-ips-accessing-502)

To get 502 URIs run this command first: `terminus logs:parse:nginx-access site_name.env --grouped-by=502`

```
terminus logs:parse:nginx-access . --grouped-by=ip-accessing-502 --uri={SITE_URI}

```

### Count the request that hits the appserver per second.

[](#count-the-request-that-hits-the-appserver-per-second)

```
terminus logs:parse:nginx-access . --grouped-by=request-per-second

```

### Top request methods.

[](#top-request-methods)

```
terminus logs:parse:nginx-access . --grouped-by=request-method --code=[200|403|404|502]

```

Parsing Nginx Error Logs
------------------------

[](#parsing-nginx-error-logs)

### Search nginx-error.log for access forbidden error.

[](#search-nginx-errorlog-for-access-forbidden-error)

```
terminus logs:parse:nginx-error . --grouped-by="access forbidden"

```

### Search nginx-error.log for SSL\_shutdown error.

[](#search-nginx-errorlog-for-ssl_shutdown-error)

```
terminus logs:parse:nginx-error . --grouped-by="SSL_shutdown"

```

### Search nginx-error.log for "worker\_connections" error.

[](#search-nginx-errorlog-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.

```
terminus logs:parse:nginx-error . --grouped-by="worker_connections"

```

### To get the latest entries.

[](#to-get-the-latest-entries)

You can adjust the results by passing a numeric value to `--filter` which has a default value of `10`.

```
terminus logs:parse:nginx-error .

```

Parsing PHP Error Logs
----------------------

[](#parsing-php-error-logs)

### Search for the latest entries.

[](#search-for-the-latest-entries)

```
terminus logs:parse:php-error . --grouped-by=latest

```

### Search **php-error** logs with 301 "Uncaught PHP Exception" error.

[](#search-php-error-logs-with-301-uncaught-php-exception-error)

```
terminus logs:parse . --type=php-error --filter="Uncaught PHP Exception" --php

```

### Search to all the logs.

[](#search-to-all-the-logs)

```
terminus logs:parse . --type=all --filter="error" --php

```

Parsing PHP Slow Logs
---------------------

[](#parsing-php-slow-logs)

### Search for the latest entries.

[](#search-for-the-latest-entries-1)

```
terminus logs:parse:php-slow . --grouped-by=latest

```

### Top functions by number of times they called.

[](#top-functions-by-number-of-times-they-called)

```
terminus logs:parse:php-slow . --grouped-by=function

```

### Slow requests grouped by minute

[](#slow-requests-grouped-by-minute)

```
terminus logs:parse:php-slow . --grouped-by=minute

```

Parsing MySQL Slow Log
----------------------

[](#parsing-mysql-slow-log)

### Display everything.

[](#display-everything)

```
terminus logs:parse:mysql-slow .

```

### Count of queries based on their time of execution.

[](#count-of-queries-based-on-their-time-of-execution)

```
terminus logs:parse:mysql-slow . --grouped-by=time

```

### 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.

[](#display-only-the-first-n-queries-in-the-output-sort-output-by-count-ie-number-of-times-query-found-in-mysqld-slow-querylog)

This queries might be a good option for caching the result.

```
terminus logs:parse:mysql-slow . --grouped-by=query-count

```

### Display only the first N queries in the output.

[](#display-only-the-first-n-queries-in-the-output)

Top queries which returned maximum rows.

```
terminus logs:parse:mysql-slow . --grouped-by=average-rows-sent

```

Logs listing
------------

[](#logs-listing)

### To list all the log files.

[](#to-list-all-the-log-files)

```
terminus logs:list .

```

Support
-------

[](#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
------------

[](#installation)

For help installing, see [Manage Plugins](https://pantheon.io/docs/terminus/plugins/)

```
mkdir -p ~/.terminus/plugins
cd ~/.terminus/plugins
git clone https://github.com/pantheon-systems/terminus-site-debug.git

```

To install this in Terminus 3, run this command:

```
terminus self:plugin:install pantheon-systems/terminus-site-debug

```

Credits
-------

[](#credits)

- To  for the idea and initial codebase.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance91

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 71.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~465 days

Recently: every ~371 days

Total

6

Last Release

32d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c25c6a6eac0c3cbd78e9f2fe3629687d885424cf0a8a049eafcdb680aa583528?d=identicon)[geraldvillorente](/maintainers/geraldvillorente)

---

Top Contributors

[![iamstoick](https://avatars.githubusercontent.com/u/820842?v=4)](https://github.com/iamstoick "iamstoick (74 commits)")[![namespacebrian](https://avatars.githubusercontent.com/u/87093053?v=4)](https://github.com/namespacebrian "namespacebrian (10 commits)")[![kporras07](https://avatars.githubusercontent.com/u/2217820?v=4)](https://github.com/kporras07 "kporras07 (5 commits)")[![umandalroald](https://avatars.githubusercontent.com/u/4403290?v=4)](https://github.com/umandalroald "umandalroald (3 commits)")[![jfussion](https://avatars.githubusercontent.com/u/1130280?v=4)](https://github.com/jfussion "jfussion (3 commits)")[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (2 commits)")[![stovak](https://avatars.githubusercontent.com/u/119924?v=4)](https://github.com/stovak "stovak (2 commits)")[![jocastaneda](https://avatars.githubusercontent.com/u/1500554?v=4)](https://github.com/jocastaneda "jocastaneda (1 commits)")[![kyletaylored](https://avatars.githubusercontent.com/u/1759794?v=4)](https://github.com/kyletaylored "kyletaylored (1 commits)")[![lowlostrong](https://avatars.githubusercontent.com/u/239265111?v=4)](https://github.com/lowlostrong "lowlostrong (1 commits)")[![EdwardAngert](https://avatars.githubusercontent.com/u/17991901?v=4)](https://github.com/EdwardAngert "EdwardAngert (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/geraldvillorente-terminus-site-debug/health.svg)

```
[![Health](https://phpackages.com/badges/geraldvillorente-terminus-site-debug/health.svg)](https://phpackages.com/packages/geraldvillorente-terminus-site-debug)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
