Sign inSign up

xolegator/pinboard

By xolegator

Updated about 2 months ago

Web dashboard for Pinba — real-time PHP performance monitoring via MySQL storage engine

Image
Developer tools
0

2.8K

xolegator/pinboard repository overview

Pinboard

Web dashboard for Pinba — a passive PHP performance monitoring system. Pinboard reads raw data from the Pinba MySQL storage engine, aggregates it on a schedule, and displays dashboards with request-time histograms, memory and CPU graphs, error rates, and slow-request logs.

PHP app ──UDP──▶ MySQL + pinba_engine ──SQL──▶ Pinboard web UI
(pinba ext)        (collects stats)          (aggregates & shows)

This image bundles nginx + PHP-FPM + Supervisord in a single container. A second instance of the same image runs the aggregation cron via Supercronic.

Quick start

# 1. Get the compose file and example env
curl -O https://raw.githubusercontent.com/XOlegator/pinboard/main/docker-compose.public.yml
curl -O https://raw.githubusercontent.com/XOlegator/pinboard/main/.env.public.example

# 2. Copy and fill in the required values
cp .env.public.example .env
# Set APP_SECRET (openssl rand -hex 32) and the two passwords

# 3. Start the full stack
docker compose -f docker-compose.public.yml up -d

# 4. Create the first admin user (run once)
docker exec pinboard-web php bin/console add-user [email protected] password ROLE_ADMIN

Open http://localhost:8080 (or PINBOARD_HTTP_PORT from your .env).

Ports

┌──────┬──────────┬──────────────┐
│ Port │ Protocol │ Description  │
├──────┼──────────┼──────────────┤
│ 80   │ TCP      │ HTTP (nginx) │
└──────┴──────────┴──────────────┘

Environment variables

┌──────────────────────────────────────┬───────────┬──────────┬───────────────────────────────────────────┐
│               Variable               │  Default  │ Required │                Description                │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ APP_SECRET                           │ —         │ ✓        │ Symfony app secret (openssl rand -hex 32) │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ DB_HOST                              │ localhost │ ✓        │ MySQL host                                │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ DB_PORT                              │ 3306      │          │ MySQL port                                │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ DB_NAME                              │ pinba     │          │ Database name                             │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ DB_USER                              │ pinba     │ ✓        │ Database user                             │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ DB_PASSWORD                          │ —         │ ✓        │ Database password                         │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ DB_SERVER_VERSION                    │ 8.4.0     │          │ MySQL version for Doctrine                │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ APP_AUTH_USER_SOURCE                 │ file      │          │ User storage: file or db                  │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ APP_RECORDS_LIFETIME                 │ P1M       │          │ Raw data retention (ISO 8601 duration)    │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ APP_AGGREGATION_PERIOD               │ PT15M     │          │ Aggregation window                        │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ APP_LOGGING_LONG_REQUEST_TIME_GLOBAL │ 1.5       │          │ Slow request threshold, seconds           │
├──────────────────────────────────────┼───────────┼──────────┼───────────────────────────────────────────┤
│ APP_NOTIFICATION_ENABLE              │ 0         │          │ Enable email notifications                │
└──────────────────────────────────────┴───────────┴──────────┴───────────────────────────────────────────┘

Running as aggregate worker

The same image can be used as a cron-based aggregation worker by overriding the command:

command: ["supercronic", "/etc/crontabs/aggregate.cron"]

Sending PHP stats to Pinba

Add to your PHP configuration:

pinba.enabled = 1
pinba.server  = <docker-host-ip>:30002
▎ Note: Pinboard aggregates data every 15 minutes. The main dashboard shows a new server
▎ after 1 aggregation cycle (~15 min). The navigation menu requires 10 cycles (~2.5 h)
▎ to filter out transient traffic.

Related image

Source

https://github.com/intaro/pinboard

Tag summary

Content type

Image

Digest

sha256:1c7115bd7

Size

73.2 MB

Last updated

about 2 months ago

docker pull xolegator/pinboard