Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7b9bffd
PMM-14887 Restructure Makefiles
ademidoff Apr 3, 2026
b0b93ed
PMM-14887 Move the dev Docker compose back to the root
ademidoff Apr 3, 2026
0c48eb4
PMM-14887 Merge dev/Makefile into the root, fix targets
ademidoff Apr 3, 2026
6612647
PMM-14887 Revert envars in api-test workflow
ademidoff Apr 3, 2026
b559b15
PMM-14887 Fix a wrong link
ademidoff Apr 3, 2026
6edbf0c
PMM-14887 Remove deprecated env variables
ademidoff Apr 3, 2026
b73ee56
PMM-14887 Update the root Docker compose, modernize sysbench workflow
ademidoff Apr 3, 2026
e6f0a28
PMM-14887 Deprecate spell-check workflow
ademidoff Apr 3, 2026
9804d42
PMM-14887 Drop the deprecated Platform key
ademidoff Apr 4, 2026
4e45a77
PMM-14887 Provide a suite of compose files
ademidoff Apr 4, 2026
acce7ca
PMM-14887 Fix the path to agents.md
ademidoff Apr 4, 2026
7c8a578
Update Makefile
ademidoff Apr 8, 2026
c555198
PMM-14887 Add a BIN target
ademidoff Apr 9, 2026
d9e0c4e
PMM-14887 Follow-up on review
ademidoff Apr 9, 2026
ade1074
PMM-14887 Follow-up on review
ademidoff Apr 9, 2026
ccae344
PMM-14887 Follow-up on review
ademidoff Apr 9, 2026
b30241f
PMM-14887 Follow-up on review
ademidoff Apr 9, 2026
91adc1a
PMM-14887 Final updates and fixes
ademidoff Apr 9, 2026
9ce6b0a
PMM-14887 Fix environment variable handling in parser
ademidoff Apr 9, 2026
ab9e9cb
Merge branch 'v3' into PMM-14887-restructure-project-makefiles
ademidoff Apr 9, 2026
8d16436
Merge branch 'PMM-14887-restructure-project-makefiles' of ssh://githu…
ademidoff Apr 9, 2026
3056e36
PMM-14887 More envvar updates to docker compose
ademidoff Apr 9, 2026
ca01656
PMM-14887 Fix an external URL
ademidoff Apr 9, 2026
1e3f874
PMM-14887 More envvar updates to docker compose.dev
ademidoff Apr 9, 2026
e8f8a03
PMM-14887 Remove the trailing dot from log messages
ademidoff Apr 9, 2026
545c609
PMM-14887 Follow-up on review
ademidoff Apr 10, 2026
2a678f4
PMM-14887 Follow-up on review
ademidoff Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 77 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,78 @@
# Percona PMM dev container
#PMM_CONTAINER=perconalab/pmm-server:3-dev-container
# This is a sample file with environment variables for PMM Server.
# You can copy it to .env and modify the values as needed: `cp .env.example .env`.
# Uncomment and set the environment variables below to configure PMM Server.

CH_IMAGE=clickhouse/clickhouse-server:22.6.9.11-alpine
CH_PORT=9000
CH_HOSTNAME=ch
# The latest PMM Server image is alsways published as percona/pmm-server:3.
# A specific version can be used by changing the tag, e.g., percona/pmm-server:3.7.0.
PMM_SERVER_IMAGE=percona/pmm-server:3
# Label-based access control for PMM Server. Set to 1 to enable.
PMM_ENABLE_ACCESS_CONTROL=1
# Good for development, but not recommended for production environments.
PMM_ENABLE_INTERNAL_PG_QAN=1
# Enable Nomad integration for PMM Server.
PMM_ENABLE_NOMAD=0
# Controls the log verbosity of PMM Server. Set to 1 to enable debug logging, which can be helpful for troubleshooting.
PMM_DEBUG=0
# Https port for PMM Server API and UI.
PMM_PORT_HTTPS=443
# Set the admin username for PMM Server.
GF_SECURITY_ADMIN_USER=admin
# Set a strong admin password for PMM Server in production environments.
GF_SECURITY_ADMIN_PASSWORD=admin
# Public address for PMM Server, required by Nomad integration.
PMM_PUBLIC_ADDRESS=localhost
# Https port for PMM Server API and UI. Web UI: https://localhost:443
PMM_PORT_HTTPS=443

# Use an external ClickHouse database
# PMM_CLICKHOUSE_ADDR=127.0.0.1:9000
# PMM_CLICKHOUSE_DATABASE=pmm
# PMM_CLICKHOUSE_USER=default
# PMM_CLICKHOUSE_PASSWORD=<password>
# PMM_CLICKHOUSE_IS_CLUSTER=1
# PMM_CLICKHOUSE_CLUSTER_NAME=pmmclickhouse
# PMM_DISABLE_BUILTIN_CLICKHOUSE=1

# Use an external PostgreSQL database
# PMM_POSTGRES_ADDR=pg:5432
# PMM_POSTGRES_DBNAME=pmm-managed
# PMM_POSTGRES_USERNAME=pmm-managed
# PMM_POSTGRES_DBPASSWORD=<password>
# PMM_POSTGRES_SSL_MODE=verify-full
# PMM_POSTGRES_SSL_CA_PATH=/tmp/certs/root.crt
# PMM_POSTGRES_SSL_KEY_PATH=/tmp/certs/pmm-managed.key
# PMM_POSTGRES_SSL_CERT_PATH=/tmp/certs/pmm-managed.crt
# PMM_DISABLE_BUILTIN_POSTGRES=1

# Use SSL certificates for PMM Server's internal database connection (PostgreSQL)
# GF_DATABASE_SSL_MODE=verify-full
# GF_DATABASE_CA_CERT_PATH=/tmp/certs/root.crt
# GF_DATABASE_CLIENT_KEY_PATH=/tmp/certs/grafana.key
# GF_DATABASE_CLIENT_CERT_PATH=/tmp/certs/grafana.crt

# Specify a custom file with Advisor checks for development purposes.
# PMM_DEV_ADVISOR_CHECKS_FILE=/srv/checks/local-checks.yml

# Configure SMTP settings for Grafana to enable email notifications.
# --profile=mail-server must be enabled in docker-compose.dev.yml for these settings to take effect.
# GF_EMAILS_WELCOME_EMAIL_ON_SIGN_UP=1
# GF_SMTP_ENABLED=1
# GF_SMTP_HOST=mail-server:1025
# GF_SMTP_FROM_NAME=Percona
# GF_SMTP_FROM_ADDRESS=admin@percona.com

# Watchtower configuration for automatic updates of PMM Server and its components.
# --profile=watchtower must be enabled in docker-compose.dev.yml for these settings to take effect.
# WATCHTOWER_IMAGE=perconalab/watchtower
# PMM_WATCHTOWER_HOST=http://watchtower:8080
# PMM_WATCHTOWER_TOKEN=INSECURE_TOKEN
# PMM_DEV_UPDATE_DOCKER_IMAGE=percona/pmm-server:3
# WATCHTOWER_HTTP_LISTEN_PORT=8080
# WATCHTOWER_HTTP_API_UPDATE=1
# WATCHTOWER_NO_RESTART=0
# WATCHTOWER_DOCKER_PATH=/var/run/docker.sock

# Grafana Image Renderer configuration for rendering Grafana panels as images.
# --profile=renderer must be enabled in docker-compose.dev.yml for these settings to take effect
# GF_RENDERING_SERVER_URL=http://renderer:8081/render
# GF_RENDERING_CALLBACK_URL=https://pmm-server:8443/graph/
9 changes: 5 additions & 4 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
inputs:
PMM_SERVER_IMAGE:
description: "PMM Server image version"
default: "perconalab/pmm-server:3-dev-latest"
default: "ghcr.io/percona/pmm:3-dev-container"
required: true
type: string

Expand All @@ -26,7 +26,7 @@ on:
type: string
PMM_SERVER_IMAGE:
description: "PMM Server image version"
default: "perconalab/pmm-server:3-dev-latest"
default: "ghcr.io/percona/pmm:3-dev-container"
required: true
type: string

Expand All @@ -40,7 +40,7 @@ jobs:
env:
PMM_URL: https://admin:admin@127.0.0.1
BRANCH: ${{ github.event.inputs.BRANCH || 'v3' }}
PMM_SERVER_IMAGE: ${{ github.event.inputs.PMM_SERVER_IMAGE || 'perconalab/pmm-server:3-dev-latest' }}
PMM_SERVER_IMAGE: ${{ github.event.inputs.PMM_SERVER_IMAGE }}

steps:
- name: Check out code
Expand Down Expand Up @@ -98,7 +98,8 @@ jobs:
- name: Run API tests
shell: bash
run: |
docker run -e PMM_SERVER_URL=${{env.PMM_URL}} \
docker run \
-e PMM_SERVER_URL=${{env.PMM_URL}} \
-e PMM_RUN_UPDATE_TEST=0 \
-e PMM_RUN_ADVISOR_TESTS=0 \
-e PMM_SERVER_INSECURE_TLS=1 \
Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,8 @@ jobs:
go env | sort
git status


spell-check:
Copy link
Copy Markdown
Member Author

@ademidoff ademidoff Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Practically no value from this, better use AI, e.g. Copilot reviews.

name: Spell check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check spelling of md files
uses: crate-ci/typos@02ea592e44b3a53c302f697cddca7641cd051c3d # v1.45.0
with:
files: "**/*.md ./documentation/**/*.md"

merge-gatekeeper:
needs: [ check, spell-check ]
needs: [ check ]
name: Merge Gatekeeper
if: ${{ always() }}
runs-on: ubuntu-22.04
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/managed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,14 @@ permissions: read-all

jobs:
test:
name: Managed tests
name: Unit tests
runs-on: ubuntu-22.04
timeout-minutes: 30

env:
PMM_SERVER_IMAGE: perconalab/pmm-server:3-dev-latest
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
PMM_DEV_OAUTH_CLIENT_ID: ${{ secrets.OAUTH_PMM_CLIENT_ID }}
PMM_DEV_OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_PMM_CLIENT_SECRET }}
PMM_CONTAINER: ghcr.io/percona/pmm:3-dev-container

steps:
Expand Down Expand Up @@ -66,7 +64,7 @@ jobs:
-e PMM_RELEASE_PATH=/root/go/bin \
-e PMM_ENABLE_ACCESS_CONTROL=1 \
-e PMM_ENABLE_TELEMETRY=0 \
-e PMM_RELEASE_VERSION=3.0.0 \
-e PMM_RELEASE_VERSION=3.7.0 \
-e GOMODCACHE=/home/pmm/.cache/go/mod \
-e GOCACHE=/home/pmm/.cache/go-build \
-w /root/go/src/github.com/percona/pmm \
Expand Down
6 changes: 0 additions & 6 deletions .typos.toml

This file was deleted.

3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ All long-running daemons expose on `127.0.0.1`:
## Key Files to Reference

- `Makefile`, `Makefile.include` — build and development targets
- `docker-compose.yml` — development environment (PMM Server, renderer, watchtower)
- `docker-compose.dev.yml` — development environment (PMM Server, renderer, watchtower)
- `docker-compose.yml` — community/quickstart compose (stable image, minimal config)
- `go.mod` — Go module definition
- `.golangci.yml` — linter configuration
- `.mockery.yaml` — mock generation configuration
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ See the [PMM Documentation](https://docs.percona.com/percona-monitoring-and-mana
* Spot critical performance issues faster, understand the root cause of incidents better and troubleshoot them more efficiently.
* Zoom-in, drill-down database performance from node to single query levels. Perform in-depth troubleshooting and performance optimization.
* Built-in Advisors run regular checks of the databases connected to PMM. The checks identify and alert you of potential security threats, performance degradation, data loss and data corruption.
* Backup and restore databases up to a specific moment with Point-in-Time-Recovery.

## Architecture

Expand All @@ -41,7 +40,7 @@ See the [PMM Documentation](https://docs.percona.com/percona-monitoring-and-mana

## Installation

There are numbers of installation methods, please check our [About PMM installation](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/index.html) documentation page.
There are different installation methods, please check our [About PMM installation](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/index.html) documentation page.

But in a nutshell:

Expand All @@ -61,7 +60,7 @@ $ docker run --detach --restart always \
--name pmm-server \
percona/pmm-server:3
```
4. Start a web browser and in the address bar enter the server name or IP address of the PMM server host.
4. Start a web browser and type the server name or IP address of the PMM server host (defaults to https://localhost).

<img src="./documentation/docs/images/PMM_Login.png" width="280" alt="PMM Login Page" />

Expand Down
6 changes: 3 additions & 3 deletions agent/cmd/pmm-agent-entrypoint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ It is configured entirely by environment variables. Arguments or flags are not u

The following environment variables are recognized by the Docker entrypoint:
* PMM_AGENT_SETUP - if true, 'pmm-agent setup' is called before 'pmm-agent run'.
* PMM_AGENT_PRERUN_FILE - if non-empty, runs given file with 'pmm-agent run' running in the background.
* PMM_AGENT_PRERUN_SCRIPT - if non-empty, runs given shell script content with 'pmm-agent run' running in the background.
* PMM_AGENT_SIDECAR - if true, 'pmm-agent' will be restarted in case of it's failed.
* PMM_AGENT_PRERUN_FILE - if non-empty, runs given file while 'pmm-agent run' is running in the background.
* PMM_AGENT_PRERUN_SCRIPT - if non-empty, runs given shell script content while 'pmm-agent run' is running in the background.
* PMM_AGENT_SIDECAR - if true, 'pmm-agent' will be restarted in case it fails.
* PMM_AGENT_SIDECAR_SLEEP - time to wait before restarting pmm-agent if PMM_AGENT_SIDECAR is true. 1 second by default.

Additionally, the many environment variables are recognized by pmm-agent itself.
Expand Down
17 changes: 8 additions & 9 deletions agent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ services:
- PMM_DEV_ADVISOR_CHECKS_FILE=/srv/checks/custom-checks.yml
# for check-dev
# - PMM_DEV_PERCONA_PLATFORM_ADDRESS=check-dev.percona.com:443
# - PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
volumes:
- ./testdata/checks:/srv/checks

Expand Down Expand Up @@ -45,7 +44,7 @@ services:
- ./testdata/mysql:/mysql

mongo:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0}
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:6.0}
container_name: pmm-agent_mongo
command:
- --profile=2
Expand All @@ -60,7 +59,7 @@ services:
- ./testdata/mongo/var/log/mongodb:/var/log/mongodb

mongo_with_tls:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0}
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:6.0}
container_name: pmm-agent_mongo_with_tls
command:
- --profile=2
Expand All @@ -78,17 +77,17 @@ services:
- ./testdata/mongo/var/log/mongodb:/var/log/mongodb

mongonoauth:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0}
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:6.0}
container_name: pmm-agent_mongonoauth
command: --profile=2 -bind_ip=0.0.0.0 --noauth
ports:
- "127.0.0.1:27019:27017"

mongo_repl:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0}
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:6.0}
container_name: pmm-agent_mongorepl
environment:
- MONGO_IMAGE=${MONGO_IMAGE:-percona/percona-server-mongodb:5.0}
- MONGO_IMAGE=${MONGO_IMAGE:-percona/percona-server-mongodb:6.0}
volumes:
- ./testscripts/:/scripts
command: /scripts/mongo_repl.sh
Expand All @@ -97,11 +96,11 @@ services:
- "127.0.0.1:27021:27021"

mongo_repl_with_tls:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0}
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:6.0}
container_name: pmm-agent_mongorepl_with_tls
command: /scripts/mongo_repl_with_tls.sh
environment:
- MONGO_IMAGE=${MONGO_IMAGE:-percona/percona-server-mongodb:5.0}
- MONGO_IMAGE=${MONGO_IMAGE:-percona/percona-server-mongodb:6.0}
ports:
- "127.0.0.1:27022:27022"
- "127.0.0.1:27023:27023"
Expand All @@ -110,7 +109,7 @@ services:
- ${PWD}/utils/tests/testdata/mongodb:/etc/tls/certificates

postgres:
image: ${POSTGRES_IMAGE:-postgres:11}
image: ${POSTGRES_IMAGE:-postgres:14}
container_name: pmm-agent_postgres
command: >
-c shared_preload_libraries='${PG_PRELOADED_LIBS:-pg_stat_statements}'
Expand Down
1 change: 0 additions & 1 deletion api-tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ services:
# - PMM_DEV_ADVISOR_CHECKS_FILE=/srv/checks/custom-checks.yml
# for check-dev
- PMM_DEV_PERCONA_PLATFORM_ADDRESS=check-dev.percona.com
- PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
volumes:
- ./testdata/checks:/srv/checks

Expand Down
2 changes: 0 additions & 2 deletions dashboards/pmm-app/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ services:
- './dist:/srv/grafana/plugins/pmm-app/dist'
environment:
- PMM_DEBUG=1
- PMM_DEV_PORTAL_URL=https://portal-dev.percona.com
- PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check-dev.percona.com:443
- PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTkF7Snv08FCboTne4djQfN5qbrLfAjb8SY3/wwEP+X5nUrkxCEvUDJ
ports:
- 80:8080
- 443:8443
Expand Down
1 change: 1 addition & 0 deletions dev/init-pg.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
7 changes: 7 additions & 0 deletions dev/my.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[mysqld]
slow_query_log = ON
slow_query_log_file = /var/log/mysql/mysql-slow.log
slow_query_log_always_write_time = 0
long_query_time = 0
log_slow_admin_statements = ON
log_slow_extra = ON
14 changes: 14 additions & 0 deletions dev/mysql.logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/var/log/mysql/mysql-slow.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
sharedscripts
postrotate
if [ -f /var/run/mysqld/mysqld.pid ]; then
kill -HUP $(cat /var/run/mysqld/mysqld.pid)
fi
endscript
}
30 changes: 30 additions & 0 deletions dev/sysbench-ps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -o xtrace

sysbench \
--db-driver=mysql \
--mysql-host=ps \
--mysql-port=3306 \
--mysql-user=root \
--mysql-password=secret \
--mysql-db=sbtest \
--table-size=1000000 \
oltp_read_write \
prepare

sysbench \
--rate=200 \
--threads=64 \
--report-interval=10 \
--time=0 \
--events=0 \
--rand-type=pareto \
--db-driver=mysql \
--mysql-host=ps \
--mysql-port=3306 \
--mysql-user=root \
--mysql-password=secret \
--mysql-db=sbtest \
--table-size=1000000 \
oltp_read_only \
run
Loading
Loading