Setting up performance monitoring for 1C-Bitrix
Performance monitoring is not a one-time diagnosis, but continuous control: when degradation started, what changed, where the critical point is. Without monitoring, the customer discovers the problem, not the team.
Built-in Bitrix monitoring
The "Performance" module (perfmon) keeps a log of slow pages. Settings: Settings → Performance → Performance Monitor.
Default threshold — 2 seconds. Pages slower than the threshold get logged with details: SQL time, query count, component time. Table b_perf_hit — you can query directly for aggregation.
SELECT URL, AVG(SQL_TIME) avg_sql, AVG(QUERIES_COUNT) avg_queries, COUNT(*) hits
FROM b_perf_hit
WHERE HIT_DATETIME > DATE_SUB(NOW(), INTERVAL 24 HOUR)
GROUP BY URL
ORDER BY avg_sql DESC
LIMIT 20;
PHP-FPM status
Add to PHP-FPM pool config:
pm.status_path = /fpm-status
In nginx:
location /fpm-status {
allow 127.0.0.1;
deny all;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Endpoint /fpm-status shows active/waiting workers. active processes close to max_children — PHP saturated.
Prometheus + Grafana
Stack for professional monitoring. In 3–4 hours of setup you get dashboards with history.
Exporters:
-
node_exporter— CPU, RAM, disk, network -
mysqld_exporter— MySQL/MariaDB metrics -
php-fpm_exporter— PHP-FPM metrics from/fpm-status -
redis_exporter— Redis metrics
Key metrics for Bitrix in Grafana:
-
php_fpm_active_processes / php_fpm_max_active_processes— PHP-FPM load -
mysql_global_status_slow_queries— slow query count -
redis_memory_used_bytes— Redis memory usage -
node_load1/node_load5— system load
Alerting
Set up notifications for critical events:
| Condition | Threshold | Channel |
|---|---|---|
| PHP-FPM active > 85% max | 5 minutes | Telegram |
| MySQL slow queries > 10/min | — | |
| Disk I/O wait > 30% | 3 minutes | Telegram |
| Site response time > 3 s | 2 minutes | Telegram + call |
| Errors 5xx > 1% requests | — | Telegram |
Simple external availability monitoring: UptimeRobot (free, checks every 5 minutes) or Betteruptime. Checks HTTP status and notifies on downtime.







